/* Phyto SystemPay - modal partagee de selection de frequence (slide-in depuis la droite).
   Palette identique a subscriptions.css (charte CBD.fr) : re-declaree ici, scopee sous
   #phyto-sp-frequency-modal, car ce composant se charge sur des pages (panier, fiche
   produit) qui ne chargent pas subscriptions.css. */
#phyto-sp-frequency-modal {
    --sp-forest: #125b3a;
    --sp-forest-soft: #1B4E36;
    --sp-paper: #FBF9F2;
    --sp-ink: #1B241D;
    --sp-muted: #7E8A77;
    --sp-line: #E6DFCD;
    --sp-sand-bg: #ECE4D0;

    position: fixed;
    inset: 0;
    z-index: 10000;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

#phyto-sp-frequency-modal[hidden] { display: none; }

#phyto-sp-frequency-modal .sp-fm__overlay {
    position: absolute;
    inset: 0;
    background: rgba(27, 36, 29, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

#phyto-sp-frequency-modal.is-open .sp-fm__overlay { opacity: 1; }

#phyto-sp-frequency-modal .sp-fm__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    max-width: 440px;
    background: var(--sp-paper);
    box-shadow: -12px 0 32px rgba(27, 36, 29, .18);
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    overflow-y: auto;
}

#phyto-sp-frequency-modal.is-open .sp-fm__panel { transform: translateX(0); }

#phyto-sp-frequency-modal .sp-fm__header { display: flex; justify-content: space-between; align-items: flex-start; }
#phyto-sp-frequency-modal .sp-fm__title { font-family: 'Oswald', Helvetica, Arial, sans-serif; font-size: 20px; color: var(--sp-ink); margin: 0; }
#phyto-sp-frequency-modal .sp-fm__close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--sp-muted); cursor: pointer; padding: 0 4px; }
#phyto-sp-frequency-modal .sp-fm__sep { height: 1px; background: var(--sp-line); margin: 18px 0; }
#phyto-sp-frequency-modal .sp-fm__subtitle { font-family: 'Oswald', Helvetica, Arial, sans-serif; font-size: 15px; color: var(--sp-ink); margin: 0 0 14px; }
#phyto-sp-frequency-modal .sp-fm__list { display: flex; flex-direction: column; gap: 4px; }

#phyto-sp-frequency-modal .sp-fm__row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 10px; cursor: pointer; }
#phyto-sp-frequency-modal .sp-fm__row:hover { background: var(--sp-sand-bg); }
#phyto-sp-frequency-modal .sp-fm__radio input { accent-color: var(--sp-forest); width: 18px; height: 18px; }
#phyto-sp-frequency-modal .sp-fm__freq-label { flex: 1; color: var(--sp-ink); font-size: 15px; }
#phyto-sp-frequency-modal .sp-fm__freq-days { display: none; color: var(--sp-muted); font-size: 13px; }
#phyto-sp-frequency-modal [for="sp-fm-freq-FREQMONTHLYINTERVAL1"] .sp-fm__freq-days {
    display: inline-block;
    background: #D9EDE2;
    color: #125B3A;
    font-size: 13px;
    border-radius: 10px;
    padding: 1px 10px;
}

#phyto-sp-frequency-modal .sp-fm__footer { margin-top: auto; padding-top: 22px; }
#phyto-sp-frequency-modal .sp-fm__cta {
    display: block; width: 100%; border: none; border-radius: 999px;
    background: var(--sp-forest); color: var(--sp-paper);
    font-family: 'Oswald', Helvetica, Arial, sans-serif; font-size: 15px;
    padding: 15px 20px; cursor: pointer; transition: background .15s ease;
}
#phyto-sp-frequency-modal .sp-fm__cta:hover { background: var(--sp-forest-soft); }
#phyto-sp-frequency-modal .sp-fm__note { margin: 12px 2px 0; font-size: 12.5px; color: var(--sp-muted); line-height: 1.5; text-align: center; }
#phyto-sp-frequency-modal .sp-fm__note[hidden] { display: none; }

body.sp-fm-open { overflow: hidden; }

@media (max-width: 480px) {
    #phyto-sp-frequency-modal .sp-fm__panel { max-width: 100%; }
}
