/*
 * Adapter layer: reskins the chrome inherited from Ember rather than rewriting
 * its markup.
 *
 * The top panel carries the login modal trigger, the account dropdown with its
 * live balances, the language switcher and the mobile menu - all wired to
 * session state and plugins. Rebuilding that markup to match the comp would
 * risk every one of those for a purely visual gain, so it stays and is
 * restyled into the comp's utility strip instead.
 *
 * Loaded after eternal-shell.css. Selectors are scoped to
 * .theme-supreme-eternal so none of this leaks into the Ember theme, which
 * still ships from the same asset tree.
 */

/* ---- page shell --------------------------------------------------------- */

.theme-supreme-eternal .wrapper {
    margin: 0 auto;
    max-width: var(--et-shell);
    padding: 0 var(--et-gutter);
}

@media (min-width: 994px) {
    .theme-supreme-eternal .wrapper {
        padding-top: 24px;
    }
}

/* Ember's full-bleed pull. The Eternal layout is a fixed column, so undo it. */
.theme-supreme-eternal .ember-hero,
.theme-supreme-eternal .et-hero {
    margin-left: 0;
    width: auto;
}

/* ---- top panel becomes the utility strip -------------------------------- */

/*
 * Ember pulls the panel full-bleed with a negative margin computed against the
 * viewport, and pins it sticky. The Eternal layout is a fixed 1180px column
 * that starts at the strip, so both have to go or the strip hangs off the
 * page edges while the hero sits inside the shell.
 */
.theme-supreme-eternal .topPanel {
    margin-left: 0;
    position: static;
    width: auto;
    align-items: center;
    background: linear-gradient(180deg, var(--et-panel-raised), var(--et-panel-deep));
    border: 1px solid var(--et-line);
    border-top: none;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: var(--et-strip-height);
    padding: 0 12px;
}

@media (min-width: 994px) {
    .theme-supreme-eternal .topPanel {
        border-top: 1px solid var(--et-line);
    }
}

/* The wordmark moved into the hero, so the panel logo is redundant chrome. */
.theme-supreme-eternal .topPanel .ember-nav-logo {
    display: none;
}

/*
 * The comp has one navigation bar, under the hero. This theme renders it as
 * .et-nav, so the inherited desktop menu would be a duplicate - hidden rather
 * than deleted because the same markup feeds the mobile drawer below 993px,
 * which is still the only navigation on a phone.
 */
.theme-supreme-eternal .topPanel .menu-wrapper {
    display: none;
}

.theme-supreme-eternal .topPanel-left,
.theme-supreme-eternal .topPanel-right {
    align-items: center;
    display: flex;
    gap: 14px;
}

.theme-supreme-eternal .topPanel-right {
    margin-left: auto;
}

.theme-supreme-eternal .topPanel a,
.theme-supreme-eternal .topPanel .user-enter {
    color: #657690;
    font: 600 var(--et-size-xs) / 1 var(--et-ui);
    letter-spacing: var(--et-track-label);
    text-transform: uppercase;
}

.theme-supreme-eternal .topPanel a:hover,
.theme-supreme-eternal .topPanel a:focus-visible {
    color: var(--et-highlight);
}

.theme-supreme-eternal .et-social-strip {
    align-items: center;
    display: flex;
    gap: 13px;
    min-width: 0;
}

.theme-supreme-eternal .et-social-link {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    min-height: 22px;
    white-space: nowrap;
}

.theme-supreme-eternal .et-social-link i {
    color: var(--et-text-faint);
    font-size: 10px;
    text-align: center;
    transition: color 180ms ease, text-shadow 220ms ease;
    width: 11px;
}

.theme-supreme-eternal .et-social-link:hover i,
.theme-supreme-eternal .et-social-link:focus-visible i {
    color: var(--et-accent);
    text-shadow: 0 0 10px rgba(var(--et-accent-rgb), 0.36);
}

/* The online pill in the strip: label plus the pulsing dot from the comp. */
.theme-supreme-eternal .topPanel .online-block strong {
    color: var(--et-text-dim);
    font: 600 var(--et-size-xs) / 1 var(--et-ui);
    letter-spacing: var(--et-track-label);
}

.theme-supreme-eternal .topPanel .online-state {
    display: block;
    font: 600 var(--et-size-xs) / 1 var(--et-ui);
    letter-spacing: var(--et-track-label);
    margin-top: 3px;
}

.theme-supreme-eternal .topPanel .online-state.color-green {
    animation: et-online-text-glow 2.8s ease-in-out infinite;
    color: var(--et-online);
    text-shadow:
        0 0 5px rgba(87, 199, 138, 0.48),
        0 0 12px rgba(87, 199, 138, 0.22);
}

.theme-supreme-eternal .topPanel .online-block-active::before {
    animation: et-pulse 2.4s ease-in-out infinite;
    background: var(--et-online);
    border-radius: 50%;
    content: '';
    display: inline-block;
    height: 7px;
    margin-right: 7px;
    width: 7px;
}

@keyframes et-online-text-glow {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(87, 199, 138, 0.42),
            0 0 11px rgba(87, 199, 138, 0.18);
    }
    50% {
        text-shadow:
            0 0 8px rgba(87, 199, 138, 0.75),
            0 0 18px rgba(87, 199, 138, 0.34);
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-supreme-eternal .topPanel .online-state.color-green {
        animation: none;
    }
}

/* The account panel button is the one call to action in the strip, so it keeps
   a filled treatment while everything around it stays flat. */
