/* ==========================================================================
   client - shared styles (both layouts)
   desktop.css loads at >= 900px, mobile.css and mobile-ref.css below it (see layouts/main)
   ========================================================================== */

:root {
    --c2-bg: #131217;
    --c2-bg-2: #07101b;
    --c2-panel: #1c1b21;
    --c2-panel-2: #26252c;
    --c2-input: #141417;
    --c2-gold-1: #d4b57e;
    --c2-gold-2: #bb8e52;
    --c2-gold-text: #f2dba3;
    --c2-gold-grad: linear-gradient(180deg, #d4b57e 0%, #bb8e52 100%);
    --c2-gold-line: linear-gradient(90deg, rgba(187, 142, 82, 0) 0%, #d4b57e 50%, rgba(187, 142, 82, 0) 100%);
    --c2-text: #ececec;
    --c2-muted: #cdcdcd;
    --c2-dim: #8d8b93;
    --c2-line: rgba(212, 181, 126, .35);
    --c2-hot: linear-gradient(135deg, #ff4b2b 0%, #ff9f1a 100%);
    --c2-radius: 10px;
    --c2-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.c2 {
    min-height: 100vh;
    background-color: var(--c2-bg);
    color: var(--c2-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
/* :where() keeps the reset at zero specificity, so any component class wins over it */
:where(.c2) img { max-width: 100%; display: block; }
:where(.c2) a { color: inherit; text-decoration: none; }
:where(.c2) :is(button, input) { font: inherit; color: inherit; }
:where(.c2) button { cursor: pointer; background: none; border: 0; padding: 0; }
:where(.c2) :is(h1, h2, h3, h4, p) { margin: 0; }
:where(.c2) ul { list-style: none; margin: 0; padding: 0; }

/* --- layout switch ----------------------------------------------------------
   both layouts are in the page; one is hidden. Lazy images inside a hidden
   subtree are not fetched, so the hidden layout costs markup only. */
@media (min-width: 900px) {
    .c2-m, .m-header { display: none !important; }
}
@media (max-width: 899.98px) {
    .c2-d, .d-header { display: none !important; }
}

/* --- buttons -------------------------------------------------------------- */
.c2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 20px;
    border-radius: 34px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: filter .2s, transform .2s;
}
.c2-btn:hover { filter: brightness(1.12); }
.c2-btn:active { transform: translateY(1px); }
.c2-btn--gold {
    color: #1a1206;
    background: var(--c2-gold-grad);
    box-shadow: 0 2px 10px rgba(212, 181, 126, .25), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.c2-btn--line {
    color: var(--c2-gold-text);
    border: 1px solid var(--c2-gold-1);
    background: rgba(0, 0, 0, .25);
}
.c2-btn--block { width: 100%; height: 42px; }

/* --- brand logo (partials/logo): the old template's logo, gold text with a gold rule --- */
.c2-logo { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.c2-logo img { width: auto; flex: none; object-fit: contain; }
.c2-logo__text {
    display: inline-block;
    font-weight: bold;
    line-height: 1.35;
    white-space: nowrap;
    background-image: linear-gradient(to right, #462523 0, #cb9b51 0%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 100%, #462523 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.c2-logo__text hr {
    margin: 2px 0;
    height: 0;
    border: 0;
    border-top: 1px solid;
    border-image: linear-gradient(to right, #462523 0, #cb9b51 0%, #f6e27a 45%, #f6f2c0 50%, #f6e27a 55%, #cb9b51 100%, #462523 100%) 30;
}
.c2-logo--lg img { height: 48px; max-width: 180px; }
.c2-logo--lg .c2-logo__text { font-size: 14px; }
.c2-logo--sm { gap: 8px; }
.c2-logo--sm img { height: 36px; }
.c2-logo--sm .c2-logo__text { font-size: 11px; }

/* --- provider lobby tile: "in maintenance" / "coming soon" cover (home rail) ---- */
.c2-lobby__state {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--c2-gold-text);
    background: rgba(20, 20, 23, .72);
}
.c2-lobby.is-down, .c2-lobby.is-soon { cursor: default; }

/* --- provider lobby tile --------------------------------------------------- */
/* the frame is drawn over the picture's edge rather than around it, so it sits exactly
   where the CMS pictures paint their own frame and covers it: one frame whether the
   upload is framed or plain. ::after is the 2px metallic rim (grey-beige at the top,
   champagne down the sides, dark grey at the bottom), cut to a ring with a mask;
   ::before is the 1px near-black line inside it. The tile's rounded clip also hides
   the painted pictures' transparent corners. */
.c2-lobby {
    --c2-lobby-radius: 12px;
    position: relative;
    display: block;
    border-radius: var(--c2-lobby-radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--c2-panel);
    transition: transform .25s, box-shadow .25s;
}
.c2-lobby::before,
.c2-lobby::after {
    content: '';
    position: absolute;
    z-index: 4;
    pointer-events: none;
}
.c2-lobby::after {
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(180deg, #9d9079 0%, #a99a80 25%, #bca98a 55%, #d2bc95 82%, #57514f 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.c2-lobby::before {
    inset: 2px;
    border: 1px solid #161310;
    border-radius: calc(var(--c2-lobby-radius) - 2px);
}
.c2-lobby img { display: block; width: 100%; height: auto; }
.c2-lobby:hover { transform: translateY(-2px); box-shadow: 0 0 6px rgba(255, 214, 140, .45); }
.c2-lobby__name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    padding: 10px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c2-gold-text);
    background: radial-gradient(circle at 50% 0, #3a3223 0%, var(--c2-panel) 70%);
}

/* --- hot / all / slot / other filter (game list) ------------------------------ */
.gameGrid[data-filter="hot"]   .gameItems:not([data-is_hot="1"]) { display: none; }
.gameGrid[data-filter="slot"]  .gameItems:not([data-type="slot"]) { display: none; }
.gameGrid[data-filter="other"] .gameItems[data-type="slot"] { display: none; }
.gameItems.is-hidden { display: none !important; }

/* --- modals ---------------------------------------------------------------- */
.c2-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.c2-modal.is-open { display: flex; }
.c2-modal__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); }
.c2-modal__box {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 28px 24px 24px;
    border-radius: 14px;
    background: linear-gradient(180deg, #25232a 0%, #141318 100%);
    box-shadow: 0 0 0 1px var(--c2-line), 0 20px 50px rgba(0, 0, 0, .6);
    animation: c2-pop .2s ease-out;
}
.c2-modal__box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--c2-gold-line);
}
.c2-modal__title {
    margin-bottom: 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--c2-gold-text);
}
.c2-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    color: var(--c2-dim);
    font-size: 16px;
}
.c2-field {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin-bottom: 14px;
    padding: 0 14px;
    border-radius: 22px;
    background: var(--c2-input);
    box-shadow: inset 0 0 0 1px rgba(212, 181, 126, .3);
}
.c2-field i { color: var(--c2-gold-1); width: 16px; text-align: center; }
.c2-field input { flex: 1; min-width: 0; height: calc(100% - 2px); border: 0; outline: 0; background: transparent; }
.c2-field input::placeholder { color: var(--c2-dim); }

/* Chrome autofill (saved username/password) forces a light-blue background and dark text
   with !important, which CSS cannot override directly. The field is repainted from
   inside instead: a large inset shadow in the fields' own colour (--c2-input, used by the
   header login, the login modal and the member forms) covers the blue, and the text is
   set back to the site's light colour */
.c2 input:-webkit-autofill,
.c2 input:-webkit-autofill:hover,
.c2 input:-webkit-autofill:focus,
.c2 input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--c2-input) inset;
    box-shadow: 0 0 0 1000px var(--c2-input) inset;
    -webkit-text-fill-color: var(--c2-text);
    caret-color: var(--c2-text);
    transition: background-color 600000s 0s;
}
.c2-field:focus-within { box-shadow: inset 0 0 0 1px var(--c2-gold-1); }
.c2-login .c2-btn { margin-top: 6px; }
.c2-login__notice { margin: -4px 0 14px; text-align: center; font-size: 13px; color: var(--c2-gold-1); }
.c2-alert__text { margin-bottom: 20px; text-align: center; color: var(--c2-muted); }

@keyframes c2-pop {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

body.c2-lock { overflow: hidden; }

/* --- scrollbars: a thin gold bar on both layouts, for the page and every inner
   scroll area. WebKit takes the pseudo-elements; the standard properties are only
   for browsers without them, since Chrome ignores ::-webkit-scrollbar once
   scrollbar-width is set. */
html::-webkit-scrollbar, .c2 ::-webkit-scrollbar { width: 4px; height: 4px; }
html::-webkit-scrollbar-track, .c2 ::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb, .c2 ::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(212, 181, 126, .45); }
html::-webkit-scrollbar-thumb:hover, .c2 ::-webkit-scrollbar-thumb:hover { background: rgba(212, 181, 126, .7); }
@supports not selector(::-webkit-scrollbar) {
    html, .c2 * { scrollbar-width: thin; scrollbar-color: rgba(212, 181, 126, .45) transparent; }
}
