/* ==========================================================================
   Booking Wizard — Hotel Rooms Manager
   Wizard de reserva de 4 pasos: Fechas · Extras · Datos · Confirmar
   ========================================================================== */

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --hrw-primary:      var(--hr-primary, #2C7BE5);
    --hrw-primary-dark: #1a5fba;
    --hrw-success:      #16a34a;
    --hrw-text:         #1e293b;
    --hrw-text-muted:   #64748b;
    --hrw-border:       #e2e8f0;
    --hrw-bg:           #f8fafc;
    --hrw-bg-card:      #ffffff;
    --hrw-radius:       12px;
    --hrw-radius-sm:    8px;
    --hrw-shadow:       0 4px 24px rgba(0,0,0,.08);
    --hrw-transition:   .28s cubic-bezier(.4,0,.2,1);
}

/* ── Contenedor principal ─────────────────────────────────────────────────── */
.hr-wizard {
    background: var(--hrw-bg-card);
    border-radius: var(--hrw-radius);    
    padding: 28px 28px 24px;
    max-width: 1500px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Progress bar ─────────────────────────────────────────────────────────── */
.hr-wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    gap: 0;
}

.hr-wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    position: relative;
    flex: 1;
    max-width: 90px;
}

.hr-wiz-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hrw-border);
    color: var(--hrw-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: background var(--hrw-transition), color var(--hrw-transition),
                box-shadow var(--hrw-transition);
    position: relative;
    z-index: 1;
}

.hr-wiz-step-label {
    font-size: 11px;
    color: var(--hrw-text-muted);
    font-weight: 500;
    text-align: center;
    transition: color var(--hrw-transition);
    white-space: nowrap;
}

.hr-wiz-step-divider {
    flex: 1;
    height: 2px;
    background: var(--hrw-border);
    margin-bottom: 20px;
    transition: background var(--hrw-transition);
}

/* Estado activo */
.hr-wiz-step.is-active .hr-wiz-step-num {
    background: var(--hrw-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(44,123,229,.18);
}
.hr-wiz-step.is-active .hr-wiz-step-label {
    color: var(--hrw-primary);
    font-weight: 700;
}

/* Estado completado */
.hr-wiz-step.is-done .hr-wiz-step-num {
    background: var(--hrw-success);
    color: #fff;
}
.hr-wiz-step.is-done .hr-wiz-step-label {
    color: var(--hrw-success);
}
.hr-wiz-step.is-done + .hr-wiz-step-divider {
    background: var(--hrw-success);
}

/* ── Panels ───────────────────────────────────────────────────────────────── */
.hr-wizard-panel {
    display: none;
    animation: hrwFadeIn .22s ease;
}
.hr-wizard-panel.is-active {
    display: block;
}

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

.hr-wiz-panel-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--hrw-text);
    margin: 0 0 4px;
}
.hr-wiz-panel-subtitle {
    font-size: 13px;
    color: var(--hrw-text-muted);
    margin: 0 0 18px;
}

/* ── Mensajes de estado ───────────────────────────────────────────────────── */
.hr-booking-message {
    padding: 12px 16px;
    border-radius: var(--hrw-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}
.hr-booking-message.hr-msg-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.hr-booking-message.hr-msg-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* ── Formulario (reutiliza clases de public-style.css) ────────────────────── */
.hr-form-section { margin-bottom: 18px; }

.hr-form-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hrw-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}

/* ── Resumen de precio (paso 1) ───────────────────────────────────────────── */
.hr-wiz-price-preview {
    background: var(--hrw-bg);
    border: 1px solid var(--hrw-border);
    border-radius: var(--hrw-radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
}
.hr-wiz-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.hr-wiz-price-nights { color: var(--hrw-text-muted); }
.hr-wiz-price-amount {
    font-weight: 700;
    font-size: 16px;
    color: var(--hrw-primary);
}
.hr-wiz-checkin-notice {
    font-size: 12px;
    color: var(--hrw-text-muted);
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Grid de extras (paso 2) ──────────────────────────────────────────────── */
.hr-extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    min-height: 60px;
}

.hr-extra-card {
    border: 2px solid var(--hrw-border);
    border-radius: var(--hrw-radius-sm);
    padding: 14px;
    background: var(--hrw-bg-card);
    transition: border-color var(--hrw-transition), box-shadow var(--hrw-transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hr-extra-card.is-selected {
    border-color: var(--hrw-primary);
    box-shadow: 0 0 0 3px rgba(44,123,229,.12);
}

.hr-extra-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hr-extra-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(44,123,229,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hr-extra-icon i {
    font-size: 20px;
    color: var(--hrw-primary);
}
.hr-extra-info { flex: 1; min-width: 0; }
.hr-extra-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--hrw-text);
    line-height: 1.2;
}
.hr-extra-desc {
    font-size: 12px;
    color: var(--hrw-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-extra-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}
.hr-extra-price {
    font-weight: 700;
    font-size: 15px;
    color: var(--hrw-primary);
}
.hr-extra-price-unit {
    font-size: 11px;
    color: var(--hrw-text-muted);
    font-weight: 400;
}

/* Stepper +/- */
.hr-qty-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--hrw-transition);
}
.hr-extra-card.is-selected .hr-qty-stepper {
    opacity: 1;
    pointer-events: auto;
}

.hr-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--hrw-primary);
    background: transparent;
    color: var(--hrw-primary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--hrw-transition), color var(--hrw-transition);
    padding: 0;
}
.hr-qty-btn:hover {
    background: var(--hrw-primary);
    color: #fff;
}
.hr-qty-val {
    font-weight: 700;
    font-size: 15px;
    min-width: 20px;
    text-align: center;
    color: var(--hrw-text);
}

