/* ==========================================================================
   WIZARD DE RESERVAS – Fabri-K Coworking
   Estilo coherente con la plantilla principal
   ========================================================================== */

/* --- Layout --- */
.wz-main {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 40px);
}

.wz-main--narrow {
    max-width: 600px;
}

.wz-main--xs {
    max-width: 500px;
}

/* --- Hero cabecera del paso --- */
.wz-hero {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 40px);
}

.wz-hero__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    color: var(--color-tertiary);
    line-height: 1.1;
    margin-bottom: 6px;
}

.wz-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(13px, 1.5vw, 15px);
    color: #8a7e74;
}

/* --- Stepper --- */
.wz-stepper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: clamp(24px, 4vw, 36px);
    flex-wrap: wrap;
}

.wz-stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.wz-stepper__circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
}

.wz-stepper__circle--active {
    background: var(--color-primary);
    color: var(--color-secondary);
}

.wz-stepper__circle--completed {
    background: var(--color-tertiary);
    color: var(--color-secondary);
}

.wz-stepper__circle--pending {
    background: #e4ddd4;
    color: #a89e94;
}

.wz-stepper__label {
    font-family: var(--font-body);
    font-size: 11px;
    margin-top: 6px;
    font-weight: 500;
}

.wz-stepper__label--active { color: var(--color-primary); font-weight: 700; }
.wz-stepper__label--completed { color: var(--color-tertiary); }
.wz-stepper__label--pending { color: #a89e94; }

.wz-stepper__line {
    flex: 0 0 40px;
    height: 2px;
    align-self: center;
    margin-top: -14px;
    transition: background 0.3s;
}

.wz-stepper__line--done { background: var(--color-tertiary); }
.wz-stepper__line--pending { background: #e4ddd4; }

/* --- Alertas --- */
.wz-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    margin-bottom: 20px;
}

.wz-alert--info { background: #faf8f5; color: #5a5047; border: 1px solid #e4ddd4; }
.wz-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.wz-alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.wz-alert--success { background: #f0fdf4; color: #065f46; border: 1px solid #a7f3d0; }
.wz-alert p { margin: 4px 0; }

/* --- Categorías y grid de recursos (step1) --- */
.wz-category-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 26px);
    color: var(--color-tertiary);
    margin: clamp(24px, 3vw, 36px) 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e4ddd4;
}

.wz-category-title:first-of-type { margin-top: 0; }

.wz-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    align-items: stretch;
}

.wz-resource-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(68,47,36,0.06);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wz-resource-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(68,47,36,0.12);
}

/* Body con áreas de altura fija para uniformidad visual entre tarjetas */
.wz-resource-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.wz-resource-card__name {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--color-tertiary);
    margin-bottom: 8px;
    /* Altura fija para 2 líneas: evita saltos cuando hay nombres largos/cortos */
    min-height: 2.4em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wz-resource-card__desc {
    font-family: var(--font-body);
    font-size: 13px;
    color: #8a7e74;
    line-height: 1.5;
    margin-bottom: 14px;
    /* Altura fija para 4 líneas con clamp + reserva el alto si está vacía */
    min-height: calc(1.5em * 4);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wz-resource-card__more {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 4px;
}

.wz-resource-card__more:hover {
    text-decoration: underline;
    color: var(--color-tertiary);
}

.wz-resource-card__prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    /* Altura fija para que el botón quede a la misma distancia siempre */
    min-height: 60px;
    align-content: flex-start;
}

.wz-resource-card__form {
    margin-top: auto;
}

