/* ================================================
   MindSnap Website Layout - Responsive Design
   ================================================ */

:root {
    --sidebar-width: 260px;
    --header-height: 65px;
    --footer-height: 50px;
    --sidebar-bg: #1a1a2e;
    --sidebar-border: rgba(255,255,255,0.08);
    --sidebar-link-color: #a0aec0;
    --sidebar-link-hover-bg: rgba(13,110,253,0.12);
    --sidebar-link-hover-color: #60a5fa;
    --sidebar-link-active-bg: rgba(13,110,253,0.2);
    --sidebar-link-active-color: #0d6efd;
    --header-bg: #1a1a2e;
}

/* ========================
   HEADER
   ======================== */
.website-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1050;
    gap: 15px;
}

.website-header .website-logo {
    height: 38px;
    object-fit: contain;
}

.website-header-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.website-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.website-user-name {
    color: #a0aec0;
    font-size: 0.9em;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1.3em;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: none;
}

.sidebar-toggle-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ========================
   SIDEBAR
   ======================== */
.website-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.website-sidebar::-webkit-scrollbar {
    width: 4px;
}
.website-sidebar::-webkit-scrollbar-track { background: transparent; }
.website-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.sidebar-brand {
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 8px;
    text-align: center;
}

.sidebar-brand img {
    height: 42px;
    object-fit: contain;
}

.sidebar-section-label {
    padding: 14px 20px 5px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4a5568;
    font-weight: 600;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--sidebar-link-color);
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 0.88em;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.sidebar-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1em;
    flex-shrink: 0;
}

.sidebar-nav-link:hover {
    background: var(--sidebar-link-hover-bg);
    color: var(--sidebar-link-hover-color);
    border-left-color: #0d6efd;
}

.sidebar-nav-link.active {
    background: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-color);
    border-left-color: #0d6efd;
    font-weight: 500;
}

.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 8px 20px;
}

.sidebar-footer-links {
    margin-top: auto;
    padding: 8px 0;
    border-top: 1px solid var(--sidebar-border);
}

/* ========================
   HEADER VETERAN BADGE
   ======================== */
.header-vet-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
}

.header-vet-badge i {
    font-size: 0.8rem;
    color: rgba(180, 50, 50, 0.7);
}

@media (max-width: 480px) {
    .header-vet-badge { display: none; }
}

/* ========================
   VETERAN OWNED FOOTER
   ======================== */
.sidebar-vet-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--sidebar-border);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

.sidebar-vet-footer i {
    font-size: 0.85rem;
    color: rgba(180, 50, 50, 0.6);
}

/* ========================
   SIDEBAR OVERLAY (Mobile)
   ======================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1039;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ========================
   MAIN CONTENT AREA
   ======================== */
.website-content-area {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow-y: auto;
    overflow-x: hidden;
}

/* ========================
   FOOTER
   ======================== */
.website-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--footer-height);
    background: var(--sidebar-bg);
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    gap: 16px;
}

.website-footer-text {
    color: #4a5568;
    font-size: 0.78em;
}

.website-footer-text a {
    color: #0d6efd;
    text-decoration: none;
}

.website-footer-text a:hover { text-decoration: underline; }

.footer-sep {
    color: #2d3748;
    font-size: 0.85em;
}

/* ========================
   OVERRIDE ORIGINAL STYLES
   ======================== */

/* Hide the original bottom tab navigation always */
.absolute-bottom.footer-nav {
    display: none !important;
}

/* ========================
   NO-CHROME (login/logged-out state)
   ======================== */
body.no-chrome .website-header,
body.no-chrome .website-sidebar,
body.no-chrome .website-footer {
    display: none !important;
}

body.no-chrome .website-content-area {
    margin-left: 0 !important;
    margin-top: 0 !important;
    height: 100vh !important;
}

/* Fix page heights — let content determine height, parent scrolls */
.pagehide {
    height: auto !important;
}

.h-100 {
    height: auto !important;
}

/* Original fixed headers become relative within the layout */
.tb-fixed-top,
.tb-fixed-top2 {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
}

/* ========================
   RESPONSIVE - TABLET
   ======================== */
@media (max-width: 1200px) and (min-width: 769px) {
    :root { --sidebar-width: 220px; }
}

/* ========================
   RESPONSIVE - MOBILE
   ======================== */
@media (max-width: 768px) {
    .sidebar-toggle-btn { display: block; }

    .website-sidebar {
        transform: translateX(-100%);
        top: 0;
        bottom: 0;
        z-index: 1060;
    }

    .website-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .website-content-area {
        margin-left: 0;
        height: calc(100vh - var(--header-height));
    }

    /* Hide website footer on mobile */
    .website-footer {
        display: none;
    }
}
