/* The lucky wheel of the purchase pages (Views/Clinic/Pricing/_LuckyWheel.cshtml): a "special gift", not a casino.
   The stage is the same deep navy and gold in both themes. */

/* ---------- the card: a navy coupon with a gold perforation ---------- */
.lw-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 4px;
    padding: 12px 14px 12px 12px;
    border-radius: 14px;
    background: radial-gradient(130% 120% at 0% 0%, #2A4790 0%, #142552 60%, #0B1430 100%);
    color: #fff;
    box-shadow: 0 10px 24px -14px rgba(20, 37, 82, .7);
    overflow: hidden;
}
.lw-card::before, .lw-card::after {
    /* the notches of a ticket */
    content: "";
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    background: var(--surface, #fff);
}
.lw-card::before { left: -8px; }
.lw-card::after { right: -8px; }
.lw-card .lw-perf {
    position: absolute;
    top: 10px;
    bottom: 10px;
    inset-inline-end: 74px;
    border-inline-start: 2px dashed rgba(246, 196, 69, .55);
}
.lw-card .lw-mini-box { position: relative; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(from 20deg, #B8862B, #F9DA7A, #C9952F, #FFE9A8, #B8862B); padding: 3px; }
.lw-card .lw-mini-box svg { width: 100%; height: 100%; border-radius: 50%; display: block; }
.lw-card .lw-card-text { flex: 1; min-width: 0; }
.lw-card .lw-card-title { display: block; font-weight: 800; font-size: 14px; line-height: 1.5; }
.lw-card .lw-card-sub { display: block; font-size: 12px; color: #C4D0EC; line-height: 1.6; }
.lw-card .lw-chip {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 8px;
    border-radius: 99px;
    font-size: 11px;
    color: #142552;
    background: #F6C445;
    font-weight: 700;
}
.lw-card .lw-card-btn {
    flex: 0 0 auto;
    min-width: 62px;
    border: 0;
    border-radius: 99px;
    padding: 8px 12px;
    background: radial-gradient(circle at 35% 30%, #FFF1BF, #F6C445 45%, #C9952F 100%);
    color: #142552;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.lw-card .lw-card-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lw-card.is-disabled { filter: grayscale(.55); opacity: .82; }
.lw-card.is-disabled .lw-card-btn { cursor: not-allowed; opacity: .6; }
.lw-card.is-won .lw-card-btn { background: #fff; }
.lw-card .lw-countdown { display: block; font-size: 11px; color: #F9DA7A; margin-top: 2px; }

/* the code field while a prize sits on the invoice */
.lw-code-note { font-size: 12px; color: var(--muted, #7A8099); margin: 6px 0 0; line-height: 1.7; }
.lw-code-note button { border: 0; background: none; padding: 0; color: var(--accent, #2F6BFF); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- the modal ---------- */
.lw-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 14, 34, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .25s;
}
/* the modal is moved to the body (LuckyWheel.js), outside the [hidden] rule of .zp */
.lw-modal[hidden], .lw-modal [hidden] { display: none !important; }
.lw-modal { font-family: IRANSans, Tahoma, sans-serif; direction: rtl; }
.lw-modal.is-open { opacity: 1; }
.lw-dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 20px;
    padding: 22px 18px 20px;
    background: radial-gradient(120% 90% at 50% 25%, #2A4790 0%, #142552 55%, #0B1430 100%);
    border: 1px solid rgba(246, 196, 69, .3);
    color: #fff;
    text-align: center;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6);
    transform: translateY(12px) scale(.98);
    transition: transform .3s;
}
.lw-modal.is-open .lw-dialog { transform: none; }
.lw-dialog .lw-stars { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; overflow: hidden; }
.lw-dialog .lw-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #F9DA7A; opacity: .6; }
.lw-close {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 20px;
    line-height: 32px;
    cursor: pointer;
    z-index: 4;
}
.lw-dialog h3 { margin: 4px 30px 4px; font-size: 17px; font-weight: 800; color: #fff; }
.lw-dialog .lw-hint { color: #C4D0EC; font-size: 12px; margin: 0 0 14px; }

.lw-box { position: relative; width: min(300px, 82vw); aspect-ratio: 1; margin: 18px auto 10px; }
.lw-glow { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(246, 196, 69, .28), transparent 62%); }
.lw-rim {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 20deg, #B8862B, #F9DA7A, #C9952F, #FFE9A8, #B8862B, #F2CC5F, #B8862B);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.lw-box svg.lw-wheel { position: absolute; inset: 5.5%; width: 89%; height: 89%; border-radius: 50%; will-change: transform; }
.lw-box svg.lw-bulbs { position: absolute; inset: 0; width: 100%; height: 100%; }
.lw-bulbs circle { fill: #FFF3C4; opacity: .55; transition: opacity .15s; }
.lw-bulbs circle.on { opacity: 1; filter: drop-shadow(0 0 3px #FFE9A8); }
.lw-pointer { position: absolute; top: -4%; left: 50%; width: 13%; z-index: 3; transform: translateX(-50%); transform-origin: 50% 30%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.lw-pointer.is-tick { animation: lw-tick .12s ease-out; }
@keyframes lw-tick { 0% { transform: translateX(-50%) rotate(0); } 40% { transform: translateX(-50%) rotate(-14deg); } 100% { transform: translateX(-50%) rotate(0); } }
.lw-hub {
    position: absolute; inset: 0; margin: auto; width: 24%; height: 24%; border-radius: 50%; z-index: 2;
    border: 0; padding: 0; cursor: pointer;
    background: radial-gradient(circle at 35% 30%, #FFF1BF, #F6C445 45%, #B8862B 100%);
    color: #142552; font-weight: 800; font-size: 13px; line-height: 1.25; font-family: inherit;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .45), inset 0 -3px 6px rgba(0, 0, 0, .2), 0 0 0 5px #142552, 0 0 0 7px #F6C445;
    display: grid; place-items: center; text-align: center;
}
.lw-hub small { display: block; font-size: 10px; font-weight: 700; opacity: .8; }
.lw-hub:disabled { cursor: default; }

.lw-spin-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    color: #142552;
    background: linear-gradient(180deg, #FFE9A8, #F6C445 55%, #D9A63A);
    cursor: pointer;
}
.lw-spin-btn:disabled { opacity: .65; cursor: default; }
.lw-error { color: #FFB4B4; font-size: 12px; margin: 8px 0 0; }

/* ---------- the result: a white ticket that rises from the bottom ---------- */
.lw-ticket {
    position: relative;
    margin-top: 14px;
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: #fff;
    color: #18213D;
    text-align: start;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: lw-rise .45s cubic-bezier(.2, .8, .2, 1);
}
.lw-ticket::before, .lw-ticket::after {
    content: ""; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #142552;
}
.lw-ticket::before { left: -8px; }
.lw-ticket::after { right: -8px; }
.lw-ticket[hidden] { display: none; }
@keyframes lw-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.lw-ticket .lw-ticket-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: #142552; display: grid; place-items: center; }
.lw-ticket .lw-ticket-ico svg { width: 26px; height: 26px; }
.lw-ticket .lw-ticket-title { display: block; font-size: 17px; font-weight: 800; line-height: 1.5; }
.lw-ticket .lw-ticket-desc { display: block; font-size: 12.5px; color: #3F4254; line-height: 1.8; }
.lw-ticket .lw-ticket-applied { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: #12945B; }
.lw-ticket .lw-ticket-time { display: block; font-size: 11.5px; color: #7A8099; margin-top: 2px; }

.lw-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ---------- the card calls while the wheel can be spun ---------- */
.lw-card .lw-shine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 30%;
    pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 233, 168, .28), transparent);
    transform: skewX(-18deg);
    opacity: 0;
}
.lw-card:not(.is-disabled):not(.is-won) .lw-shine { animation: lw-shine 4.5s ease-in-out 1.2s infinite; }
.lw-card:not(.is-disabled):not(.is-won) .lw-mini-box svg { animation: lw-turn 14s linear infinite; }
.lw-card:not(.is-disabled):not(.is-won) .lw-card-btn { animation: lw-ring 2.2s ease-out infinite; }
@keyframes lw-shine { 0% { left: -40%; opacity: 0; } 8% { opacity: 1; } 30% { left: 120%; opacity: 0; } 100% { left: 120%; opacity: 0; } }
@keyframes lw-turn { to { transform: rotate(360deg); } }
@keyframes lw-ring {
    0% { box-shadow: 0 4px 10px rgba(0, 0, 0, .3), 0 0 0 0 rgba(246, 196, 69, .65); }
    70%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, .3), 0 0 0 12px rgba(246, 196, 69, 0); }
}
/* after "Later" of the invitation */
.lw-card.is-calling { animation: lw-call .65s ease-in-out 3; }
@keyframes lw-call {
    0%, 100% { transform: none; box-shadow: 0 10px 24px -14px rgba(20, 37, 82, .7); }
    25% { transform: rotate(-1.2deg) scale(1.02); }
    50% { box-shadow: 0 0 0 4px rgba(246, 196, 69, .55), 0 14px 30px -10px rgba(246, 196, 69, .6); }
    75% { transform: rotate(1.2deg) scale(1.02); }
}

/* ---------- the invitation when the page opens (made by LuckyWheel.js) ---------- */
.lw-invite {
    position: fixed;
    inset: 0;
    z-index: 1065;
    display: grid;
    place-items: center;
    padding: 16px;
    background: radial-gradient(circle at 50% 40%, rgba(42, 71, 144, .45), rgba(8, 14, 34, .72) 70%);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .25s;
    font-family: IRANSans, Tahoma, sans-serif;
    direction: rtl;
}
.lw-invite[hidden], .lw-invite [hidden] { display: none !important; }
.lw-invite.is-open { opacity: 1; }
.lw-invite-card {
    position: relative;
    width: min(360px, 100%);
    max-height: calc(100vh - 32px);
    overflow: hidden auto;
    border-radius: 24px;
    padding: 18px 20px 16px;
    background: radial-gradient(120% 80% at 50% 20%, #2A4790 0%, #142552 55%, #0B1430 100%);
    border: 1px solid rgba(246, 196, 69, .4);
    box-shadow: 0 0 0 6px rgba(246, 196, 69, .08), 0 30px 80px -20px rgba(0, 0, 0, .7);
    color: #fff;
    text-align: center;
    transform: translateY(40px) scale(.7);
    opacity: 0;
}
.lw-invite.is-open .lw-invite-card { animation: lw-pop .7s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes lw-pop { from { transform: translateY(40px) scale(.7); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
.lw-invite-card .lw-close { top: 10px; inset-inline-start: 10px; }

.lw-invite-stage { position: relative; width: 176px; aspect-ratio: 1; margin: 10px auto 6px; }
.lw-invite-rays {
    position: absolute;
    inset: -38%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, rgba(246, 196, 69, .26) 0 9deg, transparent 9deg 22.5deg);
    -webkit-mask: radial-gradient(circle, #000 28%, transparent 68%);
    mask: radial-gradient(circle, #000 28%, transparent 68%);
    animation: lw-turn 22s linear infinite;
}
.lw-invite-float { position: absolute; inset: 0; animation: lw-float 3.2s ease-in-out infinite; }
@keyframes lw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lw-invite-rim {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 7px;
    background: conic-gradient(from 20deg, #B8862B, #F9DA7A, #C9952F, #FFE9A8, #B8862B, #F2CC5F, #B8862B);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 40px rgba(246, 196, 69, .35), inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.lw-invite-wheel { display: block; width: 100%; height: 100%; border-radius: 50%; animation: lw-turn 9s linear infinite; }
.lw-invite.is-open .lw-invite-wheel { animation: lw-whirl 1.4s cubic-bezier(.2, .8, .3, 1), lw-turn 9s linear 1.4s infinite; }
@keyframes lw-whirl { from { transform: rotate(-540deg); } to { transform: rotate(0); } }
.lw-invite-pointer { position: absolute; top: -9%; left: 50%; width: 15%; transform: translateX(-50%); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); animation: lw-nod 1.6s ease-in-out infinite; transform-origin: 50% 30%; }
@keyframes lw-nod { 0%, 100% { transform: translateX(-50%) rotate(0); } 50% { transform: translateX(-50%) rotate(-10deg); } }
.lw-invite-hub {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22%;
    height: 22%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #FFF1BF, #F6C445 45%, #B8862B 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .45), 0 0 0 4px #142552, 0 0 0 6px #F6C445;
}
.lw-invite-hub svg { width: 62%; height: 62%; animation: lw-turn 6s linear infinite reverse; }

.lw-invite-sparks i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px;
    background: #FFE9A8;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scale(0);
    animation: lw-twinkle 1.6s ease-in-out var(--d) infinite;
    filter: drop-shadow(0 0 3px #F6C445);
}
@keyframes lw-twinkle {
    0%, 100% { transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scale(0); }
    50% { transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) scale(1.1); }
}

.lw-invite-badge {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    padding: 3px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 800;
    color: #142552;
    background: linear-gradient(90deg, #F6C445, #FFE9A8, #F6C445);
    background-size: 200% 100%;
    animation: lw-gold 2.4s linear infinite;
    box-shadow: 0 4px 12px -4px rgba(246, 196, 69, .7);
}
@keyframes lw-gold { to { background-position: -200% 0; } }
.lw-invite-card h3 {
    margin: 10px 0 4px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.5;
    background: linear-gradient(180deg, #FFFFFF 20%, #FFE9A8 60%, #F6C445);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lw-invite-text { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #FFE9A8; line-height: 1.7; }
.lw-invite-sub { margin: 0 0 14px; font-size: 12px; color: #C4D0EC; line-height: 1.8; }
.lw-invite-go {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    padding: 13px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 900;
    color: #142552;
    background: linear-gradient(180deg, #FFE9A8, #F6C445 55%, #D9A63A);
    cursor: pointer;
    animation: lw-glow 2s ease-in-out infinite;
}
.lw-invite-go span { position: relative; z-index: 1; }
.lw-invite-go::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -50%;
    width: 35%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
    transform: skewX(-20deg);
    animation: lw-sweep 2.6s ease-in-out .8s infinite;
}
@keyframes lw-sweep { 0% { left: -50%; } 45%, 100% { left: 130%; } }
@keyframes lw-glow {
    0%, 100% { box-shadow: 0 8px 20px -8px rgba(246, 196, 69, .7), 0 0 0 0 rgba(246, 196, 69, .5); }
    50% { box-shadow: 0 10px 26px -6px rgba(246, 196, 69, .9), 0 0 0 6px rgba(246, 196, 69, 0); }
}
.lw-invite-go:hover { filter: brightness(1.06); }
.lw-invite-go:focus-visible, .lw-invite-later:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lw-invite-later {
    margin-top: 8px;
    border: 0;
    background: none;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #C4D0EC;
    cursor: pointer;
}
.lw-invite-later:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .lw-modal, .lw-dialog, .lw-ticket, .lw-invite { transition: none; animation: none; }
    .lw-pointer.is-tick { animation: none; }
    .lw-card *, .lw-card.is-calling, .lw-invite *, .lw-invite *::after { animation: none !important; }
    .lw-invite-card { transform: none; opacity: 1; }
    .lw-invite-sparks { display: none; }
}
