/*-- -------------------------- -->
<---    LifeOS Layout Styles   -->
<--- -------------------------- -*/

/* Core page structure: wrapper, sidebar, header, main content
 * Source: mockup lines 136-327
 * Responsive: Mobile-first with desktop breakpoints
 */

/* Page Wrapper */
.lifeos-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Mobile Overlay (behind sidebar on mobile) */
.lifeos-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 65;
    display: none;
}

.lifeos-mobile-overlay.active {
    display: block;
}

@media (min-width: 1024px) {
    .lifeos-mobile-overlay {
        display: none !important;
    }
}

/* Sidebar */
.lifeos-sidebar {
    position: fixed;
    inset-block: 0;
    left: 0;
    z-index: 70;
    width: var(--sidebar-width);
    background-color: hsl(var(--background));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.2s ease-in-out;
}

/* Sidebar open state (mobile) */
.lifeos-sidebar.open {
    transform: translateX(0);
}

/* Desktop: sidebar always visible */
@media (min-width: 1024px) {
    .lifeos-sidebar {
        position: static;
        transform: translateX(0);
    }
}

/* Sidebar Header */
.sidebar-header {
    height: var(--topbar-height);
    padding-inline: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid hsl(var(--border));
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: hsl(var(--foreground));
    border-radius: 0.5rem;
    color: hsl(var(--background));
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    letter-spacing: -0.01em;
}

/* Sidebar Content Area */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid hsl(var(--border));
    flex-shrink: 0;
}

/* Main Content Wrapper */
.lifeos-main-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Top Header/Navigation Bar */
.lifeos-header {
    height: var(--topbar-height);
    padding-inline: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .lifeos-header {
        padding-inline: 1.5rem;
    }
}

/* Header Left Section */
.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .header-left,
    .header-right {
        gap: 0.5rem;
    }
}

/* Mobile/Desktop Visibility Utilities */
.mobile-only {
    display: block;
}

@media (min-width: 1024px) {
    .mobile-only {
        display: none;
    }
}

.desktop-only {
    display: none;
}

@media (min-width: 640px) {
    .desktop-only {
        display: flex;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.breadcrumb-item {
    color: hsl(var(--foreground));
}

.breadcrumb-item.current {
    color: hsl(var(--muted-foreground));
}

.breadcrumb-separator {
    height: 1rem;
    width: 1rem;
    color: hsl(var(--muted-foreground));
    margin-inline: 0.25rem;
}

/* Main Content Area */
.lifeos-content {
    flex: 1;
    overflow-y: auto;
    background-color: hsl(var(--background));
    padding: 1.5rem;
}

@media (max-width: 640px) {
    .lifeos-content {
        padding: 1rem;
    }
}
