/* =============================================================================
   Header CSS — WeAreInvictus210
   ============================================================================= */

/* ── Safe area: push header below status bar (viewport-fit=cover) ── */
:root {
    --inv-sat: env(safe-area-inset-top, 0px);
    --inv-header-h: calc(64px + var(--inv-sat));
}

.inv-site-header {
    height: var(--inv-header-h);
    padding-top: var(--inv-sat);
    transition: transform 0.3s ease;
}
.inv-site-header.inv-nav-hidden {
    transform: translateY(-100%);
}

/* ── Desktop nav buttons ────────────────────────────────────────────────────── */
.inv-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c8cce8;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.inv-nav-btn:hover,
.inv-nav-btn[aria-expanded="true"] { color: #ffffff; }

/* Members variant — amber-flame color */
.inv-nav-btn--members              { color: #f59e0b; }
.inv-nav-btn--members:hover,
.inv-nav-btn--members[aria-expanded="true"] { color: #fbbf24; }

/* Navbar profile dropdown */
.inv-nav-profile-dropdown {
    display: block;
}

/* Navbar profile button — avatar + name */
.inv-nav-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #c8cce8;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.inv-nav-profile-btn:hover,
.inv-nav-profile-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}
.inv-nav-profile-btn__name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-nav-profile-btn .inv-avatar-wrap { flex-shrink: 0; }
.inv-nav-profile-btn .inv-chevron { width: 12px; height: 12px; opacity: 0.5; }

/* Profile dropdown panel — wider */
.inv-dropdown__panel--profile { width: 280px; padding: 0; }

.inv-nav-profile-card {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.inv-nav-profile-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.inv-nav-profile-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.inv-nav-profile-card__name {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #f0f4ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inv-nav-profile-card__badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid;
    width: fit-content;
}
.inv-nav-profile-card__since {
    font-size: 0.6rem;
    color: #3d4560;
    margin: 0;
}
.inv-nav-profile-card__kingdom {
    font-size: 0.65rem;
    color: #6b7494;
    margin: 4px 0 0;
}
.inv-nav-profile-card__stats {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    color: #6b7494;
    margin-top: 8px;
}
.inv-nav-profile-card__stats strong { color: #c8cce8; }

.inv-nav-profile-links { padding: 6px 0; }
.inv-nav-profile-links .inv-dropdown__item { padding: 8px 16px; }

/* Sword icon — sized to match text line-height */
.inv-sword-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ── War Pets nav CTA (desktop) ─────────────────────────────────────────────── */
.inv-nav-pets-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #f472b6;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(244, 114, 182, 0.25);
    background: rgba(244, 114, 182, 0.06);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.inv-nav-pets-cta:hover {
    color: #fb7bb8;
    border-color: rgba(244, 114, 182, 0.4);
    background: rgba(244, 114, 182, 0.1);
}
.inv-nav-pets-cta__icon {
    font-size: 0.85rem;
    line-height: 1;
}
.inv-nav-pets-cta__text {
    line-height: 1;
}
.inv-nav-pets-cta__badge {
    font-size: 0.5rem;
    font-weight: 700;
    color: #080d1a;
    background: #f472b6;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

/* ── Pet Arena nav link ────────────────────────────────────────────────────── */
.inv-nav-arena-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #f59e0b;
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid rgba(245, 158, 11, 0.25);
	background: rgba(245, 158, 11, 0.06);
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.inv-nav-arena-link:hover {
	color: #fbbf24;
	border-color: rgba(245, 158, 11, 0.4);
	background: rgba(245, 158, 11, 0.1);
}

/* ── War Pets mobile link ──────────────────────────────────────────────────── */
.inv-mobile-link--pets {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    color: #f472b6 !important;
}
.inv-mobile-link__new {
    font-size: 0.5rem;
    font-weight: 700;
    color: #080d1a;
    background: #f472b6;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}

/* ── Chevron ────────────────────────────────────────────────────────────────── */
.inv-chevron {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.inv-nav-btn[aria-expanded="true"]    .inv-chevron { transform: rotate(180deg); }
.inv-mob-toggle[aria-expanded="true"] .inv-chevron { transform: rotate(180deg); }

/* ── Desktop dropdowns ──────────────────────────────────────────────────────── */
.inv-dropdown {
    position: relative;
}

.inv-dropdown__panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 164px;
    background: #0d1529;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 100;
}

.inv-dropdown__panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-70%) translateY(0);
}

/* Triangle connector — prevents hover gap between button and panel */
.inv-dropdown__panel::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.inv-dropdown__item {
    display: block;
    padding: 8px 14px;
    font-size: 0.73rem;
    font-weight: 500;
    color: #c8cce8;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.inv-dropdown__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* ── Create Lineup CTA ──────────────────────────────────────────────────────── */
.inv-header-cta {
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 14px;
    background: #f59e0b;
    color: #000;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.inv-header-cta:hover {
    opacity: 0.85;
    color: #000;
}

.inv-header-cta svg {
    flex-shrink: 0;
}

/* ── Hamburger ──────────────────────────────────────────────────────────────── */

/* Site logo */
.inv-header-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(1.5);
}

/* Mobile header: left group + centered logo + right group */
.inv-header-left-mobile {
    display: none;
}

@media (max-width: 767px) {
    .inv-header-left-mobile {
        display: flex;
        align-items: center;
        gap: 2px;
        flex: 1;
    }
    .inv-header-logo {
        width: 32px;
        height: 32px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    #invictus-site-header .inv-header-logo-text,
    #invictus-site-header .inv-header-beta {
        display: none !important;
    }
    /* Right side items take equal flex space to balance logo center */
    .inv-header-store-link,
    .inv-nav-profile-dropdown {
        flex: 0 0 auto;
    }
}

.inv-search-mobile-trigger-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}

.inv-search-mobile-trigger-left:hover {
    color: #fff;
}

.inv-ham-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

#invictus-hamburger[aria-expanded="true"] .inv-ham-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#invictus-hamburger[aria-expanded="true"] .inv-ham-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#invictus-hamburger[aria-expanded="true"] .inv-ham-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav — full-screen overlay ───────────────────────────────────────── */
.inv-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #080d1a;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.inv-mobile-overlay.is-open {
    display: flex;
    animation: invOverlayIn 0.25s ease forwards;
}

@keyframes invOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .inv-mobile-overlay { display: none !important; }
}

/* Overlay header — logo + close button */
.inv-mobile-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    padding-top: var(--inv-sat, env(safe-area-inset-top, 0px));
    height: calc(64px + var(--inv-sat, env(safe-area-inset-top, 0px)));
    flex-shrink: 0;
}

