/* Copied from src/styles/casino-theme.css for gateway static usage */
/* =============== TOKENS (colors/blur/shadows) =============== */
:root {
    --ink: #F5E9CA;
    /* warm ivory text */
    --ink-soft: #D9CCA7;
    --bg-deep: #0B0F15;
    --panel: #0E141C;
    --felt: rgba(14, 74, 47, 0.85);
    /* table */
    --felt-dark: #0B3A24;
    --rim: #5E3B1F;
    /* wood ring */
    --wood: #5E3B1F;
    --gold: #E6C166;
    --gold-deep: #CDA34A;
    --gold-line: #FFF3C5;
    --navy: #173B7A;
    /* banker pill */
    --success: #2ECC71;
    --danger: rgba(255, 0, 0, 0.7);
    --glass: rgba(255, 255, 255, .08);
    --shadow-1: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-2: 0 18px 48px rgba(0, 0, 0, .50);
    --glow-engrave: 0px 1px 2px rgba(0, 0, 0, 0.8),
        0px -1px 0px rgba(255, 255, 255, 0.2);

    /* Inner glow effect */
    --glow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 6px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(255, 90, 50, 0.35);

    /* Unify iOS env() and Android gesture insets; allow Android-only extra pad */
    --safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--android-safe-area-bottom, 0px)) + var(--android-extra-bottom, 0px));
    /* Default (non-android) top safe value: iOS env or 0 */
    --safe-top-global: env(safe-area-inset-top, 0px);
}

/* Native Android app: enforce a global minimum top inset across all screens */
html.is-native-app.platform-android {
    --safe-top-global: max(12px,
            env(safe-area-inset-top, 0px),
            var(--safe-area-inset-top, 0px),
            var(--android-safe-area-top, 0px));
}

/* Global interaction + a11y improvements */

