/* Step4Wellness Classes — Elementor / Wellness style */

.s4w-group-title {
    margin: 20px 0 10px 0;
    font-weight: normal;
    color: #3d6b5e;
}

.s4w-group-classes {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin: 20px 0 30px 0;

    /* 🌿 Elementor-mäinen vaalea vihreä tausta */
    padding: 16px;
    background: #F1FFF4;

    border-radius: 12px;
    border: 1px solid rgba(129, 165, 144, 0.25);
}

/* Yksittäinen tuntikortti - pidetään alkuperäinen flex-malli */
.s4w-class-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    padding: 14px 16px;
    background: #ffffff;

    border: 1px solid rgba(129, 165, 144, 0.25);
    border-left: 5px solid #81A590;

    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
}

/* INFO-ALUE */
.s4w-class-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 12px; /* Ensimmäinen arvo on pystyväli, toinen arvo (12px) on vaakaväli */
    flex: 1;

    font-size: 0.95rem;
    color: #4f4f4f;
}

/* TUNNIN NIMI */
.s4w-name {
    font-weight: 600;
    color: #0a0500;
    flex: 0 0 180px; /* Pienennetty leveys siirtää päivämäärää vasemmalle */
}

/* PAIKKA (kalenterinäkymä: Title ja Paikka ovat omat erilliset kentät,
   jotta ne eivät koskaan sotkeudu yhteen riippumatta siitä onko ryhmälle
   asetettu Julkinen otsikko admin-paneelissa vai ei) */
.s4w-location {
    font-weight: 500;
    color: #4f4f4f;
    flex: 0 0 auto;
}


/* Päivä */
.s4w-date {
    font-weight: 500;
    color: #3d3d3d;
}

/* Kesto */
.s4w-duration {
    font-size: 0.88rem;
    color: #6b6b6b;
}

/* Hinta */
.s4w-price {
    font-size: 0.88rem;
    color: #25ad99;
    font-weight: 600;
}

/* Täysi-teksti */
.s4w-spots-full {
    font-size: 0.85rem;
    color: #a03030;
    font-weight: 600;
}

/* FULL STATE */
.s4w-class-row.s4w-full {
    border-left-color: #c87941;
    background: #fdf7f2;
}

/* VARAA-NAPPI */
.s4w-btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;

    background: #48bca2;
    color: #ffffff !important;

    border-radius: 8px;
    text-decoration: none !important;

    font-size: 0.9rem;
    font-weight: 500;

    transition: all 0.2s ease;
    white-space: nowrap;
}

.s4w-btn-register:hover {
    background: #25ad99;
    transform: translateY(-1px);
}

/* JONOTUS-NAPPI (kun tunti on täynnä) */
.s4w-btn-waitlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;

    background: #c87941;
    color: #ffffff !important;

    border-radius: 8px;
    text-decoration: none !important;

    font-size: 0.9rem;
    font-weight: 500;

    transition: all 0.2s ease;
    white-space: nowrap;
}

.s4w-btn-waitlist:hover {
    background: #a8632f;
    transform: translateY(-1px);
}

/* LISÄTIETOA-NAPPI (kalenterinäkymä: vie ajankohtaista-sivun kyseiseen kohtaan) */
.s4w-btn-more-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;

    background: #5a8f7a;
    color: #ffffff !important;

    border-radius: 8px;
    text-decoration: none !important;

    font-size: 0.9rem;
    font-weight: 500;

    transition: all 0.2s ease;
    white-space: nowrap;
}

.s4w-btn-more-info:hover {
    background: #3d6b5e;
    transform: translateY(-1px);
}

/* EI TUNTEJA */
.s4w-no-classes {
    padding: 14px 16px;

    background: #F1FFF4;
    border: 1px dashed rgba(129, 165, 144, 0.4);

    border-radius: 10px;

    color: #666;
    font-size: 0.9rem;
}
/* Mobile */
@media (max-width: 600px) {
    .s4w-class-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .s4w-name {
        flex: auto; /* Mobiilissa nimen leveys joustaa laitteen mukaan */
    }

    .s4w-btn-register,
    .s4w-btn-waitlist,
    .s4w-btn-more-info {
        width: 100%;
        text-align: center;
    }
}
/* ─────────────────────────────────────────────
   ILMOITTAUTUMISMODAALI
───────────────────────────────────────────── */