.inv-mobile-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.inv-mobile-overlay__close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* Overlay body — scrollable content */
.inv-mobile-overlay__body {
    flex: 1;
    padding: 8px 24px 24px;
    overflow-y: auto;
}

/* ── Upgrade CTA (mobile) ── */
.inv-mobile-upgrade-cta {
    display: block;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.03));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
}

.inv-mobile-upgrade-cta__header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.inv-mobile-upgrade-cta__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inv-mobile-upgrade-cta__perks {
    font-size: 0.72rem;
    color: #8b90b0;
    line-height: 1.3;
    margin-bottom: 8px;
}

.inv-mobile-upgrade-cta__btn,
.inv-upgrade-cta__btn {
    display: block;
    text-align: center;
    background: linear-gradient(90deg, #f59e0b, #a855f7);
    background-size: 200% 100%;
    animation: invGradientShift 9s ease infinite;
    color: #080d1a;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
}

@keyframes invGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Mobile translate flag button ── */
.inv-mobile-translate-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    transition: background 0.15s;
    align-self: center;
}

.inv-mobile-translate-flag:hover {
    background: rgba(255, 255, 255, 0.08);
}

.inv-mobile-translate-flag.is-translated {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

/* ── User card ── */
.inv-mobile-user-card {
    background: #111827;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-mobile-user-card__name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.inv-mobile-user-card__stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}

.inv-mobile-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #c8cce8;
}

.inv-mobile-user-card__notif {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: #f59e0b;
}

/* ── Nav sections ── */
.inv-mobile-section {
    margin-bottom: 20px;
}

.inv-mobile-section__header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b7494;
    padding: 0 4px 8px;
}

