/* Ajustements généraux pour la popup */
#swms-popup-overlay {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(33,41,61,0.12);
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    min-height: 100vh;
    padding-top: 32px;
}

#swms-wheel-popup {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 36px rgba(61,67,97,0.13), 0 1.5px 0 #fff inset;
    max-width: 740px;
    margin: 0 auto;
    padding: 18px 10px 0;
    display: flex;
    flex-direction: column;
}

.swms-popup-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 8px;
}

.swms-popup-title {
    font-size: 2.1em;
    font-weight: 700;
    padding-left: 6px;
    margin: 0;
}

#swms-popup-close {
    font-size: 2.05em;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
}
#swms-popup-close:hover { color: #e53935; }

#swms-wheel-content {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#swms-wheel-left {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
    margin-right: 14px;
}

.swms-popup-image {
    max-width: 105px;
    max-height: 70px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    margin-bottom: 6px;
    background: #fff;
}

.swms-popup-logo-side {
    max-width: 65px;
    max-height: 65px;
    border-radius: 50%;
    border: 2px solid #eee;
    box-shadow: 0 2px 8px #0001;
    margin-top: 4px;
}

#swms-wheel-canvas-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 260px;
    overflow: visible;
}

#swms-wheel-canvas {
    display: block !important;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #0002;
    margin: 0 auto;
}

#swms-wheel-right {
    min-width: 215px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

/* Conteneur général du formulaire */
#swms-spin-form {
    max-width: 260px;
    margin: 0 auto;
    text-align: center;
}

/* Champs */
#swms-spin-form input[type="email"],
#swms-spin-form input[type="text"] {
    width: 100%;
    max-width: 220px;
    margin: 0 auto 10px;
    display: block;
    font-size: 1em;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccd7e6;
    background: #fafbfc;
}

/* Label de confidentialité */
.swms-privacy-label {
    display: block;
    margin: 0 auto 12px;
    font-size: 0.9em;
    line-height: 1.3em;
    max-width: 220px;
    word-wrap: break-word;
}

/* Bouton */
#swms-spin-form button {
    display: inline-block;
    min-width: 140px;
    padding: 10px 24px;
    margin: 0 auto;
    font-size: 1.08em;
    font-weight: bold;
    border-radius: 8px;
    background: #547cd9;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .23s;
}
#swms-spin-form button:hover {
    background: #ffb400;
    color: #222;
}

#swms-spin-message,
#swms-coupon-message {
    margin: 10px 0 0;
    font-size: 1em;
    text-align: center;
}

.swms-ad-banner {
    background: #fffdea;
    border-left: 5px solid #ffb400;
    margin-bottom: 10px;
    padding: 10px 13px;
    font-size: 1.03em;
    border-radius: 8px;
    color: #222;
}

.swms-popup-footer {
    text-align: center;
    font-size: 0.97em;
    color: #666;
    margin: 10px 0 8px;
}

/* Alignement RGPD */
.swms-gdpr-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1em;
    margin-bottom: 7px;
}
.swms-gdpr-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 4px;
    accent-color: #547cd9;
}

/* Flèche de la roue (desktop & mobile) */
.swms-arrow-pointer {
    position: absolute;
    top: 0;                 /* au bord supérieur du canvas */
    left: 50%;
    transform: translate(-50%, -100%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 14px solid #222;
    z-index: 999;
    pointer-events: none;
}

/* Desktop only – label email */
@media (min-width: 700px) {
  #swms-spin-form label[for="swms-email"] {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 6px;
    padding-left: 10px;
    box-sizing: border-box;
    text-align: left;
    font-weight: 500;
  }
}

/* Mobile/tablette (≤ 700px) */
@media (max-width: 700px) {
    /* Bouton et champs */
    #swms-spin-form input[type="email"],
    #swms-spin-form input[type="text"],
    #swms-spin-form button {
        font-size: 0.9em;
    }

    /* Popup centré & largeur */
    #swms-wheel-popup {
        max-width: 95vw;
    }

    /* Colonne */
    #swms-wheel-left,
    #swms-wheel-right {
        flex-direction: column;
        gap: 10px;
    }

    /* Pied */
    .swms-popup-footer {
        font-size: 1em;
        padding-top: 10px;
    }
}

/* Très petits écrans (≤ 600px) */
@media (max-width: 600px) {
    #swms-wheel-popup {
        padding: 8px 2vw 0;
    }
    .swms-popup-title {
        font-size: 1.10em;
    }
    #swms-wheel-content {
        flex-direction: column;
        align-items: stretch;
    }
    #swms-wheel-left {
        flex-direction: column-reverse;
        gap: 10px;
        margin-right: 0;
    }
    #swms-spin-form button {
        padding: 10px 0;
        font-size: 1em;
    }
    #swms-wheel-right {
        margin-left: 0;
    }
}

/* Responsive formulaire (≤ 480px) */
@media (max-width: 480px) {
    #swms-spin-form {
        width: 90%;
    }
    #swms-spin-form input[type="email"],
    #swms-spin-form input[type="text"],
    .swms-privacy-label {
        max-width: 100%;
    }
    #swms-spin-form button {
        width: 100%;
        box-sizing: border-box;
    }
}
