/* ==========================================================================
   TeacherTo — UI extras (topbar, drawer, search, dashboard, misc)
   ========================================================================== */

/* Topbar */
.tt-topbar {
    background: linear-gradient(90deg, #7b001f, #9e1b32 55%, #b02a3e);
    color: rgba(255, 255, 255, .92);
    font-size: .68rem;
    font-weight: 700;
    position: relative;
    z-index: 92;
}
.tt-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 38px;
    padding-block: .3rem;
}
.tt-topbar__text { display: inline-flex; align-items: center; gap: .35rem; }
.tt-topbar__text .material-symbols-outlined { font-size: 1rem; color: #ffd75e; }
.tt-topbar__links { display: none; gap: .9rem; }
.tt-topbar__links a { display: inline-flex; align-items: center; gap: .25rem; color: rgba(255, 255, 255, .8); font-size: .66rem; }
.tt-topbar__links a:hover { color: #ffd75e; }
.tt-topbar__links .material-symbols-outlined { font-size: .9rem; }
@media (min-width: 640px) { .tt-topbar__links { display: flex; } }

/* Theme toggle icons */
.tt-theme-toggle .tt-icon-sun { display: none; }
html[data-theme="dark"] .tt-theme-toggle .tt-icon-sun { display: inline-block; }
html[data-theme="dark"] .tt-theme-toggle .tt-icon-moon { display: none; }
.tt-theme-toggle .material-symbols-outlined { transition: transform .4s var(--tt-ease-bounce); }
.tt-theme-toggle:hover .material-symbols-outlined { transform: rotate(24deg); }

/* Header sticky behaviour */
.tt-header--sticky { position: sticky; top: 0; }

/* Drawer extras */
.tt-drawer__user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem;
    margin-bottom: .75rem;
    border-radius: var(--tt-r);
    background: var(--tt-surface-2);
    border: 1px solid var(--tt-line);
}
.tt-drawer__user > div { display: flex; flex-direction: column; line-height: 1.5; flex: 1; min-width: 0; }
.tt-drawer__user b { font-size: .82rem; }
.tt-drawer__user small { font-size: .64rem; color: var(--tt-text-3); }
.tt-drawer__user .tt-iconbtn { width: 34px; height: 34px; background: var(--tt-surface); }
.tt-drawer__user .tt-iconbtn .material-symbols-outlined { font-size: 1.05rem; }

.tt-drawer__promo {
    position: relative;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--tt-r-md);
    background:
        radial-gradient(90% 90% at 100% 0%, rgba(255, 183, 3, .35), transparent 60%),
        linear-gradient(140deg, #9e1b32, #6d0119);
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.tt-drawer__promo b { font-size: .84rem; }
.tt-drawer__promo p { margin: 0 0 .5rem; font-size: .68rem; color: rgba(255, 255, 255, .8); }
.tt-drawer__promo-emoji { position: absolute; top: .6rem; inset-inline-end: .8rem; font-size: 1.6rem; animation: tt-bob 4s ease-in-out infinite; }
.tt-drawer__theme { font-size: .74rem; font-weight: 700; color: var(--tt-text-2); justify-content: space-between; padding: .35rem .2rem; }

/* Search overlay */
.tt-search {
    position: fixed;
    inset: 0;
    z-index: 130;
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
}
.tt-search__scrim {
    position: absolute;
    inset: 0;
    background: rgba(20, 8, 12, .55);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity var(--tt-t);
}
.tt-search__panel {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin-top: 8vh;
    background: var(--tt-surface);
    border-radius: var(--tt-r-lg);
    border: 1.5px solid var(--tt-glass-line);
    box-shadow: var(--tt-sh-lg);
    padding: .8rem;
    transform: translateY(-14px) scale(.98);
    opacity: 0;
    transition: all var(--tt-t) var(--tt-ease-bounce);
}
.tt-search.is-open { pointer-events: auto; }
.tt-search.is-open .tt-search__scrim { opacity: 1; }
.tt-search.is-open .tt-search__panel { transform: translateY(0) scale(1); opacity: 1; }

.tt-search__form {
    position: relative;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .5rem .35rem 1rem;
    border-radius: var(--tt-r-full);
    background: var(--tt-surface-2);
    border: 1.5px solid var(--tt-line);
}
.tt-search__form > .material-symbols-outlined { color: var(--tt-text-3); font-size: 1.25rem; }
.tt-search__form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--tt-text);
    padding: .65rem 0;
    font-size: .88rem;
    font-weight: 600;
}
.tt-search__form input:focus { outline: none; }
.tt-search__close {
    width: 36px; height: 36px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: var(--tt-surface);
    color: var(--tt-text-2);
    display: grid; place-items: center;
}
.tt-search__body { padding: .85rem .4rem .3rem; }
.tt-search__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.tt-search__results { display: flex; flex-direction: column; gap: .35rem; max-height: 50vh; overflow-y: auto; }
.tt-search__item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .7rem;
    border-radius: var(--tt-r-sm);
    color: var(--tt-text-2);
    font-size: .8rem;
    font-weight: 700;
    transition: background var(--tt-t-fast);
}
.tt-search__item:hover { background: var(--tt-surface-2); color: var(--tt-primary); }
.tt-search__item .material-symbols-outlined { font-size: 1.15rem; color: var(--tt-primary); }
.tt-search__item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Layouts */
.tt-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.tt-sidebar { display: flex; flex-direction: column; gap: .2rem; }
@media (min-width: 1024px) {
    .tt-layout--sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
    .tt-sidebar { position: sticky; top: calc(var(--tt-header-h) + 1rem); }
}

