/* =============================================
   Booking System Styles - Raquel Infante
   Light Bookly-style theme
   ============================================= */

/* Steps visibility */
.booking-step { display: none; }
.booking-step.active { display: block; animation: fadeIn 0.3s ease; }
.booking-step.hidden { display: none; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Step headers ---- */
.booking-step .space-y-4 h3 {
    color: #131d21;
    font-size: 1.25rem;
    font-weight: 700;
}
.booking-step .space-y-4 p {
    color: #586062;
    font-size: 0.875rem;
}

/* =============================================
   STEP 1 — Service cards (rendered by JS)
   ============================================= */
.service-card {
    background: #fff;
    border: 2px solid #dfeaef;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.service-card:hover {
    border-color: #00b894;
    box-shadow: 0 4px 16px rgba(0,184,148,0.10);
}

/* =============================================
   STEP 2 — Date / Calendar
   ============================================= */
.date-selection {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}

.calendar-container {
    background: #fff;
    border: 1px solid #dfeaef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #131d21;
}

.calendar-nav {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f0f7f5;
    border: 1px solid #dfeaef;
    color: #131d21;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
}
.calendar-nav:hover {
    background: rgba(0,184,148,0.12);
    border-color: #00b894;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: #9eb3b8;
    text-align: center;
    padding: 6px 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: #131d21;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.calendar-day:hover:not(.disabled) {
    background: rgba(0,184,148,0.10);
    border-color: #00b894;
    color: #00b894;
}
.calendar-day.today {
    border-color: #00b894;
    font-weight: 700;
    color: #00b894;
}
.calendar-day.selected {
    background: #00b894;
    border-color: #00b894;
    color: #fff;
    font-weight: 700;
}
.calendar-day.disabled {
    color: #c8d8dc;
    cursor: not-allowed;
    pointer-events: none;
}

/* Sidebar info panel (date + time steps) */
.selected-info {
    background: #fff;
    border: 1px solid #dfeaef;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.selected-info h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9eb3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.selected-info p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00b894;
    margin-bottom: 16px;
    word-break: break-word;
}

/* =============================================
   STEP 3 — Time slots
   ============================================= */
.time-selection {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.time-slot {
    background: #fff;
    border: 2px solid #dfeaef;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #131d21;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.time-slot:hover:not(.disabled) {
    border-color: #00b894;
    background: rgba(0,184,148,0.06);
    color: #00b894;
    box-shadow: 0 2px 8px rgba(0,184,148,0.10);
}
.time-slot.selected {
    border-color: #00b894;
    background: #00b894;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,184,148,0.25);
}
.time-slot.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* =============================================
   STEP 4 — Customer form
   ============================================= */
.customer-form {
    max-width: 560px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 0;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #586062;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dfeaef;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #131d21;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #00b894;
    box-shadow: 0 0 0 3px rgba(0,184,148,0.12);
}
.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
}
.error-message {
    display: none;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
}
.form-group input.error + .error-message,
.form-group textarea.error + .error-message {
    display: block;
}

/* =============================================
   STEP 5 — Confirmation summary
   ============================================= */
.confirmation-summary {
    background: #f7fbfa;
    border: 1px solid #dfeaef;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e8f2ef;
    gap: 16px;
}
.summary-item:last-child { border-bottom: none; }

.summary-item .label {
    color: #9eb3b8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.summary-item .value {
    font-weight: 700;
    color: #131d21;
    font-size: 0.95rem;
    text-align: right;
}

.summary-divider {
    border: none;
    border-top: 2px dashed #dfeaef;
    margin: 8px 0;
}

/* =============================================
   Success screen (step "success")
   ============================================= */
.success-message {
    text-align: center;
    padding: 40px 20px;
}
.success-message .material-symbols-outlined {
    font-size: 72px;
    color: #00b894;
    display: block;
    margin-bottom: 20px;
}
.success-message h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #131d21;
    margin-bottom: 12px;
}
.success-message > p {
    color: #586062;
    margin-bottom: 28px;
}

.success-details {
    background: #f7fbfa;
    border: 1px solid #dfeaef;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.success-details p {
    margin-bottom: 8px;
    color: #131d21;
    font-size: 0.95rem;
}
.success-details strong {
    color: #586062;
    font-weight: 700;
}

/* =============================================
   Loading state
   ============================================= */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: #9eb3b8;
    gap: 12px;
}
.loading .material-symbols-outlined,
.loading .material-icons {
    font-size: 40px;
    color: #00b894;
    animation: spin 1.2s linear infinite;
}
.loading p { font-size: 0.9rem; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
    line-height: 1;
}
.btn .material-symbols-outlined,
.btn .material-icons { font-size: 18px; }

.btn-primary {
    background: #00b894;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,184,148,0.20);
}
.btn-primary:hover { background: #00a07d; box-shadow: 0 6px 18px rgba(0,184,148,0.28); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
    background: #fff;
    border: 1.5px solid #dfeaef;
    color: #586062;
}
.btn-secondary:hover { background: rgba(0,184,148,0.06); border-color: #00b894; color: #00b894; }

.form-actions { display: flex; gap: 12px; }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 700px) {
    .date-selection,
    .time-selection {
        grid-template-columns: 1fr;
    }
    .selected-info { order: -1; }
    .time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
    .form-actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}
