/* ===== Solena BookingShake Form — BookingShake-style ===== */

/* --- Outer wrapper (brown background) --- */
.sbk-front-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 8px;
}

/* --- White card --- */
.sbk-front-card {
    background: #fff;
    border-radius: 4px;
    padding: 40px 48px;
    box-shadow:
        0 1px 2px 0 rgba(0, 0, 0, 0.03),
        0 1px 6px -1px rgba(0, 0, 0, 0.02),
        0 2px 4px 0 rgba(0, 0, 0, 0.02);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #262626;
    line-height: 1.5;
}

/* --- Title --- */
.sbk-front-card h2 {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 8px;
    line-height: 28px;
    letter-spacing: -0.01em;
}

/* --- Description text --- */
.sbk-front-desc {
    font-size: 15px;
    line-height: 24px;
    color: rgba(0, 0, 0, 0.45);
    margin: 0 0 24px;
}

/* --- Steps --- */
.sbk-front-step {
    display: none;
}
.sbk-front-step.active {
    display: block;
}

/* --- Intro step --- */
.sbk-front-intro {
    font-size: 15px;
    line-height: 24px;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 24px;
}
.sbk-front-intro p {
    margin: 0 0 12px;
}
.sbk-front-intro p:last-child {
    margin-bottom: 0;
}
.sbk-front-intro strong {
    color: #262626;
}

/* --- Fields container (vertical gap 16px) --- */
.sbk-front-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Field --- */
.sbk-front-field {
    display: flex;
    flex-direction: column;
}
.sbk-front-field label {
    font-size: 15px;
    font-weight: 500;
    color: #262626;
    margin-bottom: 8px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.sbk-req {
    color: #262626;
}

/* --- Inputs, Selects, Textareas --- */
.sbk-front-field input[type="text"],
.sbk-front-field input[type="email"],
.sbk-front-field input[type="tel"],
.sbk-front-field input[type="number"],
.sbk-front-field input[type="date"],
.sbk-front-field select,
.sbk-front-field textarea {
    height: 48px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 4px 11px;
    font-size: 14px;
    color: #262626;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.sbk-front-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.sbk-front-field textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
}
.sbk-front-field input:focus,
.sbk-front-field select:focus,
.sbk-front-field textarea:focus {
    border-color: #4c2113;
    box-shadow: 0 0 0 2px rgba(76, 33, 19, 0.1);
}
.sbk-front-field input::placeholder,
.sbk-front-field textarea::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

/* --- Date range (single bordered container) --- */
.sbk-date-range {
    display: flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    height: 48px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sbk-date-range:focus-within {
    border-color: #4c2113;
    box-shadow: 0 0 0 2px rgba(76, 33, 19, 0.1);
}
.sbk-date-part {
    flex: 1;
    position: relative;
    height: 100%;
    min-width: 0;
}
.sbk-date-display {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 11px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.25);
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
    background: #fff;
}
.sbk-date-display.has-value {
    color: #262626;
}
.sbk-date-range input[type="date"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    padding: 4px 11px;
    font-size: 14px;
    color: transparent;
    background: transparent;
    outline: none;
    box-shadow: none;
    z-index: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.sbk-date-range input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.sbk-date-range input[type="date"]:focus {
    box-shadow: none;
    border: 0;
}
.sbk-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    color: rgba(0, 0, 0, 0.25);
    font-size: 14px;
}
.sbk-date-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    color: rgba(0, 0, 0, 0.25);
    font-size: 16px;
}

/* --- Hours row (side by side with separator) --- */
.sbk-hours-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.sbk-hours-row .sbk-front-field {
    flex: 1;
}
.sbk-hours-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    margin-top: 33px;
    height: 48px;
    color: rgba(0, 0, 0, 0.25);
    font-size: 18px;
}

/* --- Row (2 columns for contact fields) --- */
.sbk-front-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- Checkbox fields --- */
.sbk-front-field.sbk-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.65);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.sbk-front-field.sbk-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #4c2113;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

/* --- Actions bar --- */
.sbk-front-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
}

/* --- Buttons --- */
.sbk-front-btn {
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sbk-front-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Text button (← Retour) */
.sbk-front-btn.text {
    color: rgba(0, 0, 0, 0.88);
    padding: 4px 0;
}
.sbk-front-btn.text:hover {
    color: #4c2113;
}

/* Outlined button (Continuer →) */
.sbk-front-btn.outlined {
    height: 32px;
    padding: 0 15px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    color: rgba(0, 0, 0, 0.88);
    background: #fff;
}
.sbk-front-btn.outlined:hover {
    border-color: #4c2113;
    color: #4c2113;
}
.sbk-front-btn.outlined:disabled {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.25);
    border-color: #d9d9d9;
}

/* Primary button (Commencer / Envoyer) */
.sbk-front-btn.primary {
    height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    background: #4c2113;
    color: #fff;
    font-weight: 500;
}
.sbk-front-btn.primary:hover {
    background: #593425;
}
.sbk-front-btn.primary:disabled {
    opacity: 0.5;
}

/* --- Spinner (loading indicator) --- */
.sbk-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sbk-spin 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes sbk-spin {
    to { transform: rotate(360deg); }
}

/* --- Message box --- */
.sbk-front-msg {
    display: none;
    margin-top: 16px;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
}
.sbk-front-msg.show {
    display: block;
}
.sbk-front-msg.success {
    background: #f6ffed;
    color: #135200;
    border: 1px solid #b7eb8f;
}
.sbk-front-msg.error {
    background: #fff2f0;
    color: #a8071a;
    border: 1px solid #ffa39e;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sbk-front-wrap {
        padding: 16px;
        border-radius: 0;
    }
    .sbk-front-card {
        padding: 24px 20px;
    }
    .sbk-front-row {
        grid-template-columns: 1fr;
    }
    .sbk-hours-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .sbk-hours-sep {
        display: none;
    }
    .sbk-date-range {
        flex-direction: column;
        height: auto;
        border: 0;
        border-radius: 0;
        gap: 12px;
        background: transparent;
        overflow: visible;
    }
    .sbk-date-range:focus-within {
        box-shadow: none;
    }
    .sbk-date-part {
        flex: 0 0 auto;
        position: relative;
        height: 48px;
        width: 100%;
        border: 1px solid #d9d9d9;
        border-radius: 6px;
        background: #fff;
        overflow: hidden;
    }
    .sbk-date-part:focus-within {
        border-color: #4c2113;
        box-shadow: 0 0 0 2px rgba(76, 33, 19, 0.1);
    }
    .sbk-date-display {
        pointer-events: none;
    }
    /* iOS Safari: input date au-dessus de l'overlay pour recevoir le tap */
    .sbk-date-range input[type="date"] {
        z-index: 2;
        opacity: 0;
    }
    .sbk-date-sep,
    .sbk-date-icon {
        display: none;
    }
    /* Prevent iOS auto-zoom on input focus */
    .sbk-front-field input[type="text"],
    .sbk-front-field input[type="email"],
    .sbk-front-field input[type="tel"],
    .sbk-front-field input[type="number"],
    .sbk-front-field input[type="date"],
    .sbk-front-field select,
    .sbk-front-field textarea {
        font-size: 16px;
    }
}