/* Empty state */
.tt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-align: center;
    padding: 2.5rem 1.25rem;
    border-radius: var(--tt-r-md);
    background: var(--tt-surface);
    border: 1.5px dashed var(--tt-line-strong);
}
.tt-empty > .material-symbols-outlined {
    font-size: 2.6rem;
    color: var(--tt-primary);
    width: 68px; height: 68px;
    display: grid; place-items: center;
    border-radius: 24px;
    background: var(--tt-surface-2);
    margin-bottom: .35rem;
}
.tt-empty h3 { margin: 0; font-size: .95rem; }
.tt-empty p { margin: 0 0 .75rem; font-size: .78rem; color: var(--tt-text-3); max-width: 40ch; }
.tt-empty__emoji {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 26px;
    font-size: 2.2rem;
    margin-bottom: .5rem;
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 183, 3, .38), transparent 60%),
        radial-gradient(circle at 76% 80%, rgba(0, 168, 232, .3), transparent 58%),
        var(--tt-surface-2);
    animation: tt-float 4.5s ease-in-out infinite;
}
.tt-empty--cart { padding: 2.75rem 1.25rem; }
.tt-empty--cart .tt-btn { margin-top: .25rem; }

/* Teachers grid on mobile */
.tt-teachers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .tt-teachers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Blog list */
.tt-bloglist { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tt-bloglist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Share row */
.tt-share {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--tt-line);
    font-size: .72rem;
    font-weight: 700;
    color: var(--tt-text-3);
}
.tt-share a {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--tt-surface-2);
    color: var(--tt-text-2);
    transition: all var(--tt-t-fast) var(--tt-ease-bounce);
}
.tt-share a:hover { background: var(--tt-primary); color: #fff; transform: translateY(-2px); }
.tt-share .material-symbols-outlined { font-size: 1.05rem; }

/* Post navigation.
   `the_post_navigation()` wraps both links in a single `.nav-links` div, so
   the grid belongs there — putting it on the <nav> leaves one child and the
   two cards stack. */
.tt-postnav { margin-top: 1.5rem; }
.tt-postnav .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    align-items: stretch;
}
.tt-postnav .nav-previous,
.tt-postnav .nav-next { min-width: 0; display: flex; }
.tt-postnav a {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .8rem 1rem;
    border-radius: var(--tt-r);
    background: var(--tt-surface);
    border: 1.5px solid var(--tt-line);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--tt-text-2);
    overflow-wrap: anywhere;
    transition: all var(--tt-t-fast);
}
.tt-postnav a:hover { border-color: var(--tt-primary); color: var(--tt-primary); transform: translateY(-2px); box-shadow: var(--tt-sh-sm); }
.tt-postnav small { font-size: .6rem; color: var(--tt-text-3); font-weight: 700; }
.tt-postnav .nav-next { text-align: end; }
.tt-postnav .nav-next a { align-items: flex-end; }
@media (max-width: 480px) {
    .tt-postnav .nav-links { grid-template-columns: 1fr; }
    .tt-postnav .nav-next { text-align: start; }
    .tt-postnav .nav-next a { align-items: flex-start; }
}

