/* ==========================================================================
   Orion - design v2 (2026-11-12). Loaded after orion.css.
   Nothing here applies unless <html data-design="v2">
   (views/components/design-v2.blade.php:  ?design=v2 on,  ?design=v1 off).
   Uses native CSS nesting; a browser without it simply keeps the v1 look.
   ========================================================================== */

/* ---------- 1. both themes ---------- */
html[data-design="v2"] {
    /* menu icons: one colour instead of eight */
    .o-nav > ul > li { --ic: var(--o-gold); }
    .o-nav > ul > li.active,
    .o-nav > ul > li:hover { --ic: var(--o-gold-hi); }

    /* header fit: EN and LT menus, signed in or not, never run out of the window */
    @media (min-width: 1351px) {
        .o-nav > ul a { font-size: 16px; padding: 8px 7px; gap: 6px; }
        .o-nav .o-ic { width: 19px; height: 19px; }
        .o-header__actions { gap: 8px; }
        .o-account__name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    }
    @media (min-width: 1351px) and (max-width: 1519px) {
        .o-nav > ul .o-ic { display: none; }
        .o-nav > ul a { padding: 8px 10px; }
    }
    @media (min-width: 1351px) and (max-width: 1699px) {
        .o-header .nav__langs-item--current > span { display: none; }
    }

    /* the small-caps serif stays for headings and main buttons; small labels use the body font */
    .o-server__cta,
    .o-news-card__more,
    .o-news-tag__cat,
    .o-stable th {
        font-family: var(--o-body);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
    }
    .o-server__cta { font-size: 13px; }
    .o-stable th { font-size: 12.5px; }
    .o-news-tag__cat { font-size: 12px; }
    .o-launch__unit small { font-size: 12px; }
    .o-srv--compact .o-srv__text small { font-size: 11px; }
    .o-footer__note { font-size: 14px !important; opacity: .85; }

    /* a server without a start date: a calm "not planned yet" instead of 0 : 00 : 00 : 00 and a red bar */
    .o-launch.is-unplanned { display: grid; place-items: center; min-height: 92px; }
    .o-launch.is-unplanned .o-launch__units { display: none; }
    .o-launch.is-unplanned::before {
        content: attr(aria-label);
        font-family: var(--o-display);
        font-weight: 700;
        font-size: 15px;
        letter-spacing: .16em;
        text-transform: uppercase;
        color: var(--o-mist);
    }
    .o-server:has(.o-launch.is-unplanned) .o-uptime__bars { filter: grayscale(1); opacity: .35; }

    /* phones: smaller floating buttons, so they cover less of the tables */
    @media (max-width: 600px) {
        .o-chat__fab { width: 48px; height: 48px; }
        .o-totop { width: 40px; height: 40px; }
        .o-has-chat .o-totop { bottom: 70px; right: 18px; }
    }
}

/* ---------- 2. dark theme: panels stand out from the page ---------- */
html[data-design="v2"]:not([data-theme="light"]) {
    --o-dusk: #1e1811;
    --o-dusk-2: #2a2218;
    --o-line: rgba(216, 173, 95, .27);
    --bgc-color: rgba(30, 24, 17, .94);
    --bg-form-table: rgba(30, 24, 17, .94);
}
/* :where() keeps these as weak as the original rules, so special panels keep their own background */
:where(html[data-design="v2"]:not([data-theme="light"])) .o-panel,
:where(html[data-design="v2"]:not([data-theme="light"])) .o-guide__menu,
:where(html[data-design="v2"]:not([data-theme="light"])) .o-news-card {
    background-image: linear-gradient(180deg, rgba(46, 37, 26, .9), rgba(31, 25, 18, .95));
}
:where(html[data-design="v2"]:not([data-theme="light"])) .o-server {
    background-image: radial-gradient(120% 140% at 0% 0%, rgba(216, 173, 95, .12), transparent 55%),
        linear-gradient(180deg, rgba(44, 35, 24, .94), rgba(27, 21, 15, .96));
}