.inv-mobile-section__header--members {
    color: #f59e0b;
}

.inv-mobile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 12px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #c8cce8;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s ease, color 0.12s ease;
}

.inv-mobile-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.6;
}

.inv-mobile-link:hover,
.inv-mobile-link:active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.inv-mobile-link:hover svg {
    opacity: 1;
}

/* ── PWA Install Button ── */
.inv-pwa-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    color: #f59e0b;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.inv-pwa-install-btn:hover,
.inv-pwa-install-btn:active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(59, 130, 246, 0.25));
    border-color: rgba(245, 158, 11, 0.5);
}

.inv-pwa-install-btn svg {
    flex-shrink: 0;
    color: #f59e0b;
}

/* ── PWA Install Guide Modal ── */
.inv-install-guide {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    animation: invFadeIn 0.2s ease;
}

@keyframes invFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.inv-install-guide__card {
    background: #111827;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 100%;
    position: relative;
    margin-bottom: env(safe-area-inset-bottom, 0px);
    animation: invSlideUp 0.3s ease;
}

@keyframes invSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.inv-install-guide__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #6b7494;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.inv-install-guide__icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.inv-install-guide__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f0f4ff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.inv-install-guide__desc {
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 16px;
}

.inv-install-guide__steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0 0 12px;
}

.inv-install-guide__steps li {
    counter-increment: step;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #cbd5e1;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-install-guide__steps li:last-child {
    border-bottom: none;
}

.inv-install-guide__steps li::before {
    content: counter(step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-install-guide__steps li strong {
    color: #f59e0b;
}

.inv-install-guide__note {
    font-size: 0.7rem;
    color: #6b7494;
    text-align: center;
    margin: 8px 0 0;
    font-style: italic;
}

/* ── Bottom CTAs ── */
.inv-mobile-overlay__footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    position: sticky;
    bottom: 0;
    background: #080d1a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 2;
}

.inv-mobile-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.inv-mobile-cta--outline {
    border: 1.5px solid #f59e0b;
    color: #f59e0b;
    background: transparent;
}

.inv-mobile-cta--outline:hover {
    background: rgba(245, 158, 11, 0.1);
}

.inv-mobile-cta--filled {
    border: none;
    background: #f59e0b;
    color: #000000;
}

.inv-mobile-cta--filled:hover {
    opacity: 0.85;
}

.inv-mobile-cta--ghost {
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: #6b7494;
    background: transparent;
}

.inv-mobile-cta--ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #8890b4;
}

/* ── Modals — visibility ────────────────────────────────────────────────────── */
/* Hidden by default: ID selector (1-0-0) beats Tailwind's .flex (0-1-0).      */
/* Open state: ID + class (1-1-0) beats the default rule (1-0-0).              */
#invictus-login-modal,
#invictus-community-modal { display: none; }

#invictus-login-modal.is-open,
#invictus-community-modal.is-open { display: flex; }

.inv-modal__box {
    animation: invModalIn 0.2s ease;
}

