/**
 * Teachers Shared Header & Topbar
 * Two components:
 *   .t-nav     — standard header (welcome, home, topic notes)
 *   .t-topbar  — compact sticky topbar (practice test, score report)
 */

/* ==============================
   STANDARD HEADER (.t-nav)
   ============================== */

.t-nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 24px;
}

.t-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Brand — logo + text */
.t-nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}
.t-nav-brand:hover,
.t-nav-brand:active,
.t-nav-brand:visited,
.t-nav-brand:focus {
    text-decoration: none;
}

.t-nav-logo {
    height: 52px;
    width: auto;
}

.t-nav-brand-text {
    display: flex;
    flex-direction: column;
}

.t-nav-brand-name {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.t-nav-brand-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Right section */
.t-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t-nav-user {
    font-size: 0.9rem;
    color: #4a5568;
}

.t-nav-btn {
    padding: 8px 16px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #718096;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.t-nav-btn:hover {
    background: #edf2f7;
}

.t-nav-btn-primary {
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 20px;
}
.t-nav-btn-primary:hover {
    opacity: 0.9;
    background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
}

/* Account button: text on desktop, icon on mobile */
.t-nav-btn-icon { display: none; }
.t-nav-btn-account { display: flex; align-items: center; gap: 6px; }


/* ==============================
   COMPACT TOPBAR (.t-topbar)
   ============================== */

.t-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.t-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.t-topbar-logo {
    height: 36px;
}

.t-topbar-center {
    display: flex;
    align-items: center;
    gap: 16px;
}

.t-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* ==============================
   MOBILE PORTRAIT (max-width: 600px)
   ============================== */

@media (max-width: 600px) {
    .t-nav {
        padding: 10px 14px;
    }
    .t-nav-logo {
        height: 34px;
    }
    .t-nav-brand {
        gap: 8px;
    }
    .t-nav-brand-text { display: none; }
    .t-nav-user { display: none; }
    .t-nav-signout { display: none; }
    .t-nav-right { gap: 8px; }
    .t-nav-btn { padding: 6px 12px; font-size: 0.8rem; }

    /* Account button: show icon, hide label */
    .t-nav-btn-label { display: none; }
    .t-nav-btn-icon { display: block; }
    .t-nav-btn-account {
        padding: 6px;
        border-radius: 50%;
        width: 34px;
        height: 34px;
        justify-content: center;
    }

    .t-topbar {
        padding: 10px 12px;
        gap: 8px;
    }
    .t-topbar-logo {
        height: 28px;
    }
}


/* ==============================
   LANDSCAPE (max-height: 500px)
   ============================== */

@media (max-height: 500px) and (orientation: landscape) {
    .t-nav {
        padding: 8px 16px;
    }
    .t-nav-logo {
        height: 36px;
    }
    .t-nav-brand-name {
        font-size: 1rem;
    }
    .t-nav-brand-sub {
        font-size: 0.65rem;
    }

    .t-topbar {
        padding: 8px 16px;
    }
    .t-topbar-logo {
        height: 28px;
    }
}
