/* PM Spin to Win — Popup CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

.pmstw-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    animation: pmstw-fade-in .25s ease;
}
.pmstw-overlay.pmstw-hidden { display: none; }
@keyframes pmstw-fade-in { from{opacity:0} to{opacity:1} }

/* ── Modal: full viewport height, anchored left ── */
.pmstw-modal {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 800px;
    max-width: 100vw;
    height: 100vh;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 4px 0 40px rgba(0,0,0,.35);
    animation: pmstw-slide-right .3s ease;
    font-family: 'Outfit', sans-serif;
}
@keyframes pmstw-slide-right { from{transform:translateX(-30px);opacity:0} to{transform:translateX(0);opacity:1} }

/* Close — top right of the white panel */
.pmstw-close {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 30;
    background: #eee;
    border: none; color: #555;
    font-size: 16px;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.pmstw-close:hover { background: #ddd; }

/* ── LEFT strip: dark bg, wheel overflows to the left ── */
.pmstw-left {
    flex: 0 0 300px;
    background: var(--pmstw-bg, #1a1a2e);
    position: relative;
    overflow: visible;   /* wheel hangs outside to the left */
}

/* Wheel: centred on the RIGHT edge of the left strip */
.pmstw-wheel-wrap {
    position: absolute;
    top: 50%;
    left: 0;                    /* = right edge of .pmstw-left */
    transform: translate(-50%, -50%);
    width: 450px;
    height: 450px;
    z-index: 10;
}

#pmstw-canvas {
    display: block;
    width: 450px; height: 450px;
    border-radius: 50%;
}

/* Pointer: right side of wheel, pointing left into the wheel */
.pmstw-pointer {
    position: absolute;
    top: 50%;
    right: -18px;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 20px solid #fff;
    filter: drop-shadow(-2px 0 4px rgba(0,0,0,.4));
    z-index: 20;
}

.pmstw-hub {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ccc;
    z-index: 15;
}

/* ── RIGHT: white form panel ── */
.pmstw-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;   /* left padding clears the wheel overlap */
    min-width: 0;
    overflow-y: auto;
}

.pmstw-logo   { max-height: 88px; object-fit: contain; margin-bottom: 60px; }
.pmstw-heading{ font-size: 24px; font-weight: 700; color: #111; margin: 0 0 8px; line-height:1.25; }
.pmstw-sub    { font-size: 14px; color: #666; margin: 0 0 22px; line-height:1.6; }

.pmstw-field {
    display: block; width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 14px; color: #111;
    margin-bottom: 10px; outline: none; transition: border-color .15s;
    box-sizing: border-box;
}
.pmstw-field:focus { border-color: var(--pmstw-primary, #6c63ff); }

.pmstw-btn {
    width: 100%; padding: 13px;
    background: var(--pmstw-primary, #6c63ff);
    color: #fff; border: none; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: opacity .15s, transform .1s; margin-top: 4px;
}
.pmstw-btn:hover   { 
    background: #09b900;
    color: #ffffff;
}
.pmstw-btn:active  { transform: scale(.98); }
.pmstw-btn:disabled{ opacity: .5; cursor: not-allowed; }

.pmstw-skip {
    display: block; text-align: center; margin-top: 12px;
    font-size: 13px; color: #999; cursor: pointer;
    background: none; border: none;
    font-family: 'Outfit', sans-serif; width: 100%;
}
.pmstw-skip:hover {
    background: transparent; 
    color: #333; 
}
.pmstw-disclaimer { font-size: 11px; color: #bbb; margin-top: 14px; line-height: 1.5; }

/* Result */
.pmstw-result-emoji { font-size: 38px; margin-bottom: 10px; display: block; }
.pmstw-result-title { font-size: 22px; font-weight: 700; color: var(--pmstw-primary,#6c63ff); margin-bottom: 8px; }
.pmstw-result-sub   { font-size: 14px; color: #666; margin-bottom: 16px; line-height: 1.5; }
.pmstw-code-badge   {
    display: inline-block; background: #1a1a2e; color: #fff;
    font-family: monospace; font-size: 18px; letter-spacing: .15em;
    padding: 8px 20px; border-radius: 6px; margin: 6px 0 16px;
}
.pmstw-btn-restart {
    padding: 10px 24px; background: transparent;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 14px;
    cursor: pointer; color: #333; display: inline-block;
}
.pmstw-btn-restart:hover { background: #f5f5f5; }

.pmstw-error {
    background: #fff3f3; border: 1px solid #fca5a5; border-radius: 8px;
    padding: 10px 14px; font-size: 13px; color: #b91c1c;
    margin-bottom: 10px; display: none;
}

/* ── MOBILE ≤480px ── */
@media (max-width: 480px) {
    .pmstw-overlay { align-items: flex-end; justify-content: center; }

    .pmstw-modal {
        flex-direction: column;
        width: 100%; height: auto;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0,0,0,.3);
        animation: pmstw-slide-up .3s ease;
    }
    @keyframes pmstw-slide-up { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }

    /* Horizontal wheel strip at top */
    .pmstw-left {
        flex: none;
        height: 120px;
        overflow: hidden;
    }

    .pmstw-logo {
        height: 50px;
        margin-bottom: 20px;
    }

    .pmstw-wheel-wrap {
        top: 60px;
        left: 60px;
        transform: translate(-50%, -50%);
        width: 240px;
        height: 240px;
    }
    #pmstw-canvas { width: 240px; height: 240px; }

    /* .pmstw-pointer {
        top: auto; right: 50%;
        bottom: -14px;
        transform: translateX(50%);
        border-right: 11px solid transparent;
        border-left:  11px solid transparent;
        border-bottom: 17px solid #fff;
        border-top: none;
        filter: drop-shadow(0 -2px 3px rgba(0,0,0,.3));
    } */

    .pmstw-right {
        padding: 20px 20px 32px;
        overflow-y: auto;
    }
}