@keyframes invModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* ── Currency badges (header) ──────────────────────────────────────────────── */
.inv-header-currencies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inv-coin-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 26px;
    padding: 0 8px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.inv-coin-badge:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.inv-coin-badge--glory {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.inv-coin-badge--glory:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.inv-coin-badge__icon {
    font-size: 0.75rem;
    line-height: 1;
}

.inv-coin-badge__amount {
    letter-spacing: 0.02em;
}

.inv-coin-badge__label {
    font-weight: 600;
    font-size: 0.58rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 479px) {
    .inv-coin-badge__label {
        display: none;
    }
}

/* ── Mobile logged-in: hide overflow items to keep hamburger visible ──── */
@media (max-width: 767px) {
    .inv-coin-badge { display: none !important; }
    .inv-nav-profile-btn__name { display: none !important; }
    .inv-nav-profile-btn .inv-chevron { display: none !important; }
    #invictus-site-header .inv-header-beta { display: none !important; }
    .inv-nav-profile-btn { background: none; border: none; padding: 2px; }
}

/* ── Notification bell ──────────────────────────────────────────────────────── */
.inv-notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s;
}

.inv-notif-bell:hover {
    color: rgba(255, 255, 255, 0.9);
}

.inv-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 1.5px solid #080d1a;
}

/* ── Notification panel ────────────────────────────────────────────────────── */

/* ── Translate dropdown ── */
.inv-translate-wrap {
    position: relative;
}

@media (max-width: 767px) {
    .inv-translate-wrap {
        display: none;
    }
}

.inv-translate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.inv-translate-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.inv-translate-btn.is-translated {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.inv-translate-btn__flag {
    font-size: 1.25rem;
    line-height: 1;
}

.inv-translate-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    max-height: 400px;
    overflow-y: auto;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 6px;
    z-index: 110;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.inv-translate-panel__title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7494;
    padding: 4px 10px 8px;
}

.inv-translate-panel__langs {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.inv-translate-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    background: none;
    border: none;
    color: #c8cce8;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.inv-translate-lang__flag {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.inv-translate-lang:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.inv-translate-lang.is-active {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.inv-notif-wrap {
    position: relative;
}

.inv-notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 200;
}

.inv-notif-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.inv-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-notif-header span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#inv-notif-mark-read {
    font-size: 0.68rem;
    font-weight: 500;
    color: #f59e0b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

#inv-notif-mark-read:hover {
    color: #fbbf24;
}

.inv-notif-list {
    max-height: 340px;
    overflow-y: auto;
}

.inv-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.12s ease;
}

.inv-notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.inv-notif-item--unread {
    border-left: 3px solid #f59e0b;
    padding-left: 11px;
}

.inv-notif-icon {
    flex-shrink: 0;
    width: 24px;
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
}

.inv-notif-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.inv-notif-title {
    font-size: 0.78rem;
    font-weight: 500;
    color: #c8cce8;
    line-height: 1.35;
}

.inv-notif-time {
    font-size: 0.68rem;
    color: #6b7494;
}

.inv-notif-empty {
    text-align: center;
    padding: 32px 14px;
    font-size: 0.78rem;
    color: #6b7494;
    margin: 0;
}

/* Mobile — full-width slide-down notification panel */
@media (max-width: 767px) {
    .inv-notif-panel {
        position: fixed;
        top: var(--inv-header-h, 64px);
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        border-radius: 0 0 12px 12px;
        border-top: none;
        transform: translateY(-6px);
    }

    .inv-notif-panel.is-open {
        transform: translateY(0);
    }
}

/* =============================================================================
   Contextual Search Bar
   ============================================================================= */

.inv-search-wrap {
    position: relative;
}

.inv-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7494;
    pointer-events: none;
}

.inv-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 36px;
    background: rgba(13, 21, 41, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.inv-search-input:focus {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(13, 21, 41, 1);
}

.inv-search-input::placeholder {
    color: #4b5563;
}

/* ── Search results dropdown ── */
.inv-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    padding: 4px;
}

.inv-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #c8cce8;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}

.inv-search-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.inv-search-item__thumb {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1a2235;
}

.inv-search-item__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.inv-search-item__title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Lineup card variant */
.inv-search-item--lineup {
    align-items: flex-start;
}