.theme-supreme-eternal .topPanel .ember-nav-play {
    background: linear-gradient(180deg, #17304f, #0d1c30);
    border: 1px solid var(--et-accent-deep);
    color: var(--et-text-bright);
    font: 700 var(--et-size-xs) / 1 var(--et-ui);
    letter-spacing: var(--et-track-label);
    padding: 7px 14px;
}

.theme-supreme-eternal .topPanel .ember-nav-play:hover,
.theme-supreme-eternal .topPanel .ember-nav-play:focus-visible {
    border-color: var(--et-accent);
    color: #fff;
}

@media (max-width: 720px) {
    .theme-supreme-eternal .et-social-strip {
        gap: 10px;
    }

    .theme-supreme-eternal .et-social-link span {
        display: none;
    }
}

/* ---- inner-page hero ---------------------------------------------------- */

/*
 * Inner pages keep a shallow band rather than the full 334px scene: enough to
 * separate the navigation from the content, not enough to push it down. The
 * hidden h1 lives inside, so this is collapsed by height, never display:none.
 */
.theme-supreme-eternal .et-hero--compact {
    height: 92px;
}

.theme-supreme-eternal .et-hero--compact .et-hero__ridge {
    display: none;
}

/* ---- main column -------------------------------------------------------- */

/*
 * <main> is the centre column of the three-column grid now, so Ember's own
 * width cap and inset have to go or the middle of the page sits 16px out of
 * line with the rails either side of it.
 */
.theme-supreme-eternal .main {
    display: grid;
    gap: 14px;
    margin: 0;
    max-width: none;
    min-width: 0;
    width: auto;
}

/*
 * Ember's home page is a stack of full-width sections; the comp is three
 * columns. Until view.home.php is restructured the sections simply run down
 * the centre at the shell width, which reads correctly - just not yet as the
 * comp's grid.
 */
.theme-supreme-eternal .sidebar {
    margin: 0 0 14px;
    max-width: none;
    width: auto;
}

/* ---- panels inherited from Ember ---------------------------------------- */

.theme-supreme-eternal .ember-section-heading h2 {
    color: var(--et-text-bright);
    font-family: var(--et-display);
    letter-spacing: 0.04em;
}

.theme-supreme-eternal .ember-section-heading small {
    color: var(--et-text-label);
    font-family: var(--et-ui);
    letter-spacing: var(--et-track-label);
}

/* ---- neutralising Ember's crimson ---------------------------------------- *
 *
 * Three inherited blocks paint their own crimson radial gradients - the
 * marquee at rgba(171,37,42,.21), the realm brief at rgba(133,22,...) and the
 * footer at rgba(151,22,31,...). Against the Eternal blues they read as a
 * different site pasted below the navigation, which is exactly how it looked.
 * Backgrounds are cleared here; the gold accents inside them go with the
 * per-section conversion, not with a blanket override.
 * ------------------------------------------------------------------------- */

/*
 * The marquee duplicated the navigation as a second row of shortcuts. The comp
 * has no such band - those links live in the left rail's Quick Links panel - so
 * it is hidden rather than restyled.
 */
.theme-supreme-eternal .ember-quick-marquee {
    display: none;
}

/*
 * Note the doubled class. Ember writes these as
 * `.theme-supreme-ember.page-home .ember-realm-brief__grid strong` - two
 * classes plus an element, 0-3-1. A single `.theme-supreme-eternal` prefix is
 * 0-2-1 and loses regardless of load order, which is why the card titles
 * stayed gold on the first attempt. Matching the shape makes them equal and
 * lets source order decide.
 */
.theme-supreme-eternal.page-home .ember-realm-brief,
.theme-supreme-eternal.page-home .ember-stat-strip,
.theme-supreme-eternal .supreme-footer,
.theme-supreme-eternal .ember-footer {
    background-color: transparent;
    background-image: none;
}

.theme-supreme-eternal.page-home .ember-realm-brief {
    border-top: 1px solid var(--et-line-strong);
    margin-top: 14px;
}

/* Card surfaces inside the brief pick up the panel treatment so they stop
   reading as amber tiles on a blue page. */
.theme-supreme-eternal.page-home .ember-realm-brief__grid > li {
    background: linear-gradient(180deg, var(--et-panel), var(--et-panel-deep));
    border: 1px solid var(--et-line-panel);
}

.theme-supreme-eternal.page-home .ember-realm-brief__grid strong {
    color: var(--et-text-bright);
    font-family: var(--et-display);
}

.theme-supreme-eternal.page-home .ember-realm-brief__grid small {
    color: var(--et-text-dim);
    font-family: var(--et-body);
}

.theme-supreme-eternal.page-home .ember-realm-brief__head span {
    color: var(--et-accent);
    font-family: var(--et-ui);
    letter-spacing: var(--et-track-label);
}

.theme-supreme-eternal.page-home .ember-realm-brief__head h2,
.theme-supreme-eternal.page-home .ember-realm-brief__gallery h3 {
    color: var(--et-text-bright);
    font-family: var(--et-display);
}

/* The guard tile paints its own amber wordmark on top of the grid rule. */
.theme-supreme-eternal.page-home .ember-realm-brief__guard-title span {
    color: var(--et-accent);
}

/* ---- footer ------------------------------------------------------------- */

.theme-supreme-eternal .ember-footer-frame {
    margin: 0 auto;
    max-width: var(--et-shell);
}

.theme-supreme-eternal .ember-footer {
    border-top: 1px solid var(--et-line-strong);
}

.theme-supreme-eternal .ember-footer-kicker,
.theme-supreme-eternal .ember-footer-link-group > strong {
    color: var(--et-accent);
    font-family: var(--et-ui);
    letter-spacing: var(--et-track-label);
}

.theme-supreme-eternal .ember-footer-link-group a,
.theme-supreme-eternal .supreme-footer-bottom {
    color: var(--et-text-dim);
    font-family: var(--et-body);
}

.theme-supreme-eternal .supreme-footer-cta strong {
    color: var(--et-text-bright);
    font-family: var(--et-display);
}