.s4w-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 25, 0.55);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.s4w-modal-overlay.s4w-open {
    display: flex;
}

.s4w-modal {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: s4w-modal-in 0.2s ease;
}

@keyframes s4w-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.s4w-modal-header {
    background: linear-gradient(135deg, #3d6b5e 0%, #48bca2 100%);
    color: #fff;
    padding: 20px 52px 20px 24px;
    border-radius: 14px 14px 0 0;
    position: relative;
}

.s4w-modal-header h3 {
    margin: 0 0 4px 0;
    font-weight: 500;
    font-size: 1.15rem;
}

.s4w-modal-header p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.s4w-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    
    width: 36px;
    height: 36px;
    padding: 0;
    
    /* Tyylikäs lasimainen / kuultava tausta */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Painettaessa (Click/Tap) */
.s4w-modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

.s4w-modal-body {
    padding: 22px 24px 24px 24px;
}

.s4w-field {
    margin-bottom: 14px;
}

.s4w-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
    color: #333;
    font-weight: 500;
}

.s4w-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px; /* min 16px estää iOS Safarin automaattisen zoomauksen kentän fokusoituessa */
    box-sizing: border-box;
    -webkit-appearance: none;
}

.s4w-field input:focus {
    outline: none;
    border-color: #48bca2;
    box-shadow: 0 0 0 3px rgba(72, 188, 162, 0.15);
}

.s4w-privacy-note {
    font-size: 0.8rem;
    color: #666;
    background: #f5f5f5;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.s4w-privacy-note a {
    color: #3d6b5e;
}

.s4w-submit-btn {
    width: 100%;
    padding: 14px;
    min-height: 48px;
    background: #48bca2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.s4w-submit-btn:hover {
    background: #25ad99;
}

.s4w-submit-btn:disabled {
    background: #a9d9ce;
    cursor: not-allowed;
}

.s4w-form-error {
    color: #a03030;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: none;
}

.s4w-form-error.s4w-visible {
    display: block;
}

.s4w-waitlist-notice {
    background: #fff8f0;
    border: 1px solid #f0d9b5;
    color: #8a5a1e;
    font-size: 0.85rem;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

/* Vahvistusnäkymä modaalin sisällä */
.s4w-confirm {
    display: none;
}

.s4w-confirm.s4w-visible {
    display: block;
}

.s4w-confirm h4 {
    color: #3d6b5e;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.s4w-payment-box {
    background: #fff8f0;
    border: 1px solid #f0d9b5;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 14px 0;
    font-size: 0.88rem;
    color: #444;
}

.s4w-payment-box p {
    margin: 4px 0;
}

.s4w-cancel-note {
    font-size: 0.82rem;
    color: #777;
    margin-top: 10px;
}

/* ─────────────────────────────────────────────
   MOBIILI: modaali "bottom sheet" -tyylinä
   (liukuu alhaalta ylös, käyttää koko leveyden,
   turvaetäisyys puhelimien alareunan gesture-alueelle)
───────────────────────────────────────────── */
@media (max-width: 480px) {
    .s4w-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .s4w-modal {
        max-width: 100%;
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
        animation: s4w-modal-in-mobile 0.25s ease-out;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .s4w-modal-header {
        border-radius: 18px 18px 0 0;
    }

    .s4w-modal-header h3 {
        font-size: 1.1rem;
    }

    .s4w-modal-body {
        padding: 20px 20px 24px 20px;
    }
}

@keyframes s4w-modal-in-mobile {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Estetään taustan vieritys kun modaali on auki myös iOS Safarissa */
body.s4w-modal-active {
    position: fixed;
    width: 100%;
    overflow: hidden;
}