eptm_dashboard/assets/responsive.css

242 lines
5.2 KiB
CSS

/* Reset default margins and padding */
* {
box-sizing: border-box;
}
body, html {
width: 100%;
max-width: 100%;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
#root, #__next {
height: 100%;
}
/* App shell: viewport-bounded with internal scroll on content */
.content-area {
width: 100%;
max-width: 100%;
height: 100vh;
overflow-y: auto;
overflow-x: hidden;
overflow-wrap: break-word;
}
/* Allow flex/grid descendants to shrink below their content size,
* preventing horizontal overflow from long text or wide tables.
* Inline `min-width` styles still win (higher specificity). */
.content-area * {
min-width: 0;
}
/* Mobile: hide desktop sidebar, account for fixed topbar (56px) */
@media (max-width: 767px) {
.sidebar-desktop { display: none !important; }
.content-area {
margin-left: 0 !important;
width: 100% !important;
padding-top: calc(56px + 0.75rem) !important;
padding-left: 0.75rem !important;
padding-right: 0.75rem !important;
padding-bottom: 0.75rem !important;
}
}
/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
.content-area {
padding: 1rem !important;
}
}
/* Desktop: hide mobile topbar */
@media (min-width: 768px) {
.topbar-mobile { display: none !important; }
}
/* Ensure responsive images and content */
img {
max-width: 100%;
height: auto;
display: block;
}
/* Ensure flex containers wrap properly */
.content-area > * {
min-width: 0;
max-width: 100%;
}
/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideDown {
from { opacity: 0; transform: translateY(-8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
from { opacity: 0; transform: scale(0.96); }
to { opacity: 1; transform: scale(1); }
}
.anim-fade {
animation: fadeIn 0.2s ease-out;
}
.anim-slide-down {
animation: slideDown 0.22s ease-out;
}
.anim-slide-up {
animation: slideUp 0.22s ease-out;
}
.anim-scale-in {
animation: scaleIn 0.18s ease-out;
}
/* ── Interactive hover lift ─────────────────────────────────────────────── */
.hover-lift {
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hover-lift:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.55; }
}
.anim-pulse {
animation: pulse 1.4s ease-in-out infinite;
}
/* Subtle press effect on cards/buttons */
.hover-press {
transition: transform 0.12s ease, background-color 0.15s ease;
}
.hover-press:hover {
background-color: rgba(0, 0, 0, 0.02);
}
.hover-press:active {
transform: scale(0.985);
}
/* Smooth transition default for buttons and cards */
.smooth-transition {
transition: all 0.15s ease;
}
/* ── Documentation rendered markdown ───────────────────────────────────── */
.doc-content { line-height: 1.65; color: #1f2937; }
.doc-content h2 {
font-size: 1.4rem;
margin-top: 1.5rem;
margin-bottom: 0.75rem;
color: #1e293b;
font-weight: 700;
}
.doc-content h3 {
font-size: 1.15rem;
margin-top: 1.2rem;
margin-bottom: 0.5rem;
color: #334155;
font-weight: 600;
}
.doc-content p { margin: 0 0 0.75rem 0; }
.doc-content ul, .doc-content ol {
padding-left: 1.5rem;
margin: 0 0 0.75rem 0;
}
.doc-content li { margin-bottom: 0.25rem; }
.doc-content code {
background-color: var(--gray-3);
padding: 0.1rem 0.35rem;
border-radius: 4px;
font-size: 0.88em;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc-content pre {
background-color: #1e293b;
color: #e2e8f0;
padding: 0.85rem 1rem;
border-radius: 6px;
overflow-x: auto;
font-size: 0.85em;
margin: 0.75rem 0;
line-height: 1.5;
}
.doc-content pre code {
background-color: transparent;
padding: 0;
color: inherit;
}
.doc-content table {
border-collapse: collapse;
width: 100%;
margin: 0.75rem 0;
font-size: 0.93em;
}
.doc-content th, .doc-content td {
border: 1px solid var(--gray-6);
padding: 0.4rem 0.75rem;
text-align: left;
}
.doc-content th {
background-color: var(--gray-3);
font-weight: 600;
}
.doc-content blockquote {
border-left: 3px solid var(--red-7);
padding: 0.25rem 0.75rem;
color: var(--gray-11);
margin: 0.75rem 0;
background-color: var(--gray-2);
border-radius: 0 4px 4px 0;
}
.doc-content a {
color: var(--red-11);
text-decoration: none;
}
.doc-content a:hover { text-decoration: underline; }
.doc-content hr {
border: none;
border-top: 1px solid var(--gray-5);
margin: 1.25rem 0;
}
/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
.anim-fade,
.anim-slide-down,
.anim-slide-up,
.anim-scale-in {
animation: none;
}
.hover-lift,
.hover-press,
.smooth-transition {
transition: none;
}
.anim-pulse {
animation: none;
}
}