/* ---------- 3. light theme: more contrast, own logo, clearer hero ---------- */
html[data-design="v2"][data-theme="light"] {
    --o-page: #ece2cb;          /* a step darker, so the cards read as cards */
    --o-ink: #ece2cb;
    --bg-dark: #ece2cb;
    --o-dusk: #fffdf8;
    --o-dusk-2: #f3e8cf;
    --o-line: rgba(140, 98, 36, .34);
    --o-mist: #63543d;          /* 5.7:1 on the page */
    --o-gold: #86590f;          /* 4.7:1 on the page (was 3.8:1) */
    --o-gold-hi: #6b4610;
    --o-ember: #a63c24;
    --o-aether: #9c5414;
    --bgc-color: rgba(255, 253, 248, .97);
    --bg-form-table: rgba(255, 253, 248, .97);

    .o-panel,
    .o-guide__menu,
    .o-news-card,
    body.orion aside.sidebar,
    body.orion .omg-table,
    body.orion .content_left,
    body.orion .content_right,
    body.orion .about_all,
    body.orion .startgame_block {
        background: linear-gradient(180deg, #fffdf8, #fbf5e8);
        box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(90, 60, 20, .08), 0 18px 36px -22px rgba(90, 60, 20, .5);
    }

    /* logo: the same picture as in the dark theme (owner 2026-11-16; the light version img/orion/fade-logo-light.webp is not used) */

    /* menu icons are already bronze: no extra darkening */
    .o-nav .o-ic,
    .o-nav > ul a:hover .o-ic,
    .o-nav > ul .active .o-ic { filter: none; }

    /* hero: less white haze over the city, darker gold in the heading */
    .o-hero__sky::after {
        background: linear-gradient(0deg, var(--o-page) 0%, var(--o-page) 3%, rgba(236, 226, 203, .93) 8%, rgba(236, 226, 203, .78) 14%, rgba(236, 226, 203, .56) 21%, rgba(236, 226, 203, .32) 29%, rgba(236, 226, 203, .12) 37%, transparent 46%),
            linear-gradient(90deg, rgba(248, 241, 227, .66) 0%, rgba(248, 241, 227, .24) 46%, transparent 70%);
    }
    .o-hero__title {
        background: linear-gradient(180deg, #b07d22 0%, #7d5216 55%, #54360a 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
    .o-hero__name { color: #6b4610; }

    /* game item icons (dark squares) get a frame, so they look placed, not pasted */
    .o-rate img { box-shadow: 0 0 0 1px rgba(90, 60, 20, .5), 0 3px 8px -3px rgba(60, 40, 10, .5); }
}

/* ---------- 4. hero text: clean type instead of the 1px "engraved" shadow ---------- */
html[data-design="v2"] {
    .o-hero__lead {
        color: #f3ead6;
        font-weight: 400;
        line-height: 1.6;
        letter-spacing: 0;
        text-wrap: pretty;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 24px rgba(0, 0, 0, .5);   /* soft halo only, for reading over the picture */
    }
    .o-hero__name {
        font-size: 15px;
        letter-spacing: .3em;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    }
}
html[data-design="v2"][data-theme="light"] {
    .o-hero__lead {
        color: #33281a;
        font-weight: 500;
        text-shadow: 0 0 3px rgba(248, 241, 227, .8), 0 0 20px rgba(248, 241, 227, .9);
    }
    .o-hero__name { text-shadow: none; }
}

/* ---------- 5. hero figures: one light, one tone, similar size ---------- */
html[data-design="v2"] {
    .o-hero__character {
        --hb: 1; --hc: 1; --hs: 1;                 /* brightness, contrast, saturation of this picture */
        transform-origin: 50% 100%;
        /* night: a cool moonlit edge, so dark figures do not sink into the dark sky */
        filter: brightness(var(--hb)) contrast(var(--hc)) saturate(var(--hs))
            drop-shadow(0 0 1px rgba(214, 224, 255, .3)) drop-shadow(0 0 34px rgba(150, 170, 225, .17));
    }
    /* corrections for the five pictures in use now, matched by the fitted file name (local + server copy);
       a replaced picture has another name and gets only the common treatment above */
    .o-hero__character:is([src*="auto/1-5537f10190"], [src*="auto/1-cdc939cae6"]) { --hb: 1.1; }
    .o-hero__character:is([src*="auto/2-7882d0af48"], [src*="auto/2-102555bb6e"]) { scale: .92; }
    .o-hero__character:is([src*="auto/3-291cee8d10"], [src*="auto/3-2a900b4ec9"]) { --hc: 1.1; --hs: .9; }
    .o-hero__character:is([src*="auto/4-4225d3f0eb"], [src*="auto/4-a95af85c27"]) { --hb: .84; --hc: 1.12; --hs: .88; }
    .o-hero__character:is([src*="auto/5-e2af9c4250"], [src*="auto/5-7a9c09539a"]) { --hb: 1.4; --hc: .94; scale: .92; }
}
html[data-design="v2"][data-theme="light"] {
    .o-hero__character {
        /* day: a little lighter, softer and warmer, with a ground shadow instead of the glow */
        filter: brightness(calc(var(--hb) * 1.05)) contrast(calc(var(--hc) * .96)) saturate(calc(var(--hs) * .9)) sepia(.1)
            drop-shadow(0 0 1px rgba(255, 250, 240, .7)) drop-shadow(10px 18px 22px rgba(120, 80, 30, .24));
    }
    .o-hero__character:is([src*="auto/1-5537f10190"], [src*="auto/1-cdc939cae6"]) { --hb: 1.25; }
    .o-hero__character:is([src*="auto/3-291cee8d10"], [src*="auto/3-2a900b4ec9"]) { --hb: 1.05; --hc: 1.05; }
    .o-hero__character:is([src*="auto/4-4225d3f0eb"], [src*="auto/4-a95af85c27"]) { --hb: .95; --hc: 1.08; --hs: .9; }
    .o-hero__character:is([src*="auto/5-e2af9c4250"], [src*="auto/5-7a9c09539a"]) { --hb: 1.7; --hc: .92; }
}

/* ---------- 6. account panel (checked signed in) ---------- */
html[data-design="v2"] {
    /* a game account without characters: a plain note, not a second table header */
    body.orion .omg-table.error tr { background: none; }
    /* quick tiles: the second line wraps instead of being cut with "..." */
    .o-dash__tile-text small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
}
html[data-design="v2"][data-theme="light"] {
    body.orion .omg-table thead { background: rgba(134, 89, 15, .1); }      /* was a strong orange band */
    body.orion .s-item-count { color: #a63c24; }                           /* was pale pink on white (1.6:1) */
}

/* ---------- 7. signed-in details and the older account pages ---------- */
html[data-design="v2"] {
    /* .o-v1-only: kept for v1, hidden here.  .o-v2-only / .o-v2-head: in the page with style="display:none",
       shown only here (see the "design v2" comments in the views) */
    .o-v1-only { display: none !important; }
    a.o-btn.o-v2-only { display: inline-flex !important; }
    header.o-v2-head { display: flex !important; }

    /* Change password / My Warehouse / Referrals / Tickets: the same page head as Security */
    .o-v2-head--pw ~ .card > .title,
    .o-v2-head--tickets ~ .ticket-section > .title { display: none; }
    .o-v2-head--pw ~ .card form { max-width: 480px; }
    body.orion .o-v2-head ~ .card > .title,
    body.orion .o-v2-head ~ .card > .title p {
        font-family: var(--o-body); font-size: 17px; font-weight: 500; line-height: 1.5;
        letter-spacing: 0; text-transform: none; color: var(--o-mist);
    }
    body.orion .o-v2-head--ref ~ .card > .title h1 {
        font-family: var(--o-display); font-size: 20px; font-weight: 700; letter-spacing: .04em; text-transform: none; color: var(--o-star);
    }

    /* tickets, nothing selected: a gold line icon instead of the purple stock picture */
    .ticket-no-active { display: grid; justify-items: center; align-content: center; gap: 12px; color: var(--o-mist); }
    .ticket-no-active img { display: none; }
    .ticket-no-active::before {
        content: '';
        width: 54px; height: 54px;
        background: var(--o-gold);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9 10h6M9 14h4'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3Cpath d='M9 10h6M9 14h4'/%3E%3C/svg%3E") center / contain no-repeat;
    }
}
html[data-design="v2"] {
    /* tickets: "Create a new ticket" on one line */
    .ticket-sidebar { min-width: 232px; }
    .ticket-sidebar > .btn-primary { gap: 8px; white-space: nowrap; font-family: var(--o-body); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    .ticket-sidebar > .btn-primary svg { width: 18px; height: 18px; flex: none; }
    /* plain checkboxes (e.g. "Select all" in My Warehouse) in the theme colour */
    body.orion input[type="checkbox"] { accent-color: var(--o-gold); }
}

/* ---------- 8. account panel, dark theme: the same lighter cards as the public pages (2026-11-19) ----------
   Side menu, "Game accounts" bar, game account cards, history tables, framed cards (.card) and the
   older tables (.omg-table) got the v2 panel colour of section 2; before they kept the darker v1 fill. */
html[data-design="v2"]:not([data-theme="light"]) {
    --o-v2-card: linear-gradient(180deg, rgba(46, 37, 26, .9), rgba(31, 25, 18, .95));   /* = .o-panel above */

    .o-side,
    .orion--app .master-acc-item,
    .orion--app .stats_table table.rating tbody { background: var(--o-v2-card); }
    body.orion .card::after,
    body.orion .create_game_account::after { background: var(--o-v2-card) !important; }
    .o-app__menu-btn,
    .o-auc-pager__btn { background: rgba(42, 34, 24, .92); }
    /* tablet / phone: the side menu drawer stays solid */
    @media (max-width: 1100px) {
        .o-app__side .o-side { background: linear-gradient(180deg, #2b2319, #1e1811); }
    }
}
/* :where() keeps it weak, so a table inside a game account card stays transparent */
:where(html[data-design="v2"]:not([data-theme="light"])) body.orion .omg-table { background: var(--o-v2-card); }