button:disabled,
.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible {
    outline: 2px solid #ffd76a;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

body {
    background-image:
        linear-gradient(180deg, #0B0D10 0%, #141821 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    margin: 0;
    font-family: "Teko", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html {
    background-color: #000;
}



#root {
    width: 100%;
    min-height: 100VH;
    overflow: hidden;
}

/* =============== HEADER =============== */
.casino-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    text-transform: uppercase;
}

.casino-header h2 {
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.3rem;
    margin: 0
}

.casino-header .gold-link {
    font-size: 1rem;
}

.casino-title {
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge-pill {
    font: 600 12px/1.2 ui-sans-serif, system-ui;
    color: var(--ink-soft);
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff14;
    border: 1px solid rgba(255, 255, 255, .1);
}

.direction-btn {
    color: var(--gold-deep);
    /* gold tone */
    font-weight: bolder;
    font-size: 1rem;
    padding: 0.6em 1.4em;
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    cursor: pointer;

    /* Text emboss */
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8),
        0px -1px 0px rgba(255, 255, 255, 0.2);

    /* Inner glow effect */
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 6px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(255, 90, 50, 0.35);
    transition: all 0.2s ease-in-out;
}

.direction-btn:hover {
    /* background: linear-gradient(180deg, #b3352b 0%, #851f18 100%); */
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 6px rgba(0, 0, 0, 0.6),
        0 0 18px rgba(255, 120, 70, 0.55);
}

.direction-btn:active {
    /* background: linear-gradient(180deg, #8b241c 0%, #5a140e 100%); */
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
}

.direction-btn svg {
    fill: #333;
    width: 18px;
    height: 18px;
}


/* =============== PLAYERS RAIL =============== */
.players-rail {
    display: flex;
    gap: 18px;
    padding: 10px 4px 14px;
    overflow-x: auto;
}


.player-chip__row {
    display: flex;
    align-items: center;
    gap: 12px;
}



.crown {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 22px;
    background:
        radial-gradient(circle at 20% 10%, #FFE9A8 0 40%, transparent 42%),
        radial-gradient(circle at 80% 10%, #FFE9A8 0 40%, transparent 42%),
        linear-gradient(180deg, #F7D88A, #CFA247);
    clip-path: polygon(0 100%, 10% 50%, 25% 70%, 40% 35%, 50% 70%, 60% 35%, 75% 70%, 90% 50%, 100% 100%);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}


.player-pill {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .3px;
    color: #fff;
    box-shadow: inset 0 1px 0 #fff2, var(--shadow-1);
}

.player-pill--bank {
    background: linear-gradient(180deg, #2C4FA8, #18397E);
    border: 1px solid #2F63D5;
}

.player-pill--normal {
    background: linear-gradient(180deg, #E6C166, #CDA34A);
    color: #2B1B03;
    border: 1px solid #F0DCA5;
}

/* small badge below avatar (K/H) */
.badge-round {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #E6C166, #CDA34A);
    color: #271a06;
    font: 900 12px/1 system-ui;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid #F0DCA5;
    box-shadow: 0 8px 18px #0006;
}

/* dots & status */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #39d98a;
    margin-left: auto;
    box-shadow: 0 0 12px #39d98a70;
}

.player-chip.is-rolling {
    outline: 2px solid #39d98a;
    outline-offset: 5px;
}

/* dice faces inline under chip */
.player-chip__faces {
    margin-top: 6px;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--ink);
    text-shadow: 0 2px 0 #000;
}

/* =============== ARENA (table & ring) =============== */
.arena {
    position: relative;
    display: grid;
    place-items: center;
}

.table-wrap {
    position: relative;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
}

.felt {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.felt::after {
    /* glossy arc */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .08), transparent 50%);
    pointer-events: none;
}

/* =============== ROLL BUTTON (gold coin) =============== */
.roll-cta {
    position: absolute;
    right: 28px;
    bottom: calc(28px + var(--safe-bottom));
    min-width: 148px;
    min-height: 148px;
    border-radius: 999px;
    color: #163B2A;
    text-align: center;
    background:
        radial-gradient(120% 120% at 50% 0, #F6E6B7 0, #E6C166 50%, #CDA34A 100%);
    border: 3px solid var(--gold-line);
    box-shadow: 0 26px 60px rgba(205, 163, 74, .45), inset 0 3px 0 #fff7;
    font: 900 24px/1.1 "Georgia", ui-serif;
    display: grid;
    place-items: center;
    padding: 10px;
}

.roll-cta:disabled {
    opacity: .55;
    filter: grayscale(.35);
    box-shadow: none;
}

/* =============== CHIP + TOTAL =============== */
.betbar {
    position: absolute;
    left: 24px;
    bottom: calc(20px + var(--safe-bottom));
    display: flex;
    align-items: center;
    gap: 26px;
}

.label {
    font: 700 18px/1.1 "Georgia", ui-serif;
    color: var(--gold);
    letter-spacing: .6px;
}

/* fallback color for the wedge tone if you don't already have it */

.total-amt {
    font: 900 40px/1 "Georgia", ui-serif;
    letter-spacing: 1px;
}

/* =============== TOAST (You lost $10) =============== */
.toast {
    position: absolute;
    left: 26px;
    top: 26px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #1f2a36;
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--ink);
    box-shadow: var(--shadow-1);
}

/* =============== MIC BUTTONS =============== */

/* Utility */
.hidden {
    visibility: hidden;
}

.gold-link {
    color: var(--gold);
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1rem;
    text-overflow: ellipsis;
    cursor: pointer;
}

.gold-link.back-btn {
    font-size: 1.3rem;
}

span.gold-link {
    cursor: default;
}

.gold-link.money {
    font-size: 1.5rem;
}

.gold-link.money::first-letter {
    font-size: .8rem;
}

/* Generic helper: any gold-link that prints a Z-prefixed amount can opt into first-letter sizing */
.gold-link b::first-letter {
    font-size: .8rem;
}