.inv-search-item__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.inv-search-item__meta {
    font-size: 0.62rem;
    color: #6b7494;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Commander avatar stack */
.inv-search-cmd-stack {
    display: flex;
    flex-shrink: 0;
}

.inv-search-cmd-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0d1424;
    background: #1a2235;
}

.inv-search-cmd-avatar + .inv-search-cmd-avatar {
    margin-left: -8px;
}

/* User avatar with frame */
.inv-search-user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.inv-search-user-avatar__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #1a2235;
}

.inv-search-user-avatar__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a2235;
    font-size: 0.85rem;
}

.inv-search-user-avatar__frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    object-fit: contain;
}

.inv-search-group__label {
    display: block;
    padding: 8px 12px 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7494;
}

.inv-search-loading,
.inv-search-empty {
    padding: 20px 12px;
    text-align: center;
    font-size: 0.78rem;
    color: #6b7494;
}

/* ── Mobile search trigger (icon button) ── */
.inv-search-mobile-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s;
    flex-shrink: 0;
}

.inv-search-mobile-trigger:hover {
    color: #fff;
}

/* ── Mobile search overlay (full-width bar over header) ── */
.inv-search-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #080d1a;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
}

.inv-search-mobile-overlay.is-open {
    display: flex;
}

.inv-search-mobile-overlay__bar {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 12px;
    gap: 8px;
    position: relative;
}

.inv-search-mobile-overlay__bar .inv-search-icon {
    left: 24px;
}

.inv-search-mobile-overlay__bar .inv-search-input {
    flex: 1;
    height: 40px;
    font-size: 16px;
}

.inv-search-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 6px;
}

.inv-search-mobile-close:hover {
    color: #fff;
}