/* Contact card */
.tt-contact-card { display: flex; align-items: center; gap: .7rem; }
.tt-contact-card__icon {
    width: 42px; height: 42px;
    flex: 0 0 auto;
    border-radius: 14px;
    display: grid; place-items: center;
    font-size: 1.2rem;
}
.tt-contact-card--mint .tt-contact-card__icon { background: color-mix(in srgb, var(--tt-mint) 18%, transparent); color: #12796e; }
.tt-contact-card--azure .tt-contact-card__icon { background: color-mix(in srgb, var(--tt-azure) 16%, transparent); color: #00719c; }
.tt-contact-card--gold .tt-contact-card__icon { background: color-mix(in srgb, var(--tt-gold) 22%, transparent); color: #8a6100; }
.tt-contact-card--pink .tt-contact-card__icon { background: color-mix(in srgb, var(--tt-pink) 14%, transparent); color: #b3135f; }
html[data-theme="dark"] .tt-contact-card__icon { background: var(--tt-surface-3) !important; color: var(--tt-text) !important; }
.tt-contact-card b { display: block; font-size: .72rem; color: var(--tt-text-3); font-weight: 700; }
.tt-contact-card a, .tt-contact-card span { font-size: .82rem; font-weight: 800; color: var(--tt-text); }

/* Widget CTA */
.tt-widget--cta { background: linear-gradient(150deg, var(--tt-surface), color-mix(in srgb, var(--tt-gold) 12%, var(--tt-surface))); }

/* ==========================================================================
   Tutor dashboard hero
   ========================================================================== */
.tt-dash-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--tt-r-lg);
    padding: 1.1rem;
    margin-bottom: 1.25rem;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(255, 183, 3, .32), transparent 55%),
        linear-gradient(135deg, #a51f37, #6d0119 70%, #4c0010);
    color: #fff;
    box-shadow: 0 22px 44px -20px rgba(123, 0, 31, .55);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.tt-dash-hero__orbs i {
    position: absolute;
    border-radius: 50%;
    filter: blur(34px);
    pointer-events: none;
}
.tt-dash-hero__orbs i:nth-child(1) { width: 160px; height: 160px; background: rgba(255, 215, 94, .4); top: -60px; inset-inline-end: -40px; }
.tt-dash-hero__orbs i:nth-child(2) { width: 140px; height: 140px; background: rgba(0, 168, 232, .35); bottom: -70px; inset-inline-start: 20%; }
.tt-dash-hero__orbs i:nth-child(3) { width: 100px; height: 100px; background: rgba(247, 37, 133, .3); top: 30%; inset-inline-start: -40px; }

.tt-dash-hero__main { position: relative; display: flex; align-items: flex-start; gap: .8rem; }
.tt-dash-hero__avatar { position: relative; flex: 0 0 auto; }
.tt-dash-hero__avatar img,
.tt-dash-hero__avatar .tt-avatar-initial {
    width: 62px; height: 62px;
    border-radius: 22px;
    object-fit: cover;
    border: 2.5px solid rgba(255, 255, 255, .5);
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .5);
    font-size: 1.4rem;
}
.tt-dash-hero__level {
    position: absolute;
    bottom: -6px;
    inset-inline-end: -6px;
    min-width: 24px; height: 24px;
    padding: 0 4px;
    border-radius: 99px;
    background: linear-gradient(135deg, #ffd75e, #ffb703);
    color: #402d00;
    font-size: .66rem;
    font-weight: 900;
    display: grid; place-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
    border: 2px solid #7b001f;
}
.tt-dash-hero__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.tt-dash-hero__hello { font-size: .68rem; color: rgba(255, 255, 255, .75); font-weight: 700; }
.tt-dash-hero__text h2 {
    margin: 0;
    font-size: clamp(.95rem, 3.6vw, 1.25rem);
    color: #fff;
    line-height: 1.6;
    font-weight: 800;
}
.tt-dash-hero__chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.tt-dash-hero__chips .tt-chip { font-size: .62rem; padding: .25rem .55rem; background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.tt-dash-hero__chips .tt-chip .material-symbols-outlined { color: #ffd75e; font-size: .9rem; }
.tt-dash-hero__xp { margin-top: .3rem; display: flex; flex-direction: column; gap: .3rem; }
.tt-dash-hero__xp small { font-size: .6rem; color: rgba(255, 255, 255, .78); font-weight: 700; }
.tt-dash-hero__xp .tt-between { gap: .5rem; }
.tt-dash-hero__xp .tt-bar { background: rgba(255, 255, 255, .2); height: 7px; }

.tt-dash-hero__side { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tt-dash-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    padding: .6rem .4rem;
    border-radius: var(--tt-r);
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    text-align: center;
    transition: background var(--tt-t-fast), transform var(--tt-t-fast);
}
.tt-dash-stat:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-2px); }
.tt-dash-stat .material-symbols-outlined { font-size: 1.2rem; color: #ffd75e; }
.tt-dash-stat b { font-size: 1.05rem; font-weight: 900; line-height: 1.3; }
.tt-dash-stat small { font-size: .58rem; color: rgba(255, 255, 255, .75); }

.tt-actions--dash { margin-bottom: 1.25rem; }

@media (min-width: 768px) {
    .tt-dash-hero { padding: 1.5rem; flex-direction: row; align-items: center; justify-content: space-between; }
    .tt-dash-hero__main { flex: 1; }
    .tt-dash-hero__avatar img, .tt-dash-hero__avatar .tt-avatar-initial { width: 76px; height: 76px; border-radius: 26px; }
    .tt-dash-hero__side { grid-template-columns: 1fr 1fr; width: 240px; flex: 0 0 auto; }
}

/* ==========================================================================
   Course archive hero
   ========================================================================== */
.tt-archive-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    margin-bottom: 1.5rem;
    border-radius: var(--tt-r-lg);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(255, 183, 3, .25), transparent 58%),
        linear-gradient(135deg, color-mix(in srgb, var(--tt-primary) 9%, var(--tt-surface)), var(--tt-surface) 65%);
    border: 1.5px solid var(--tt-line);
    overflow: hidden;
}
.tt-archive-hero__text { position: relative; display: flex; flex-direction: column; gap: .45rem; }
.tt-archive-hero__text h1 { margin: 0; font-size: clamp(1.2rem, 4vw, 1.85rem); }
.tt-archive-hero__text p { margin: 0; font-size: .8rem; color: var(--tt-text-3); line-height: 2; max-width: 60ch; }
.tt-archive-hero__chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tt-archive-hero__art {
    font-size: clamp(2.6rem, 10vw, 4rem);
    line-height: 1;
    animation: tt-bob 5s ease-in-out infinite;
    filter: drop-shadow(0 12px 18px rgba(158, 27, 50, .25));
    display: none;
}
@media (min-width: 640px) { .tt-archive-hero { padding: 1.75rem 2rem; } .tt-archive-hero__art { display: block; } }

/* Global boxed wrappers for Tutor/Woo on small screens */
.tt-woo .woocommerce-message,
.tt-woo .woocommerce-info,
.tt-woo .woocommerce-error {
    border-radius: var(--tt-r);
    border: 1.5px solid var(--tt-line);
    background: var(--tt-surface);
    color: var(--tt-text-2);
    font-size: .8rem;
    padding: 1rem 1.1rem;
    box-shadow: var(--tt-sh-xs);
}
.tt-woo .woocommerce-message::before,
.tt-woo .woocommerce-info::before { color: var(--tt-mint); }
.tt-woo .woocommerce-error::before { color: #e63946; }
.tt-woo .woocommerce-error { border-color: color-mix(in srgb, #e63946 30%, var(--tt-line)); }
