226 lines
4.9 KiB
CSS
226 lines
4.9 KiB
CSS
/**
|
|
* Shared styles for collapsible headers and fullscreen mode
|
|
* Import this in components that use useCollapsibleHeader or useFullscreen hooks
|
|
*/
|
|
|
|
/* =============================================================================
|
|
COLLAPSIBLE HEADER TRANSITIONS
|
|
============================================================================= */
|
|
|
|
/* Base transition for all collapsible headers */
|
|
.collapsible-header {
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Collapsed state - hide content smoothly */
|
|
.collapsible-header--collapsed {
|
|
max-height: 0 !important;
|
|
padding-top: 0 !important;
|
|
padding-bottom: 0 !important;
|
|
margin-top: 0 !important;
|
|
margin-bottom: 0 !important;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Alternative: Compact mode (shrink but don't hide completely) */
|
|
.collapsible-header--compact {
|
|
padding-top: 0.25rem !important;
|
|
padding-bottom: 0.25rem !important;
|
|
}
|
|
|
|
.collapsible-header--compact h1,
|
|
.collapsible-header--compact h2 {
|
|
font-size: 1rem !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.collapsible-header--compact .subtitle,
|
|
.collapsible-header--compact p {
|
|
display: none;
|
|
}
|
|
|
|
/* =============================================================================
|
|
EXPAND/COLLAPSE TOGGLE BUTTON
|
|
============================================================================= */
|
|
|
|
.header-toggle-btn {
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
right: 0.5rem;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
padding: 0.25rem 0.5rem;
|
|
cursor: pointer;
|
|
font-size: 0.75rem;
|
|
color: #666;
|
|
z-index: 10;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.header-toggle-btn:hover {
|
|
background: #fff;
|
|
border-color: #007bff;
|
|
color: #007bff;
|
|
}
|
|
|
|
/* Sticky toggle when header is collapsed */
|
|
.header-toggle-btn--sticky {
|
|
position: fixed;
|
|
top: 70px; /* Below main nav */
|
|
right: 1rem;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* =============================================================================
|
|
FULLSCREEN MODE
|
|
============================================================================= */
|
|
|
|
/* Container in fullscreen mode */
|
|
.fullscreen-container {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.fullscreen-container--active {
|
|
position: fixed !important;
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
right: 0 !important;
|
|
bottom: 0 !important;
|
|
width: 100vw !important;
|
|
height: 100vh !important;
|
|
z-index: 9999 !important;
|
|
background: #fff;
|
|
margin: 0 !important;
|
|
padding: 0 !important;
|
|
border-radius: 0 !important;
|
|
}
|
|
|
|
/* Hide sidebar in fullscreen */
|
|
.fullscreen-container--active .sidebar,
|
|
.fullscreen-container--active .page-sidebar {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Expand main content in fullscreen */
|
|
.fullscreen-container--active .main-content,
|
|
.fullscreen-container--active .content-area {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
/* Fullscreen toggle button */
|
|
.fullscreen-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
background: #f8f9fa;
|
|
border: 1px solid #dee2e6;
|
|
border-radius: 6px;
|
|
padding: 0.5rem 0.75rem;
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
color: #495057;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.fullscreen-btn:hover {
|
|
background: #e9ecef;
|
|
border-color: #adb5bd;
|
|
color: #212529;
|
|
}
|
|
|
|
.fullscreen-btn--active {
|
|
background: #007bff;
|
|
border-color: #007bff;
|
|
color: #fff;
|
|
}
|
|
|
|
.fullscreen-btn--active:hover {
|
|
background: #0056b3;
|
|
border-color: #0056b3;
|
|
}
|
|
|
|
/* Fullscreen icon */
|
|
.fullscreen-btn__icon {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
/* Exit fullscreen button (fixed position in fullscreen mode) */
|
|
.fullscreen-exit-btn {
|
|
position: fixed;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
z-index: 10000;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 0.5rem 1rem;
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.fullscreen-exit-btn:hover {
|
|
background: rgba(0, 0, 0, 0.85);
|
|
}
|
|
|
|
/* =============================================================================
|
|
RESPONSIVE ADJUSTMENTS
|
|
============================================================================= */
|
|
|
|
@media (max-width: 768px) {
|
|
.header-toggle-btn--sticky {
|
|
top: 60px;
|
|
right: 0.5rem;
|
|
}
|
|
|
|
.fullscreen-exit-btn {
|
|
top: 0.5rem;
|
|
right: 0.5rem;
|
|
padding: 0.375rem 0.75rem;
|
|
font-size: 0.75rem;
|
|
}
|
|
}
|
|
|
|
/* =============================================================================
|
|
ANIMATION UTILITIES
|
|
============================================================================= */
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 1;
|
|
max-height: 200px;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
}
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
max-height: 200px;
|
|
}
|
|
}
|
|
|
|
.animate-slide-up {
|
|
animation: slideUp 0.3s ease forwards;
|
|
}
|
|
|
|
.animate-slide-down {
|
|
animation: slideDown 0.3s ease forwards;
|
|
}
|