/* Zeus — Booking Page Styles (citas.css) */
/* Matches the Zeus Fisioterapia design system */

/* =====================================================
   BOOKING SPLIT-SCREEN LAYOUT
   ===================================================== */

/* Ocultar hero y headers viejos en esta página si los hubiera */
.booking-page-header {
    display: none;
}

.booking-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--crema-dark);
}

/* LADO IZQUIERDO: Barra lateral fija */
.booking-sidebar {
    width: 35%;
    min-width: 320px;
    max-width: 480px;
    position: relative;
    background: var(--negro);
    color: var(--blanco);
    display: flex;
    flex-direction: column;
}

/* En Desktop, hacerla sticky para que no suba al scrollear la derecha */
@media (min-width: 1024px) {
    .booking-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.sidebar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(26, 24, 22, 0.6) 0%, rgba(26, 24, 22, 0.95) 100%);
    z-index: 1;
}

.sidebar-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-back-link {
    color: var(--canela-light);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 40px;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition);
}

.sidebar-back-link:hover {
    color: var(--blanco);
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin: 16px 0;
    color: var(--blanco);
}

.sidebar-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* Resumen Dinámico */
.booking-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.4s forwards;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.sum-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--canela);
    color: var(--blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sum-details {
    display: flex;
    flex-direction: column;
}

.sum-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.sum-value {
    font-weight: 500;
    font-size: 15px;
    color: var(--blanco);
}

.summary-total {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-total span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.summary-total h4 {
    margin: 0;
    color: var(--canela-light);
    font-size: 24px;
}


/* LADO DERECHO: Flujo Interactivo */
.booking-flow {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0;
    background: var(--crema);
}

.booking-flow-inner {
    width: 100%;
    max-width: 800px;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
}

.flow-header {
    margin-bottom: 48px;
}

.flow-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--canela-dark);
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Line Premium */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(173, 115, 50, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    width: 20%;
    /* JS will update this */
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(173, 115, 50, 0.5);
}

.wizard-content {
    flex: 1;
    position: relative;
    min-height: 400px;
}

.booking-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.booking-step.active {
    display: block;
    animation: fadeUpStep 0.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.step-title {
    font-size: 2rem;
    color: var(--negro);
    margin-bottom: 8px;
}

.step-desc {
    color: var(--gris);
    font-size: 16px;
    margin-bottom: 32px;
}


/* Content Grids & Cards (Reutilizando y mejorando las antiguas) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.category-card,
.service-card,
.prof-card {
    background: var(--blanco);
    border: 1px solid rgba(173, 115, 50, 0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:hover,
.service-card:hover,
.prof-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--canela-light);
}

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

.prof-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.prof-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--crema-dark);
}

/* Footer de Navegación */
.flow-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--crema-dark);
}


/* =====================================================
   SKELETON LOADERS
   ===================================================== */
.skeleton {
    background: linear-gradient(-90deg, #e6dccf 0%, #f2e8dc 50%, #e6dccf 100%);
    background-size: 400% 400%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 32px;
    margin-bottom: 16px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: -135% 0%;
    }
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUpStep {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   RESPONSIVE MOBILE SPLIT SCREEN
   ===================================================== */
@media (max-width: 1023px) {
    .booking-layout {
        flex-direction: column;
    }

    .booking-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 40px 20px;
    }

    .sidebar-content {
        padding: 0;
    }

    .sidebar-title {
        font-size: 2rem;
    }

    .booking-flow-inner {
        padding: 40px 20px;
    }

    .booking-summary {
        padding: 16px;
    }
}

.category-card__icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.category-card__name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-card__desc {
    font-size: 13px;
    color: var(--gris);
    line-height: 1.5;
}

/* ===== SERVICE CARDS (Step 2) ===== */
.service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-card.selected {
    border-color: var(--canela);
    background: rgba(196, 149, 106, 0.04);
}

.service-card__info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.service-card__info p {
    font-size: 13px;
    color: var(--gris);
    max-width: 400px;
}

.service-card__meta {
    text-align: right;
    flex-shrink: 0;
}

.service-card__price {
    font-size: 22px;
    font-weight: 700;
    color: var(--canela);
}

.service-card__duration {
    font-size: 12px;
    color: var(--gris);
    margin-top: 2px;
}

/* ===== PROFESSIONAL CARDS (Step 3) ===== */
.professional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.professional-card {
    border: 2px solid var(--crema-dark);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.professional-card:hover {
    border-color: var(--canela-light);
    transform: translateY(-2px);
}

.professional-card.selected {
    border-color: var(--canela);
    background: rgba(196, 149, 106, 0.04);
}

.professional-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--blanco);
    margin-bottom: 12px;
}

