/*
 * Fortune wheel page (wheel.aspx)
 * Layout copied from the designer style.css fortune-wheel block.
 * Master loads style-theme-N.css, which still has the old .wheel-container rules,
 * and style.css itself is not linked. This file supplies the new look.
 */

.fw-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    padding: 40px 30px;
    border-radius: 10px;
    overflow: hidden;
    background: url(../images/event/wheel/fw-bg.webp?v=1) no-repeat center bottom / cover;
    box-shadow: inset 0 0 0 1px rgba(255, 200, 80, .35), var(--box-shadow);
}

.fw-wheel {
    position: relative;
    width: min(46%, 520px);
    aspect-ratio: 814 / 817;
    flex-shrink: 0;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6));
}

/* disc sits inside the frame's inner ring (measured from fw-frame.webp: centre 407,431 / r~310 of 814x817) */
.fw-disc {
    position: absolute;
    left: 11.9%;
    top: 14.8%;
    width: 76.2%;
    aspect-ratio: 1;
    border-radius: 50%;
    container-type: inline-size;
    background:
        repeating-conic-gradient(#f6c453 0deg 0.6deg, transparent 0.6deg 29.4deg, #f6c453 29.4deg 30deg),
        repeating-conic-gradient(#0a1d6b 0deg 30deg, #06124a 30deg 60deg),
        #06124a;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, .7), inset 0 0 0 3px #f6c453;
    transition: transform 6s cubic-bezier(.15, .85, .2, 1);
}

.fw-disc::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 120, 255, .35) 0%, transparent 60%);
    pointer-events: none;
}

.fw-label {
    position: absolute;
    left: 50%;
    top: 0;
    height: 50%;
    width: 1em;
    margin-left: -.5em;
    line-height: 1;
    padding-top: 7cqw;
    transform-origin: 50% 100%;
    writing-mode: vertical-rl;
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 800;
    font-size: 4cqw;
    letter-spacing: .2px;
    white-space: nowrap;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff6d1, #f6c453 55%, #c8871d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .9));
    z-index: 1;
}

.fw-label.fw-label-2 {
    width: 2em;
    margin-left: -1em;
    padding-bottom: 17cqw;
    white-space: normal;
    text-wrap: balance;
    text-align: center;
}

.fw-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    pointer-events: none;
    z-index: 2;
}

.fw-pointer {
    position: absolute;
    left: 50%;
    top: 7%;
    width: 11%;
    transform: translateX(-50%);
    z-index: 3;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6));
}

.fw-center {
    position: absolute;
    left: 50%;
    top: 52.75%;
    width: 15%;
    transform: translate(-50%, -50%);
    z-index: 3;
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(246, 196, 83, .6);
}

.fw-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(48%, 560px);
}

.fw-title {
    width: 100%;
}

.fw-spin {
    width: 70%;
    margin-top: -10px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    animation: fw-pulse 1.4s ease-in-out infinite;
}

.fw-spin img {
    width: 100%;
}

.fw-spin:hover {
    animation-play-state: paused;
    filter: brightness(1.15) drop-shadow(0 0 14px rgba(246, 196, 83, .9));
}

.fw-spin:disabled {
    animation: none;
    filter: grayscale(0.35) brightness(0.75);
    cursor: not-allowed;
}

@keyframes fw-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(246, 196, 83, .4));
    }
    50% {
        transform: scale(1.07);
        filter: drop-shadow(0 0 16px rgba(246, 196, 83, .9));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fw-spin {
        animation: none;
    }
}

.fw-pill-row {
    display: flex;
    gap: 14px;
    width: 100%;
}

.fw-pill {
    flex: 1;
    padding: 12px 15px;
    border-radius: 30px;
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    background: linear-gradient(to bottom, #0a1d6b, #06124a);
    border: 2px solid #e9b24a;
    box-shadow: 0 0 12px rgba(233, 178, 74, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
}

button.fw-pill {
    cursor: pointer;
}

.fw-pill-wide {
    width: 100%;
}

.fw-pill span {
    color: #f6c453;
}

button.fw-pill:hover {
    filter: brightness(1.25);
}

.wheel-tnc li {
    margin-bottom: 10px;
}

#fw-result-text {
    word-break: break-word;
}

@media only screen and (max-width: 991px) {
    .fw-stage {
        flex-direction: column;
        gap: 12px;
        padding: 20px 15px;
    }

    .fw-panel {
        display: contents;
    }

    .fw-title {
        order: -1;
    }

    .fw-wheel,
    .fw-title,
    .fw-pill-wide,
    .fw-pill-row {
        width: 100%;
        max-width: 420px;
    }

    .fw-spin {
        width: 80%;
        max-width: 340px;
        margin-top: 0;
    }
}