.inv-search-mobile-overlay .inv-search-results {
    position: static;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-left: none;
    border-right: none;
    border-bottom: none;
    max-height: calc(100dvh - 64px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Hide trigger on desktop */
@media (min-width: 768px) {
    .inv-search-mobile-trigger { display: none !important; }
    .inv-search-mobile-overlay { display: none !important; }
}

/* =============================================================================
   Language Switcher — Dropdown (Polylang)
   ============================================================================= */

.inv-lang-drop {
    position: relative;
    flex-shrink: 0;
}

/* ── Trigger button ── */
.inv-lang-drop__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #c8cce8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.inv-lang-drop__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.inv-lang-drop__btn[aria-expanded="true"] {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.inv-lang-drop__btn .inv-chevron {
    width: 12px;
    height: 12px;
}

/* ── Flag image ── */
.inv-lang-drop__flag {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

/* ── Language code ── */
.inv-lang-drop__code {
    font-family: 'Inter', sans-serif;
}

/* ── Dropdown panel ── */
.inv-lang-drop__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    max-height: 320px;
    overflow-y: auto;
    background: #0d1529;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 200;
}

.inv-lang-drop__panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Bridge gap between button and panel */
.inv-lang-drop__panel::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

/* ── Language item ── */
.inv-lang-drop__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #c8cce8;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.inv-lang-drop__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.inv-lang-drop__item--active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}

.inv-lang-drop__item--active:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

/* ── Mobile variant ── */
.inv-lang-drop--mobile {
    display: flex;
    justify-content: center;
    padding: 12px 24px 4px;
}

.inv-lang-drop__btn--mobile {
    height: 36px;
    padding: 0 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.inv-lang-drop__panel--mobile {
    position: absolute;
    bottom: calc(100% + 8px);
    top: auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(6px);
    max-height: 50vh;
}

.inv-lang-drop__panel--mobile.is-open {
    transform: translateX(-50%) translateY(0);
}

.inv-lang-drop__panel--mobile::before {
    top: auto;
    bottom: -8px;
    height: 8px;
}

/* =============================================================================
   Header Beta Badge
   ============================================================================= */
.inv-header-beta {
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.4;
    vertical-align: middle;
    margin-top: -2px;
    opacity: 0.7;
}

/* =============================================================================
   Logged-in: hide header nav (sidebar takes over)
   ============================================================================= */
@media (min-width: 768px) {
    body.inv-logged-in #invictus-desktop-nav { display: none !important; }
    body.inv-logged-in .inv-header-cta { display: none !important; }
    body.inv-logged-in .inv-search-wrap { max-width: 600px; flex: 1; }
    body.inv-logged-in .inv-header-heroes-nav { display: flex !important; }
}

/* =============================================================================
   Heroes Section Tabs — subtle sub-navigation
   ============================================================================= */
.inv-heroes-tabs {
    display: flex;
    align-items: center;
    position: fixed;
    top: var(--inv-header-h, 64px);
    left: var(--inv-sidebar-w, 0px);
    right: var(--inv-right-w, 0px);
    z-index: 25;
    background: rgba(8, 13, 26, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), right 0.28s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s ease, transform 0.3s ease;
}
.inv-heroes-tabs.inv-nav-hidden {
    top: 0;
    transform: translateY(-100%);
}

.inv-heroes-tabs::-webkit-scrollbar {
    display: none;
}

.inv-heroes-tabs__link {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7494;
    text-decoration: none;
    padding: 0.6rem 1rem;
    position: relative;
    transition: color 0.15s;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}

.inv-heroes-tabs__link:hover {
    color: #c8cce8;
}

.inv-heroes-tabs__link.is-active {
    color: #f59e0b;
}

/* Push content below fixed tab bar (~40px tab height) */
#inv-heroes-page,
#inv-updates-page {
    padding-top: 44px;
}

/* Updates tabs — same pattern as heroes tabs */
.inv-updates-tabs {
    display: flex;
    align-items: center;
    position: fixed;
    top: var(--inv-header-h, 64px);
    left: var(--inv-sidebar-w, 0px);
    right: var(--inv-right-w, 0px);
    z-index: 25;
    background: rgba(8, 13, 26, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), right 0.28s cubic-bezier(0.4, 0, 0.2, 1), top 0.3s ease, transform 0.3s ease;
}

.inv-updates-tabs.inv-nav-hidden {
    top: 0;
    transform: translateY(-100%);
}

.inv-updates-tabs::-webkit-scrollbar {
    display: none;
}

/* Tab panels — show/hide */
.inv-updates-tab-panel {
    display: none;
}

.inv-updates-tab-panel.is-active {
    display: block;
}

/* Hide section headers inside unified page — tab bar already shows which section */
#inv-heroes-page .inv-heroes-tab-panel header {
    display: none;
}

/* Tab panels — show/hide */
.inv-heroes-tab-panel {
    display: none;
}

.inv-heroes-tab-panel.is-active {
    display: block;
}

/* Active tab underline */
.inv-heroes-tabs__link.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #f59e0b;
}

.inv-heroes-tabs__link.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: #f59e0b;
}

/* =============================================================================
   Announcement Popover — Sidebar (desktop)
   ============================================================================= */
.inv-sidebar__ann-wrap {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.inv-sidebar__ann-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    color: #f59e0b;
    cursor: pointer;
    position: relative;
    transition: background 0.15s, transform 0.15s;
}

.inv-sidebar__ann-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.05);
}

.inv-sidebar__ann-btn svg {
    width: 20px;
    height: 20px;
}

.inv-sidebar__ann-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Popover panel ── */
.inv-ann-popover {
    display: none;
    position: fixed;
    left: calc(var(--inv-sidebar-w, 64px) + 10px);
    bottom: 16px;
    width: 320px;
    background: #0f1629;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
    overflow: hidden;
    animation: inv-ann-pop-in 0.2s ease-out;
}

.inv-ann-popover--open {
    display: block;
}

@keyframes inv-ann-pop-in {
    from { opacity: 0; transform: translateX(-8px) scale(0.96); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

.inv-ann-popover__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--wp--preset--font-family--rajdhani, 'Rajdhani', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.inv-ann-popover__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.12s;
}

.inv-ann-popover__close:hover {
    color: #fff;
}

.inv-ann-popover__list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inv-ann-popover__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #3d4560;
}

