/* Fortune Wheel — frontend styles */

/* Trigger button (floating) */
.fw-trigger {
    width: var(--fw-btn-size);
    height: var(--fw-btn-size);
    border-radius: 50%;
    border: none;
    background-color: var(--fw-btn-bg);
    color: var(--fw-btn-color);
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: fw-pulse 2.2s ease-in-out infinite;
    overflow: hidden;
}
.fw-trigger img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}
.fw-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.fw-trigger-text { display: inline-block; }

@keyframes fw-pulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 59, 59, .55); }
    50%      { box-shadow: 0 6px 22px rgba(0, 0, 0, .35), 0 0 0 18px rgba(255, 59, 59, 0); }
}

/* Inline trigger via shortcode */
.fw-inline-trigger {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.fw-inline-trigger:hover { transform: translateY(-2px); }

/* Modal base */
.fw-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fw-modal.is-open { display: flex; animation: fw-fade-in .25s ease; }
.fw-modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--fw-overlay, rgba(0,0,0,.75));
    backdrop-filter: blur(2px);
}
.fw-modal-content {
    position: relative;
    z-index: 2;
    max-width: 95vw;
    max-height: 95vh;
    animation: fw-scale-in .35s cubic-bezier(.18,.89,.32,1.28);
}

@keyframes fw-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fw-scale-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }

.fw-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #222;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fw-close:hover { background: #f0f0f0; }

/* Wheel popup */
.fw-wheel-content {
    background: transparent;
    padding: 30px;
}
.fw-wheel-wrap {
    position: relative;
    width: var(--fw-wheel-size);
    max-width: 90vw;
    aspect-ratio: 1 / 1;
}
#fw-wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: var(--fw-border-width) solid var(--fw-border-color);
    box-shadow: 0 0 0 6px rgba(0, 0, 0, .25), 0 20px 60px rgba(0, 0, 0, .55);
    background: #1a1a2e;
    will-change: transform;
}
.fw-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-top: 36px solid var(--fw-pointer-color);
    z-index: 5;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.5));
}
.fw-spin-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 22%;
    height: 22%;
    border-radius: 50%;
    border: 4px solid var(--fw-border-color);
    cursor: pointer;
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 4;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
    transition: transform .2s ease;
}
.fw-spin-btn:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.06); }
.fw-spin-btn:disabled { cursor: default; opacity: .85; }

/* Win popup */
.fw-win-content {
    background: var(--fw-popup-bg);
    color: var(--fw-popup-color);
    border-radius: 20px;
    padding: 40px 36px 36px;
    width: min(440px, 95vw);
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .6);
}
.fw-gift {
    width: 180px;
    height: auto;
    margin: -90px auto 18px;
    display: block;
}
.fw-gift-default {
    font-size: 120px;
    line-height: 1;
    margin: -30px auto 12px;
    width: auto;
    height: auto;
}
.fw-prize {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}
.fw-popup-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--fw-popup-color);
}
.fw-popup-sub {
    margin: 0 0 22px;
    opacity: .85;
    font-size: 15px;
}
.fw-cta-btn {
    display: inline-block;
    background: var(--fw-popup-btn-bg);
    color: var(--fw-popup-btn-color);
    padding: 14px 40px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fw-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
    color: var(--fw-popup-btn-color);
}

/* Lock body scroll while modal open */
body.fw-locked { overflow: hidden; }

/* Mobile tweaks */
@media (max-width: 600px) {
    .fw-prize { font-size: 34px; }
    .fw-popup-title { font-size: 22px; }
    .fw-gift { width: 140px; margin-top: -70px; }
    .fw-close { top: 6px; right: 6px; }
}