.professional-card__name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.professional-card__specialty {
    font-size: 12px;
    color: var(--gris);
}

.professional-card__license {
    font-size: 11px;
    color: var(--gris-light);
    margin-top: 4px;
    font-family: monospace;
}

/* ===== CALENDAR (Step 4) ===== */
.calendar-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.calendar {
    border: 1px solid var(--crema-dark);
    border-radius: 10px;
    overflow: hidden;
}

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--crema);
    font-weight: 600;
    font-size: 14px;
}

.calendar__header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--gris);
}

.calendar__header button:hover {
    background: var(--crema-dark);
    color: var(--negro);
}

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

.calendar__day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--gris-light);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar__day {
    text-align: center;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    color: var(--negro);
}

.calendar__day:hover:not(.disabled):not(.selected) {
    background: var(--crema);
}

.calendar__day.selected {
    background: var(--canela);
    color: var(--blanco);
    font-weight: 600;
}

.calendar__day.today {
    font-weight: 700;
    color: var(--canela);
}

.calendar__day.disabled {
    color: var(--crema-dark);
    cursor: not-allowed;
}

.calendar__day.other-month {
    color: var(--crema-dark);
}

/* Time Slots */
.slots-panel {
    border: 1px solid var(--crema-dark);
    border-radius: 10px;
    overflow: hidden;
}

.slots-panel__header {
    padding: 14px 16px;
    background: var(--crema);
    font-weight: 600;
    font-size: 14px;
}

.slots-panel__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gris);
    font-size: 13px;
}

.slots-panel__loading {
    padding: 40px 20px;
    text-align: center;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    max-height: 320px;
    overflow-y: auto;
}

.slot-btn {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--crema-dark);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--blanco);
    color: var(--negro);
    font-family: 'Montserrat', sans-serif;
}

.slot-btn:hover {
    border-color: var(--canela);
    background: rgba(196, 149, 106, 0.04);
}

.slot-btn.selected {
    background: var(--canela);
    color: var(--blanco);
    border-color: var(--canela);
}

/* ===== PATIENT FORM (Step 5) ===== */
.patient-form {
    max-width: 480px;
}

.patient-form .form-group {
    margin-bottom: 20px;
}

.patient-form .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gris);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.patient-form .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--crema-dark);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s;
    background: var(--blanco);
    color: var(--negro);
}

.patient-form .form-input:focus {
    outline: none;
    border-color: var(--canela);
    box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.1);
}

.consent-group {
    background: var(--crema);
    border-radius: 10px;
    padding: 20px;
    margin-top: 24px;
}

.consent-group h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    margin-bottom: 12px;
}

.consent-text {
    font-size: 12px;
    color: var(--gris);
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--blanco);
    border-radius: 6px;
    border: 1px solid var(--crema-dark);
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--canela);
    flex-shrink: 0;
}

/* ===== CONFIRMATION (Step 6) ===== */
.confirmation {
    text-align: center;
}

.confirmation__icon {
    width: 72px;
    height: 72px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.confirmation__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.confirmation__subtitle {
    color: var(--gris);
    font-size: 14px;
    margin-bottom: 28px;
}

.confirmation-summary {
    text-align: left;
    background: var(--crema);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    margin: 0 auto 28px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row__label {
    color: var(--gris);
}

.summary-row__value {
    font-weight: 600;
    text-align: right;
}

/* ===== NAVIGATION BUTTONS ===== */
.booking-nav {
    display: flex;
    justify-content: space-between;
    padding: 24px 40px;
    border-top: 1px solid var(--crema-dark);
}

.booking-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.booking-btn--back {
    background: var(--crema);
    color: var(--gris);
}

.booking-btn--back:hover {
    background: var(--crema-dark);
    color: var(--negro);
}

.booking-btn--next {
    background: var(--canela);
    color: var(--blanco);
}

.booking-btn--next:hover {
    background: var(--canela-dark);
}

.booking-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .booking-step {
        padding: 24px 20px;
    }

    .booking-nav {
        padding: 16px 20px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .calendar-wrapper {
        grid-template-columns: 1fr;
    }

    .slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .service-card {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .service-card__meta {
        text-align: left;
    }

    .booking-progress li {
        font-size: 10px;
        padding: 12px 4px;
    }

    .professional-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== LOADING SPINNER ===== */
.booking-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(196, 149, 106, 0.2);
    border-top-color: var(--canela);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

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

/* Error state */
.booking-error {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.booking-error.visible {
    display: block;
}

/* ===== SKELETON LOADERS ===== */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
    background-color: var(--crema-dark);
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-color: var(--crema);
    }

    100% {
        background-color: var(--crema-dark);
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 80%;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 16px;
    width: 50%;
}

.skeleton-card {
    border: 2px solid var(--crema-dark);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 12px;
}