.inv-ann-popover__item--info    { border-left-color: #3b82f6; }
.inv-ann-popover__item--event   { border-left-color: #f59e0b; }
.inv-ann-popover__item--warning { border-left-color: #ef4444; }
.inv-ann-popover__item--update  { border-left-color: #22c55e; }

.inv-ann-popover__icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.inv-ann-popover__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.inv-ann-popover__title {
    font-family: var(--wp--preset--font-family--rajdhani, 'Rajdhani', sans-serif);
    font-size: 0.88rem;
    font-weight: 700;
    color: #f0f4ff;
    line-height: 1.3;
}

.inv-ann-popover__msg {
    font-size: 0.72rem;
    color: #6b7494;
    line-height: 1.5;
}

.inv-ann-popover__item--linked {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.inv-ann-popover__item--linked:hover {
    background: rgba(255, 255, 255, 0.07);
}

.inv-ann-link {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.inv-ann-link:hover {
    color: #60a5fa;
}

/* Hide sidebar announcement stuff when expanded — shown in quick-nav instead */
.inv-sidebar--expanded .inv-sidebar__ann-wrap .inv-sidebar__ann-btn {
    width: 100%;
    border-radius: 8px;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 14px;
    height: auto;
}

/* =============================================================================
   Announcement FAB — Mobile
   ============================================================================= */
.inv-ann-fab {
    position: fixed;
    bottom: 20px;
    left: 16px;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, background 0.15s;
}

.inv-ann-fab:active {
    transform: scale(0.92);
}

.inv-ann-fab svg {
    width: 20px;
    height: 20px;
}

.inv-ann-fab__dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.inv-ann-fab-panel {
    display: none;
    position: fixed;
    bottom: 72px;
    left: 12px;
    right: 12px;
    max-width: 400px;
    background: #0f1629;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 91;
    overflow: hidden;
    animation: inv-ann-fab-in 0.2s ease-out;
}

.inv-ann-fab-panel--open {
    display: block;
}

@keyframes inv-ann-fab-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hide FAB on desktop — sidebar has its own announcement button */
@media (min-width: 768px) {
    .inv-ann-fab,
    .inv-ann-fab-panel {
        display: none !important;
    }
}

/* =============================================================================
   Mobile Bottom Nav Bar
   ============================================================================= */
.inv-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 49;
    background: #0a1128;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    transition: transform 0.3s ease;
}
.inv-bottom-nav.inv-nav-hidden {
    transform: translateY(100%);
}

.inv-bottom-nav__border {
    height: 1px;
    background: linear-gradient(90deg, rgba(245,158,11,0.25), rgba(59,130,246,0.25), rgba(245,158,11,0.25));
}

.inv-bottom-nav__tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    min-height: 56px;
    padding: 6px 6px 6px 6px;
}

.inv-bottom-nav__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    min-height: 44px;
    color: #64748b;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
    padding: 0;
}

.inv-bottom-nav__tab:hover,
.inv-bottom-nav__tab:active {
    color: #94a3b8;
}

.inv-bottom-nav__tab.is-active {
    color: #f59e0b;
}

.inv-bottom-nav__tab {
    position: relative;
}

.inv-bottom-nav__tab--create {
    flex: 0 0 auto !important;
    width: 56px;
    margin: 0 4px;
}

.inv-bottom-nav__create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
    transform: translateY(-4px);
    transition: transform 0.15s, box-shadow 0.15s;
}

.inv-bottom-nav__tab--create:active .inv-bottom-nav__create-btn {
    transform: translateY(-6px);
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.25);
}

.inv-bottom-nav__tab--store {
    color: #ec4899;
}

.inv-bottom-nav__tab--store.is-active {
    color: #f472b6;
}

.inv-bottom-nav__tab--store-new {
    color: #ec4899;
}

.inv-bottom-nav__store-new {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    font-size: 0.4rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ec4899;
    pointer-events: none;
    line-height: 1;
}

.inv-bottom-nav__badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 16px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.inv-bottom-nav__icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.inv-bottom-nav__hero-img {
    flex-shrink: 0;
}

.inv-bottom-nav__tab--pet .inv-sprite,
.inv-bottom-nav__tab--pet .inv-sprite img {
    flex-shrink: 0;
}

/* Pet — center tab */
.inv-bottom-nav__tab--pet {
    position: relative;
}

.inv-bottom-nav__tab--pet .inv-sprite {
    width: 36px !important;
    height: 36px !important;
}

.inv-bottom-nav__tab--pet .inv-sprite img {
    width: 36px !important;
    height: 36px !important;
}

/* Pet fallback — egg emoji for users without a pet */
.inv-bottom-nav__pet-egg {
    font-size: 1.5rem;
    line-height: 1;
}

/* Hero image (King Arthur thumbnail) */
.inv-bottom-nav__hero-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
    .inv-bottom-nav {
        display: none !important;
    }
}

