/* ================================================================
   ESTILOS - SISTEMA DE RESERVAS (WIZARD)
================================================================ */

/* CONTENEDOR PRINCIPAL */
.booking-wizard {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 20px 80px;
}

.booking-wizard h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 30px;
    margin-top: 0;
    text-transform: none;
}

/* ---- BARRA DE PROGRESO ---- */
.progress-bar {
    margin-bottom: 44px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-border);
    transition: color 0.3s;
}

.step-label.activo {
    color: var(--color-primary);
    font-weight: 700;
}

.step-label.completado {
    color: var(--color-primary);
}

.progress-track {
    height: 4px;
    background-color: var(--color-track-bg);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ---- PASOS (mostrar / ocultar) ---- */
.booking-step {
    display: none;
}

.booking-step.activo {
    display: block;
    animation: fadeInStep 0.28s ease;
}

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

/* ================================================================
   PASO 1 — Tipo de sesión
================================================================ */
.tipo-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* El botón completo es la card, así es accesible con teclado */
.tipo-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background-color: var(--color-bg-white);
    border: 2px solid var(--color-border-light);
    border-radius: 18px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.tipo-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.1);
}

.tipo-card.seleccionado {
    border-color: var(--color-primary);
    background-color: var(--color-selected-bg);
}

/* Icono de la card */
.tipo-icono {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: var(--color-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tipo-icono .icon {
    width: 26px;
    height: 26px;
    color: var(--color-primary);
}

.tipo-card.seleccionado .tipo-icono {
    background-color: var(--color-primary);
}

.tipo-card.seleccionado .tipo-icono .icon {
    color: white;
}

/* Texto descriptivo */
.tipo-info {
    flex: 1;
}

.tipo-titulo {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 5px 0;
}

.tipo-info p {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Precio a la derecha */
.tipo-precio {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    margin-left: auto;
    padding-left: 16px;
}

/* ================================================================
   PASO 2 — Calendario
================================================================ */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cal-titulo {
    font-weight: 600;
    font-size: 17px;
    color: var(--color-text);
}

.cal-nav {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s;
}

.cal-nav:hover {
    background-color: var(--color-bg-subtle);
}

.cal-dias-semana {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.cal-dias-semana span {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 6px 0;
}

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

.cal-dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text);
    font-family: inherit;
    transition: background-color 0.15s;
}

.cal-dia.vacio {
    pointer-events: none;
}

.cal-dia.deshabilitado {
    color: var(--color-disabled);
    cursor: not-allowed;
}

.cal-dia:not(.deshabilitado):not(.vacio):hover {
    background-color: var(--color-bg-subtle);
}

.cal-dia.seleccionado {
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
}

/* ================================================================
   PASO 3 — Slots de hora
================================================================ */
.slots-fecha {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

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

.slot-btn {
    padding: 10px 4px;
    border-radius: 10px;
    border: 1px solid var(--color-border-light);
    background-color: var(--color-bg-white);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    color: var(--color-text);
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.slot-btn:not(.ocupado):hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.slot-btn.seleccionado {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    font-weight: 600;
}

.slot-btn.ocupado {
    color: var(--color-border);
    text-decoration: line-through;
    cursor: not-allowed;
    background-color: var(--color-bg-subtle);
}

/* ================================================================
   PASO 4 — Formulario de datos
================================================================ */
.form-cita .form-group {
    margin-bottom: 20px;
}

.form-cita label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.campo-opcional {
    font-weight: 400;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-left: 4px;
}

.form-cita input,
.form-cita textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-subtle);
    font-family: inherit;
    font-size: 16px;
    color: var(--color-text);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-cita input:focus,
.form-cita textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-bg-white);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-cita input.input-error {
    border-color: #d93025;
}

/* Mensaje de error bajo el campo */
.error-msg {
    display: block;
    font-size: 13px;
    color: var(--color-error);
    margin-top: 6px;
    min-height: 18px; /* reservamos espacio para que el layout no salte */
}

/* ================================================================
   PASO 5 — Resumen de la cita
================================================================ */
.resumen-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: 18px;
    padding: 28px 30px;
}

/* dl con dos columnas: etiqueta | valor */
.resumen-lista {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 16px;
    margin: 0;
}

.resumen-lista dt {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 2px;
}

.resumen-lista dd {
    font-size: 15px;
    color: var(--color-text);
    margin: 0;
}

/* ================================================================
   PASO 6 — Pantalla de éxito
================================================================ */
.exito-screen {
    text-align: center;
    padding: 10px 0 20px;
}

.exito-icono {
    width: 64px;
    height: 64px;
    color: var(--color-success);
    margin-bottom: 16px;
}

.exito-screen h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

/* ID de referencia en monospace para que se lea bien */
.exito-id {
    font-size: 14px;
    color: var(--color-text-muted);
    font-family: 'Courier New', monospace;
    margin-bottom: 28px;
}

.exito-aviso {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 24px 0;
}

/* El botón "Volver al inicio" centrado y con ancho limitado */
.exito-btn {
    max-width: 260px;
    margin: 0 auto;
}

/* ================================================================
   NAVEGACIÓN (botones Atrás / Continuar)
================================================================ */
.booking-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border-light);
}

.btn-atras {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 13px 22px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background-color 0.2s, color 0.2s;
}

.btn-atras:hover {
    background-color: var(--color-bg-subtle);
    color: var(--color-text);
}

/* El botón Continuar es un .cta-button, pero en este contexto no debe ser full-width */
.booking-nav .cta-button {
    display: inline-block;
    width: auto;
    padding: 13px 28px;
    margin-left: auto;
}

.booking-nav .cta-button:disabled {
    background-color: var(--color-disabled);
    cursor: not-allowed;
}

/* ================================================================
   RESPONSIVE — móvil
================================================================ */
@media (max-width: 600px) {
    .tipo-card {
        flex-wrap: wrap;
    }

    .tipo-precio {
        margin-left: 0;
        padding-left: 0;
    }

    .resumen-lista {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }

    .resumen-lista dt {
        margin-top: 10px;
    }

    .resumen-lista dt:first-child {
        margin-top: 0;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    }
}
