
@keyframes rl-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
@scope ([data-iw4m-plugin="Credify"]) to ([data-iw4m-host]) {
/*
 * Credify Roulette table styling. Bespoke `.rl-*` classes only, served at
 * /_content/credify/roulette/roulette.css. Tailwind utilities used in the page come from plugin.css
 * (the `plugins` layer). Host design tokens (--color-*) referenced where they help match the theme.
 */

.rl-felt {
    background:
        radial-gradient(130% 110% at 50% -10%, #15532f 0%, #0e3d22 45%, #06200f 100%);
    border-radius: 1rem;
    box-shadow: inset 0 0 130px rgba(0, 0, 0, 0.5);
}

.rl-chip-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
    font-size: 0.85rem;
}
.rl-muted { color: rgba(255, 255, 255, 0.5); font-weight: 500; }

.rl-panel {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    padding: 1.25rem;
}

/* ── status / countdown ────────────────────────────────────────────── */
.rl-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.3);
}
.rl-status-betting { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.4); }
.rl-status-spinning { color: #fcd34d; border-color: rgba(245, 158, 11, 0.45); }
.rl-status-idle { color: #cbd5e1; }
.rl-countdown { font-variant-numeric: tabular-nums; }

.rl-countbar {
    height: 0.35rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}
.rl-countbar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.25s linear;
}

/* ── wheel ─────────────────────────────────────────────────────────── */
.rl-wheel {
    position: relative;
    width: 18rem;
    height: 18rem;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #3a2410, #5b3a18, #3a2410 25%, #5b3a18 50%, #3a2410 75%, #5b3a18);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 0.5rem #2a1a0c;
    padding: 0.6rem;
}
.rl-wheel-inner {
    position: absolute;
    inset: 0.6rem;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #1c1c22 0%, #0c0c10 70%);
    will-change: transform;
}
.rl-pocket {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
}
.rl-pocket-num {
    margin-top: 0.18rem;
    min-width: 1.2rem;
    padding: 0.12rem 0.18rem;
    border-radius: 0.2rem;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.rl-wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4.5rem;
    height: 4.5rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #caa46a, #6b4a1f 70%, #3a2810);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.rl-wheel-pointer {
    position: absolute;
    top: -0.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.7rem solid transparent;
    border-right: 0.7rem solid transparent;
    border-top: 1.1rem solid #fcd34d;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
    z-index: 3;
}

/* result chip under the wheel */
.rl-result {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-weight: 800;
    animation: rl-pop 0.4s ease-out both;
}
.rl-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.4rem;
    border-radius: 0.4rem;
    font-weight: 800;
    color: #fff;
}
.rl-red { background: #b32430; }
.rl-black { background: #15151a; border: 1px solid rgba(255, 255, 255, 0.18); }
.rl-green { background: #0a7d3c; }

/* history strip */
.rl-history { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.rl-history .rl-num-badge { min-width: 1.5rem; height: 1.5rem; font-size: 0.8rem; }

/* ── betting board ─────────────────────────────────────────────────── */
.rl-board { display: flex; flex-direction: column; gap: 0.4rem; }
.rl-zero-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.3rem; }
.rl-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.25rem;
}
.rl-cell {
    aspect-ratio: 1 / 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.07s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.rl-cell:not(:disabled):hover { filter: brightness(1.25); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); }
.rl-cell:disabled { opacity: 0.5; cursor: not-allowed; }
.rl-cell.rl-red { background: #b32430; }
.rl-cell.rl-black { background: #1c1c22; }
.rl-cell.rl-green { background: #0a7d3c; grid-column: span 1; }

.rl-outside { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
.rl-bet {
    padding: 0.5rem 0.4rem;
    border-radius: 0.4rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.07s ease, filter 0.12s ease;
}
.rl-bet:not(:disabled):hover { filter: brightness(1.3); transform: translateY(-1px); }
.rl-bet:disabled { opacity: 0.5; cursor: not-allowed; }
.rl-bet-red { background: rgba(179, 36, 48, 0.85); }
.rl-bet-black { background: rgba(28, 28, 34, 0.95); }

/* chips (stake selector) */
.rl-chip {
    min-width: 3rem;
    padding: 0.45rem 0.6rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    background: radial-gradient(circle at 50% 30%, #047857, #064e3b);
    border: 2px dashed rgba(255, 255, 255, 0.45);
    transition: transform 0.08s ease, filter 0.15s ease;
}
.rl-chip:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-2px); }
.rl-chip.rl-chip-on { box-shadow: 0 0 0 2px #fcd34d, 0 0 16px rgba(252, 211, 77, 0.5); }
.rl-chip:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── participants ──────────────────────────────────────────────────── */
.rl-seats { display: flex; flex-direction: column; gap: 0.4rem; }
.rl-seat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.875rem;
}
.rl-seat-you { border-color: rgba(252, 211, 77, 0.4); background: rgba(252, 211, 77, 0.06); }
.rl-seat-bet { font-size: 0.78rem; color: #c7d2fe; }
.rl-seat-won { color: #6ee7b7; font-weight: 700; }
.rl-seat-lost { color: #fda4af; font-weight: 700; }
.rl-seat-pending { color: #fcd34d; }

/* buttons */
.rl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
    color: #fff;
    transition: transform 0.08s ease, filter 0.15s ease;
}
.rl-btn:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-1px); }
.rl-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rl-btn-primary { background: var(--color-action-primary, #6366f1); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35); }
.rl-btn-ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); }

.rl-toast {
    padding: 0.5rem 0.9rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(244, 63, 94, 0.16);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

/* bet slip (pending bets being built) + placed bets */
.rl-slip, .rl-placed { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.rl-slip-chip, .rl-placed-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.6rem; border-radius: 0.5rem;
    font-size: 0.8rem; font-weight: 700; color: #e4e4e7;
}
.rl-slip-chip { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.rl-slip-chip:hover:not(:disabled) { background: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.4); }
.rl-slip-chip i { opacity: 0.6; }
.rl-placed-chip { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); }

@media (min-width: 640px) {
    .rl-wheel { width: 21rem; height: 21rem; }
    .rl-pocket-num { font-size: 0.68rem; }
}

}