/* Loading / vacío */
.hr-extras-loading,
.hr-extras-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    color: var(--hrw-text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Total extras */
.hr-extras-total {
    background: var(--hrw-bg);
    border: 1px solid var(--hrw-border);
    border-radius: var(--hrw-radius-sm);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--hrw-text-muted);
}
.hr-extras-total strong {
    font-size: 16px;
    color: var(--hrw-primary);
}

/* ── Resumen final (paso 4) ───────────────────────────────────────────────── */
.hr-summary {
    background: var(--hrw-bg);
    border: 1px solid var(--hrw-border);
    border-radius: var(--hrw-radius-sm);
    overflow: hidden;
    margin-bottom: 18px;
}
.hr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 11px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--hrw-border);
    gap: 12px;
}
.hr-summary-row:last-child { border-bottom: none; }
.hr-summary-label { color: var(--hrw-text-muted); flex-shrink: 0; }
.hr-summary-value {
    font-weight: 600;
    color: var(--hrw-text);
    text-align: right;
}
.hr-summary-row.hr-summary-total {
    background: var(--hrw-primary);
    padding: 13px 16px;
}
.hr-summary-row.hr-summary-total .hr-summary-label,
.hr-summary-row.hr-summary-total .hr-summary-value {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.hr-summary-extras-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.hr-summary-extras-list li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: var(--hrw-text);
}
.hr-summary-extras-list li span:last-child { color: var(--hrw-text-muted); }

/* ── Footer del wizard (botones de navegación) ────────────────────────────── */
.hr-wizard-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.hr-wiz-btn-prev {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    border-radius: var(--hrw-radius-sm);
    border: 2px solid var(--hrw-border);
    background: transparent;
    color: var(--hrw-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--hrw-transition), color var(--hrw-transition);
    text-decoration: none;
}
.hr-wiz-btn-prev:hover {
    border-color: var(--hrw-primary);
    color: var(--hrw-primary);
}

.hr-wiz-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 22px;
    border-radius: var(--hrw-radius-sm);
    border: none;
    background: var(--hrw-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--hrw-transition), box-shadow var(--hrw-transition);
    margin-left: auto;
}
.hr-wiz-btn-next:hover {
    background: var(--hrw-primary-dark);
    box-shadow: 0 4px 12px rgba(44,123,229,.35);
}

/* Submit (paso 4) — reutiliza .hr-submit-btn + override */
.hr-wizard .hr-submit-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 26px;
    border-radius: var(--hrw-radius-sm);
    border: none;
    background: var(--hrw-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--hrw-transition), box-shadow var(--hrw-transition);
}
.hr-wizard .hr-submit-btn:hover:not(:disabled) {
    background: var(--hrw-primary-dark);
    box-shadow: 0 4px 14px rgba(44,123,229,.38);
}
.hr-wizard .hr-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

/* WhatsApp */
.hr-wizard .hr-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--hrw-radius-sm);
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background var(--hrw-transition);
}
.hr-wizard .hr-whatsapp-btn:hover { background: #1da856; }

/* Nota política */
.hr-policy-note {
    font-size: 12px;
    color: var(--hrw-text-muted);
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
}

/* ── Confirmación de éxito ────────────────────────────────────────────────── */
.hr-wiz-success {
    text-align: center;
    padding: 32px 20px;
}
.hr-wiz-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--hrw-success);
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.hr-wiz-success h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--hrw-text);
    margin: 0 0 8px;
}
.hr-wiz-success p {
    font-size: 14px;
    color: var(--hrw-text-muted);
    margin: 0 0 6px;
}
.hr-wiz-booking-id {
    display: inline-block;
    background: var(--hrw-bg);
    border: 1px solid var(--hrw-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-family: monospace;
    font-size: 15px;
    color: var(--hrw-text);
    margin-top: 8px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .hr-wizard { padding: 20px 16px 18px; }
    .hr-wiz-step-label { display: none; }
    .hr-wiz-step-num { width: 30px; height: 30px; font-size: 13px; }
    .hr-extras-grid { grid-template-columns: 1fr; }
    .hr-wizard-footer { flex-direction: column-reverse; }
    .hr-wiz-btn-next,
    .hr-wizard .hr-submit-btn,
    .hr-wiz-btn-prev { width: 100%; justify-content: center; margin-left: 0; }
}