/* Add padding to body for bottom nav (logged-in mobile) */
body.inv-logged-in {
    padding-bottom: 60px;
}

@media (min-width: 768px) {
    body.inv-logged-in {
        padding-bottom: 0;
    }
}

/* Move announcement FAB + chat bubble above bottom nav */
body.inv-logged-in .inv-ann-fab {
    bottom: 64px;
}

body.inv-logged-in .inv-chat-bubble {
    bottom: 68px;
}

body.inv-logged-in .inv-chat-widget {
    bottom: 68px;
}

/* Guide (?) button above chat bubble */
body.inv-logged-in .inv-tour-help-btn {
    bottom: 132px;
}

@media (min-width: 768px) {
    body.inv-logged-in .inv-ann-fab {
        bottom: 24px;
    }

    body.inv-logged-in .inv-chat-bubble {
        bottom: 24px;
    }

    body.inv-logged-in .inv-chat-widget {
        bottom: 24px;
    }
}

/* =============================================================================
   Mobile Quick Actions Grid (hamburger menu)
   ============================================================================= */
.inv-mobile-quick-actions {
    padding: 0;
    margin-bottom: 8px;
}

.inv-mobile-qa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.inv-mobile-qa-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    background: #111827;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    transition: background 0.15s ease;
    position: relative;
}

.inv-mobile-qa-item:hover,
.inv-mobile-qa-item:active {
    background: #1e293b;
    color: #f1f5f9;
}

.inv-mobile-qa-item svg {
    width: 22px;
    height: 22px;
    opacity: 0.8;
    stroke: currentColor;
}

.inv-mobile-qa-item span:last-child {
    font-size: 0.65rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.inv-mobile-qa-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* ── Landscape phone fix (e.g. iPhone rotated, ~812×375) ──────────────────── */
/* Phones in landscape are wide (768px+) but short — force mobile layout      */
@media (orientation: landscape) and (max-height: 500px) {
    :root {
        --inv-header-h: calc(50px + var(--inv-sat));
    }

    /* Force mobile header elements visible */
    .inv-header-left-mobile {
        display: flex !important;
    }

    #invictus-hamburger {
        display: flex !important;
    }

    /* Hide desktop nav and sidebar */
    #invictus-desktop-nav {
        display: none !important;
    }

    .inv-header-cta {
        display: none !important;
    }

    #inv-sidebar {
        display: none !important;
    }

    body {
        --inv-sidebar-w: 0px !important;
    }

    /* Hide bottom nav in landscape (no room) */
    .inv-bottom-nav {
        display: none !important;
    }

    body.inv-logged-in {
        padding-bottom: 0 !important;
    }

    /* Logged-out: hide login/join buttons in header, show hamburger instead */
    .inv-header-auth-cta {
        display: none !important;
    }
}