.wz-price-tag {
    background: rgba(151,67,21,0.08);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.wz-price-tag__from {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.wz-btn-select {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wz-btn-select:hover { background: var(--color-tertiary); }

/* --- Card de formulario (step2, 3, 4) --- */
.wz-card {
    background: #fff;
    border-radius: 16px;
    padding: clamp(20px, 4vw, 32px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 32px rgba(68,47,36,0.08);
    border: 1px solid rgba(151,67,21,0.06);
}

.wz-card__header {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--color-tertiary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0ebe4;
}

/* --- Info del recurso (step2) --- */
.wz-resource-info {
    background: rgba(151,67,21,0.06);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.wz-resource-info__name {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
}

.wz-resource-info__detail {
    font-family: var(--font-body);
    font-size: 13px;
    color: #8a7e74;
    margin-top: 2px;
}

/* --- Campos de formulario --- */
.wz-form-group {
    margin-bottom: 18px;
}

.wz-form-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.wz-input,
.wz-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e4ddd4;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-extra);
    background: #faf8f5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wz-input:focus,
.wz-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(151,67,21,0.1);
    background: #fff;
}

.wz-help {
    font-family: var(--font-body);
    font-size: 12px;
    color: #a89e94;
    margin-top: 4px;
}

.wz-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* --- Slots de disponibilidad (step2) --- */
.wz-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.wz-slot {
    padding: 10px 8px;
    border: 1.5px solid #e4ddd4;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    text-align: center;
    transition: all 0.15s;
}

.wz-slot:hover { border-color: var(--color-primary); background: rgba(151,67,21,0.04); }
.wz-slot.selected { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-secondary); z-index: 1; }
.wz-slot.in-range { border-color: var(--color-primary); background: rgba(151,67,21,0.12); color: #5a3518; }
.wz-slot.range-end { border-color: var(--color-primary); background: rgba(151,67,21,0.25); color: #5a3518; font-weight: 600; }
.wz-slot.unavailable { background: #f5f0eb; color: #cbc3b9; cursor: not-allowed; border-color: #f0ebe4; }

.wz-slot__time { font-weight: 700; }
.wz-slot__status { font-size: 11px; display: block; margin-top: 2px; }

/* --- Precio preview --- */
.wz-price-preview {
    text-align: center;
    padding: 14px;
    background: rgba(151,67,21,0.06);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-primary);
    font-weight: 700;
    margin-top: 12px;
}

/* --- Tabs (step3) --- */
.wz-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f0ebe4;
    border-radius: 10px;
    padding: 4px;
}

.wz-tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #8a7e74;
    transition: all 0.2s;
}

.wz-tab-btn.active {
    background: #fff;
    color: var(--color-tertiary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.wz-tab-content { display: none; }
.wz-tab-content.active { display: block; }

/* --- Resumen (step4) --- */
.wz-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-family: var(--font-body);
    font-size: 14px;
}

.wz-summary-row__label { color: #8a7e74; }
.wz-summary-row__value { color: var(--color-tertiary); font-weight: 600; }

.wz-summary-row--total {
    border-top: 2px solid var(--color-tertiary);
    margin-top: 8px;
    padding-top: 14px;
    font-size: 20px;
}

.wz-summary-row--total .wz-summary-row__value {
    color: var(--color-primary);
    font-weight: 800;
}

/* --- Info de pago --- */
.wz-payment-info {
    background: rgba(151,67,21,0.06);
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
}

.wz-payment-info__title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.wz-payment-info p {
    font-family: var(--font-body);
    font-size: 13px;
    color: #5a5047;
    margin-bottom: 4px;
}

.wz-iban {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-tertiary);
    letter-spacing: 1px;
}

/* --- Countdown (step4) --- */
.wz-countdown {
    text-align: center;
    padding: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.wz-countdown--expired {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* --- Botones de acción --- */
.wz-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.wz-btn-back {
    padding: 12px 20px;
    background: #fff;
    color: var(--color-tertiary);
    border: 1.5px solid #e4ddd4;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.wz-btn-back:hover { background: #faf8f5; border-color: var(--color-tertiary); }

.wz-btn-next {
    padding: 12px 28px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.wz-btn-next:hover { background: var(--color-tertiary); }
.wz-btn-next:disabled { background: #cbc3b9; cursor: not-allowed; }

.wz-btn-confirm {
    width: 100%;
    padding: 16px 28px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.wz-btn-confirm:hover { background: var(--color-tertiary); }

/* --- Cancel link --- */
.wz-cancel {
    text-align: center;
    margin-top: 18px;
}

.wz-cancel button {
    background: none;
    border: none;
    color: #dc2626;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- Confirmation card --- */
.wz-confirmation {
    max-width: 520px;
    margin: clamp(32px, 6vw, 60px) auto;
    text-align: center;
}

.wz-confirmation__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(151,67,21,0.1);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.wz-confirmation__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 32px);
    color: var(--color-tertiary);
    margin-bottom: 8px;
}

.wz-confirmation__subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: #8a7e74;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wz-confirmation__details {
    text-align: left;
    background: #faf8f5;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.wz-btn-home {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border-radius: 10px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s;
}

.wz-btn-home:hover { background: var(--color-tertiary); }

/* --- Honeypot --- */
.wz-hp {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
}

/* --- Empty state --- */
.wz-empty {
    text-align: center;
    padding: 48px;
    color: #a89e94;
    font-family: var(--font-body);
}

/* --- Spinner para redirecciones --- */
.wz-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ece5da;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: wz-spin 0.8s linear infinite;
}

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

/* --- Selector de método de pago --- */
.wz-pay-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.wz-pay-method {
    cursor: pointer;
    display: block;
}

.wz-pay-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wz-pay-method__content {
    border: 1.5px solid #e4ddd4;
    border-radius: 10px;
    padding: 16px 20px;
    background: #fff;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.wz-pay-method:hover .wz-pay-method__content {
    border-color: var(--color-primary);
    background: rgba(151, 67, 21, 0.03);
}

.wz-pay-method input:checked + .wz-pay-method__content {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-secondary);
}

.wz-pay-method input:checked + .wz-pay-method__content .wz-pay-method__name {
    color: #fff;
}

.wz-pay-method input:checked + .wz-pay-method__content .wz-pay-method__desc {
    color: rgba(255, 255, 255, 0.6);
}

.wz-pay-method__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(151, 67, 21, 0.06);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.wz-pay-method input:checked + .wz-pay-method__content .wz-pay-method__icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.wz-pay-method__text {
    flex: 1;
    min-width: 0;
}

.wz-pay-method__name {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-extra);
}

.wz-pay-method__desc {
    font-size: 12px;
    color: #a89e94;
    margin-top: 2px;
}

/* --- Opciones de compromiso mensual --- */
.wz-commitment-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.wz-commitment-option {
    cursor: pointer;
    display: block;
}

.wz-commitment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wz-commitment-option__content {
    border: 1.5px solid #e4ddd4;
    border-radius: 10px;
    padding: 16px 20px;
    transition: all 0.15s;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.wz-commitment-option:hover .wz-commitment-option__content {
    border-color: var(--color-primary);
    background: rgba(151,67,21,0.03);
}

.wz-commitment-option input:checked + .wz-commitment-option__content {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-secondary);
}

.wz-commitment-option input:checked + .wz-commitment-option__content .wz-commitment-option__label,
.wz-commitment-option input:checked + .wz-commitment-option__content .wz-commitment-option__price {
    color: #fff;
}

.wz-commitment-option input:checked + .wz-commitment-option__content .wz-commitment-option__price small,
.wz-commitment-option input:checked + .wz-commitment-option__content .wz-commitment-option__unit {
    color: rgba(255,255,255,0.6);
}

.wz-commitment-option__label {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-extra);
    flex: 1;
}

.wz-commitment-option__price {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.1;
    white-space: nowrap;
    text-align: right;
}

.wz-commitment-option__price small {
    font-size: 13px;
    font-weight: 600;
    color: #a89e94;
}

.wz-commitment-option__unit {
    font-size: 12px;
    color: #a89e94;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .wz-resource-grid { grid-template-columns: 1fr; }
    .wz-form-row { grid-template-columns: 1fr; }
    .wz-slots { grid-template-columns: repeat(3, 1fr); }
    .wz-actions { flex-direction: column-reverse; }
    .wz-btn-back, .wz-btn-next { width: 100%; text-align: center; }
}
