/* assets/css/agendar.css - Step-by-Step Wizard Booking Engine */

.booking-header {
    max-width: var(--maxw);
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.2s;
}
.back-link:hover { color: var(--red); }

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 16px 40px rgba(15,23,42,.06);
}

.form-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.form-kicker { color: var(--red); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.form-heading h2 { font-size: 1.6rem; color: var(--text-dark); margin: 4px 0 0; font-weight: 700; }
.response-time {
    background: var(--peach); border: 1px solid var(--peach-2);
    color: var(--red-dark); padding: 6px 14px; border-radius: var(--pill);
    font-size: .78rem; font-weight: 700;
}
.form-intro { color: var(--text-sub); font-size: 1rem; margin-bottom: 24px; line-height: 1.6; }

/* ===== WIZARD PROGRESS STEPPER BAR ===== */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 32px;
    padding: 0 10px;
}
.wizard-stepper::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--card-border);
    z-index: 1;
}
.wizard-progress-bar {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 3px;
    background: var(--red);
    z-index: 2;
    transition: width 0.3s ease;
    width: 0%;
}

.step-indicator {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.step-indicator.active .step-circle {
    background: var(--red);
    border-color: var(--red-dark);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(221, 24, 59, 0.4);
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: #16a34a;
    border-color: #15803d;
    color: #ffffff;
}

.step-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap;
}
.step-indicator.active .step-name {
    color: var(--red);
}
.step-indicator.completed .step-name {
    color: #16a34a;
}

/* WIZARD STEP PANELS */
.wizard-step-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.wizard-step-panel.active {
    display: block;
}

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

/* Selección de fecha y hora en un solo paso */
.date-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 8px;
}
@media (max-width: 720px) {
    .date-time-grid {
        grid-template-columns: 1fr;
    }
}
.step-label { margin-bottom: 14px; font-weight: 700; color: var(--text-dark); font-size: 0.95rem; }

/* ===== VISUAL CALENDAR COMPONENT ===== */
.visual-calendar {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
}

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

.cal-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: capitalize;
}

.cal-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-dark);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cal-nav-btn:hover {
    background: var(--red);
    color: #ffffff;
    border-color: var(--red-dark);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 10px;
}

.cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-day-cell.empty {
    border: none;
    background: transparent;
    cursor: default;
}

.cal-day-cell.available {
    border-color: rgba(221, 24, 59, 0.4);
    background: var(--card-bg);
}
.cal-day-cell.available:hover {
    background: var(--peach);
    border-color: var(--red);
    transform: scale(1.06);
}

.cal-day-cell.selected {
    background: var(--red) !important;
    border-color: var(--red-dark) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(221, 24, 59, 0.4);
    transform: scale(1.06);
}
.cal-day-cell.selected .cal-dot { background: #ffffff; }

.cal-day-cell.holiday {
    background: #fff2f3;
    border-color: #fecdd3;
    color: #991b1b;
    cursor: not-allowed;
    opacity: 0.8;
}
html[data-theme="dark"] .cal-day-cell.holiday {
    background: #3b181d;
    border-color: #991b1b;
    color: #fecdd3;
}

.cal-day-cell.non_working, .cal-day-cell.past {
    background: rgba(0, 0, 0, 0.03);
    border-color: transparent;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.5;
}
html[data-theme="dark"] .cal-day-cell.non_working, html[data-theme="dark"] .cal-day-cell.past {
    background: rgba(255, 255, 255, 0.03);
    color: #475569;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    margin-top: 2px;
}

.cal-tag {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

.cal-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-sub);
    font-weight: 600;
}
.cal-legend-item { display: flex; align-items: center; gap: 6px; }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 3px; }

/* Slots Grid */
.slots-container { min-height: 120px; margin-bottom: 24px; }
.slots-placeholder {
    border: 1.5px dashed var(--card-border); border-radius: 12px;
    color: var(--text-sub); font-size: 0.92rem; padding: 32px 16px; text-align: center;
}
.slots-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px; max-height: 360px; overflow-y: auto;
}
.slot-btn {
    background: var(--card-bg); border: 1.5px solid var(--card-border);
    color: var(--text-dark); padding: 12px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.2s;
}
.slot-btn:hover, .slot-btn.selected {
    background: var(--red); border-color: var(--red-dark);
    color: #ffffff; box-shadow: 0 4px 14px rgba(221,24,59,0.3); transform: translateY(-1px);
}

.no-slots-msg {
    background: #fff1f2; border: 1.5px solid #fecdd3;
    color: #991b1b; border-radius: 10px; padding: 18px;
    font-size: 0.95rem; font-weight: 700; text-align: center;
}
html[data-theme="dark"] .no-slots-msg {
    background: #3b181d; border-color: #991b1b; color: #fecdd3;
}

/* ===== SUMMARY BOX IN STEP 4 ===== */
.summary-card {
    background: var(--peach);
    border: 1.5px solid var(--peach-2);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}
.summary-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--red-dark);
    margin-bottom: 4px;
}
.summary-item span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* WIZARD NAVIGATION BUTTONS */
.wizard-nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}
.btn-wizard-prev {
    background: transparent;
    border: 1.5px solid var(--card-border);
    color: var(--text-dark);
    padding: 11px 24px;
    border-radius: var(--pill);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-wizard-prev:hover {
    border-color: var(--red);
    color: var(--red);
}
.btn-wizard-next {
    background: var(--red);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--pill);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(221,24,59,0.3);
    transition: all 0.2s;
    margin-left: auto;
}
.btn-wizard-next:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(221,24,59,0.4);
}
.btn-wizard-next:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Modal Confirmation */
.modal-backdrop {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(6px);
    z-index: 2000; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.active { display: flex; }
.modal-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 36px; max-width: 440px; width: 100%;
    text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.modal-card h3 { color: var(--text-dark); font-size: 1.4rem; margin-bottom: 12px; }
.modal-card p { color: var(--text-sub); font-size: 0.95rem; line-height: 1.6; margin-bottom: 24px; }
