/*
 * WAWA Lucky Number Slot v1.0.5
 * High-contrast mystical gold/cyan theme designed to stand out on dark purple pages.
 */

.WAWA-lucky-number {
    --WAWA-lucky-gold: #ffd166;
    --WAWA-lucky-gold-strong: #ffb703;
    --WAWA-lucky-amber: #ff8a00;
    --WAWA-lucky-cyan: #00eaff;
    --WAWA-lucky-ink: #12051f;
    --WAWA-lucky-panel: #09030f;
    --WAWA-lucky-text: #fffaf0;

    width: 100%;
    max-width: 100%;
    margin: 22px auto 0;
    padding: 0 12px 0 0;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
    color: var(--WAWA-lucky-text) !important;
    font-family: 'Prompt', sans-serif !important;
    font-size: clamp(14px, calc(11.77px + 0.5714vw), 20px) !important;
    line-height: 1.55;
    text-align: center;
}

.WAWA-lucky-number,
.WAWA-lucky-number * {
    box-sizing: border-box;
}

.WAWA-lucky-number[hidden] {
    display: none !important;
}

/* Keep legacy labels/results hidden if an older page cache still contains them. */
.WAWA-lucky-number__eyebrow,
.WAWA-lucky-number__subtitle,
.WAWA-lucky-number__result,
.WAWA-lucky-number [data-wawa-result] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.WAWA-lucky-number__card {
    position: relative;
    width: 100%;
    padding: clamp(14px, 2vw, 24px);
    overflow: hidden;
    border: 2px solid var(--WAWA-lucky-gold-strong);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% -15%, rgba(255, 183, 3, 0.24), transparent 42%),
        linear-gradient(180deg, #16051f 0%, #09030f 62%, #050208 100%);
    box-shadow:
        0 0 0 1px rgba(255, 209, 102, 0.16),
        0 0 22px rgba(255, 183, 3, 0.32),
        inset 0 0 30px rgba(255, 138, 0, 0.08);
}

.WAWA-lucky-number__card::before {
    content: '';
    position: absolute;
    inset: 0 12% auto 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--WAWA-lucky-cyan), transparent);
    box-shadow: 0 0 10px rgba(0, 234, 255, 0.72);
    pointer-events: none;
}

.WAWA-lucky-number__close {
    appearance: none;
    position: absolute;
    top: -18px;
    right: -3px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid var(--WAWA-lucky-gold-strong);
    border-radius: 50%;
    color: #ffffff !important;
    background: #14051f;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.52);
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 25px !important;
    font-weight: 400;
    line-height: 1 !important;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.WAWA-lucky-number__close:hover {
    transform: scale(1.08);
    background: #2b0b3d;
    border-color: var(--WAWA-lucky-cyan);
    box-shadow: 0 0 10px rgba(0, 234, 255, .55), 0 0 18px rgba(255, 183, 3, .42);
}

.WAWA-lucky-number__close:focus-visible {
    outline: 3px solid rgba(0, 234, 255, .38);
    outline-offset: 3px;
}

.WAWA-lucky-number__close span {
    display: block;
    transform: translateY(-1px);
}

.WAWA-lucky-number__inner {
    width: min(100%, 520px);
    margin: 0 auto;
}

.WAWA-lucky-number__title {
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: var(--WAWA-lucky-gold) !important;
    font-size: clamp(22px, 2.8vw, 34px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: .01em;
    text-shadow:
        0 0 8px rgba(255, 209, 102, .32),
        0 0 18px rgba(255, 138, 0, .26);
}

.WAWA-lucky-number__machine {
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.4vw, 14px);
    width: min(100%, 330px);
    margin: 0 auto 16px;
    padding: clamp(9px, 1.6vw, 14px);
    border: 1px solid rgba(0, 234, 255, .78);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(0, 234, 255, .08), rgba(255, 183, 3, .04));
    box-shadow:
        0 0 14px rgba(0, 234, 255, .18),
        inset 0 0 18px rgba(0, 234, 255, .05);
}

.WAWA-lucky-number__reel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    aspect-ratio: .92 / 1;
    overflow: hidden;
    border: 2px solid rgba(255, 209, 102, .96);
    border-radius: 15px;
    background:
        linear-gradient(180deg, #fffdf7 0%, #fff2c9 50%, #fffdf7 100%);
    box-shadow:
        inset 0 0 12px rgba(255, 183, 3, .18),
        0 0 12px rgba(255, 183, 3, .30);
}

.WAWA-lucky-number__reel::before,
.WAWA-lucky-number__reel::after {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(18, 5, 31, .20), transparent);
    pointer-events: none;
}

.WAWA-lucky-number__reel::before { top: 22%; }
.WAWA-lucky-number__reel::after { bottom: 22%; }

