/* =========================================================
   Launch Wheel Widget — launch-wheel.css
   Mobile-first. Uses site CSS custom properties where they
   exist; falls back to wheel-specific values otherwise.
   ========================================================= */

/* ── Overlay ─────────────────────────────────────────────── */
.lw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 16px;
    align-items: center;
    justify-content: center;
    overscroll-behavior: contain;
}
.lw-overlay.show { display: flex; }

/* ── Dialog ──────────────────────────────────────────────── */
.lw-dialog {
    background: #fff8fa;
    border-radius: 18px;
    padding: 18px 18px 20px;
    width: 100%;
    max-width: 332px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* ── Close button ────────────────────────────────────────── */
.lw-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    padding: 0;
    transition: background 0.15s;
}
.lw-close:hover  { background: rgba(0, 0, 0, 0.06); }
.lw-close:focus-visible { outline: 2px solid #e50050; outline-offset: 2px; }

/* ── Header ──────────────────────────────────────────────── */
.lw-header { text-align: center; padding-top: 4px; }

.lw-badge {
    display: inline-block;
    background: rgba(229, 0, 80, 0.08);
    color: #e50050;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.lw-title {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.05;
    color: #0a0a0a;
    margin: 0 0 7px;
}

.lw-subtitle {
    font-size: 13px;
    color: #737373;
    line-height: 1.35;
    margin: 0;
    padding: 0 8px;
}

/* ── Wheel wrapper ───────────────────────────────────────── */
.lw-wheel-wrap {
    width: min(216px, calc(100% - 40px));
    margin: 16px auto 0;
}

.lw-pointer {
    display: block;
    margin: 0 auto;
    margin-bottom: -18px;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.lw-canvas-wrap {
    position: relative;
}

.lw-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: 0 18px 32px rgba(229, 0, 80, 0.18);
}

.lw-center-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e50050;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #e50050;
    line-height: 1;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    font-family: var(--font, 'Inter', -apple-system, sans-serif);
}

/* ── Spin button ─────────────────────────────────────────── */
.lw-spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff1764 0%, #e50050 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    margin-top: 18px;
    box-shadow: 0 8px 16px rgba(229, 0, 80, 0.22);
    font-family: var(--font, 'Inter', -apple-system, sans-serif);
    transition: opacity 0.15s, transform 0.15s;
}
.lw-spin-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.lw-spin-btn:active:not(:disabled) { transform: none; }
.lw-spin-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.lw-spin-btn:focus-visible { outline: 2px solid #e50050; outline-offset: 2px; }

/* ── Result section ──────────────────────────────────────── */
#lwSpinSection.hidden { display: none; }

.lw-result { display: none; }
.lw-result.show { display: block; }

.lw-result-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ffd6e2;
    padding: 18px;
    text-align: center;
    margin-top: 24px;
}

.lw-result-title {
    color: #e50050;
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 8px;
}

.lw-result-amount {
    font-size: 34px;
    font-weight: 900;
    color: #0a0a0a;
    line-height: 1;
    margin: 0 0 10px;
}

.lw-result-help {
    font-size: 13px;
    color: #737373;
    line-height: 1.35;
    margin: 0;
}

/* ── CTA buttons ─────────────────────────────────────────── */
.lw-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff1764 0%, #e50050 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 14px;
    padding: 0 16px;
    box-shadow: 0 8px 16px rgba(229, 0, 80, 0.22);
    font-family: var(--font, 'Inter', -apple-system, sans-serif);
    transition: opacity 0.15s;
    text-align: center;
}
.lw-cta-btn:hover { opacity: 0.92; }
.lw-cta-btn:focus-visible { outline: 2px solid #e50050; outline-offset: 2px; }

.lw-cta-secondary {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #e50050;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    padding: 8px;
    font-family: var(--font, 'Inter', -apple-system, sans-serif);
    text-align: center;
    transition: text-decoration 0.1s;
}
.lw-cta-secondary:hover { text-decoration: underline; }
.lw-cta-secondary:focus-visible { outline: 2px solid #e50050; outline-offset: 2px; }

/* ── Error ───────────────────────────────────────────────── */
.lw-error {
    display: none;
    color: #c20041;
    font-size: 13px;
    text-align: center;
    padding: 8px 12px;
    background: rgba(229, 0, 80, 0.06);
    border-radius: 8px;
    margin-top: 12px;
}
.lw-error.show { display: block; }

/* ── Terms ───────────────────────────────────────────────── */
.lw-terms {
    font-size: 12px;
    color: #a3a3a3;
    text-align: center;
    margin: 16px 0 0;
    line-height: 1.35;
}

/* ── Floating pill ───────────────────────────────────────── */
.lw-pill {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 1100;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1764 0%, #e50050 100%);
    border: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 4px 16px rgba(229, 0, 80, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.lw-pill:hover  { transform: scale(1.08); }
.lw-pill:focus-visible { outline: 2px solid #e50050; outline-offset: 3px; }
.lw-pill.hidden { display: none; }

/* ── Toast ───────────────────────────────────────────────── */
.lw-toast {
    position: fixed;
    bottom: 144px;
    right: 16px;
    z-index: 1300;
    background: #20242b;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    max-width: 280px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
    font-family: var(--font, 'Inter', -apple-system, sans-serif);
}
.lw-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 480px) {
    .lw-title     { font-size: 30px; }
    .lw-subtitle  { font-size: 15px; }
    .lw-wheel-wrap { width: min(320px, calc(100% - 24px)); }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lw-spin-btn,
    .lw-cta-btn,
    .lw-pill,
    .lw-close { transition: none; }
    .lw-toast  { transition: none; opacity: 1; transform: none; }
}