.WAWA-lucky-number__digit {
    display: block;
    max-width: 100%;
    color: #251038 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: clamp(38px, 16vw, 66px) !important;
    font-weight: 900 !important;
    line-height: .88 !important;
    font-variant-numeric: tabular-nums;
    text-shadow:
        0 2px 0 rgba(255,255,255,.95),
        0 0 10px rgba(255, 183, 3, .28);
    transform: translateZ(0);
}

.WAWA-lucky-number__reel.WAWA-lucky-number__reel--spinning .WAWA-lucky-number__digit {
    animation: WAWA-lucky-number-pulse .12s linear infinite;
    filter: blur(.55px);
}

.WAWA-lucky-number__reel.WAWA-lucky-number__reel--stopped {
    border-color: var(--WAWA-lucky-cyan);
    box-shadow:
        0 0 12px rgba(0, 234, 255, .75),
        0 0 22px rgba(255, 183, 3, .38),
        inset 0 0 12px rgba(0, 234, 255, .10);
}

.WAWA-lucky-number__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.WAWA-lucky-number__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(100%, 330px);
    min-height: 52px;
    max-width: 100%;
    padding: 11px 20px;
    border: 2px solid #fff0b8;
    border-radius: 999px;
    color: #24102f !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 800 !important;
    line-height: 1.25;
    cursor: pointer;
    background: linear-gradient(180deg, #ffe38a 0%, #ffbf19 52%, #ff8a00 100%);
    box-shadow:
        0 0 14px rgba(255, 183, 3, .58),
        0 5px 0 #9a4200,
        inset 0 1px 0 rgba(255,255,255,.85);
    text-shadow: 0 1px 0 rgba(255,255,255,.48);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    animation: WAWA-lucky-number-cta 2.2s ease-in-out infinite;
}

.WAWA-lucky-number__button:hover {
    transform: translateY(-2px) scale(1.015);
    filter: brightness(1.06) saturate(1.06);
    box-shadow:
        0 0 18px rgba(255, 209, 102, .80),
        0 0 28px rgba(0, 234, 255, .28),
        0 6px 0 #8d3900,
        inset 0 1px 0 rgba(255,255,255,.9);
}

.WAWA-lucky-number__button:active {
    transform: translateY(3px);
    box-shadow:
        0 0 12px rgba(255, 183, 3, .52),
        0 2px 0 #8d3900,
        inset 0 1px 0 rgba(255,255,255,.75);
}

.WAWA-lucky-number__button:focus-visible {
    outline: 3px solid rgba(0, 234, 255, .55);
    outline-offset: 3px;
}

.WAWA-lucky-number__button:disabled {
    opacity: .72;
    cursor: wait;
    transform: none;
    animation: none;
}

.WAWA-lucky-number__button-icon {
    color: #ffffff !important;
    font-size: 1.15em !important;
    line-height: 1;
    text-shadow: 0 0 8px rgba(255,255,255,.9);
}

@keyframes WAWA-lucky-number-pulse {
    0% { transform: translateY(-3px) scaleY(1.03); }
    50% { transform: translateY(3px) scaleY(.98); }
    100% { transform: translateY(-3px) scaleY(1.03); }
}

@keyframes WAWA-lucky-number-cta {
    0%, 100% { box-shadow: 0 0 12px rgba(255,183,3,.48), 0 5px 0 #9a4200, inset 0 1px 0 rgba(255,255,255,.85); }
    50% { box-shadow: 0 0 22px rgba(255,209,102,.82), 0 0 30px rgba(0,234,255,.16), 0 5px 0 #9a4200, inset 0 1px 0 rgba(255,255,255,.85); }
}

@supports (font-size: 1cqi) {
    .WAWA-lucky-number__digit {
        font-size: clamp(34px, 28cqi, 66px) !important;
    }
}

@media (max-width: 767px) {
    .WAWA-lucky-number {
        margin-top: 18px;
        padding-right: 10px;
        font-size: 14px !important;
    }

    .WAWA-lucky-number__card {
        padding: 12px;
        border-radius: 18px;
    }

    .WAWA-lucky-number__close {
        top: -16px;
        right: -2px;
        width: 32px;
        height: 32px;
        font-size: 22px !important;
    }

    .WAWA-lucky-number__title {
        margin-bottom: 12px !important;
        font-size: clamp(21px, 7vw, 29px) !important;
    }

    .WAWA-lucky-number__machine {
        width: min(100%, 270px);
        gap: 8px;
        padding: 9px;
        border-radius: 15px;
        margin-bottom: 14px;
    }

    .WAWA-lucky-number__reel {
        border-radius: 13px;
    }

    .WAWA-lucky-number__digit {
        font-size: clamp(34px, 16vw, 54px) !important;
    }

    .WAWA-lucky-number__button {
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .WAWA-lucky-number__reel.WAWA-lucky-number__reel--spinning .WAWA-lucky-number__digit {
        animation: none;
        filter: none;
    }

    .WAWA-lucky-number__button,
    .WAWA-lucky-number__close {
        transition: none;
        animation: none;
    }
}
