/* ============================================
   BOOKING DIRECT RESERVATIONS - ESTILOS v3.0
   ============================================ */

.bdr-reservation-container {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #2d3748;
    line-height: 1.6;
}

.bdr-reservation-container *,
.bdr-reservation-container *::before,
.bdr-reservation-container *::after {
    box-sizing: border-box;
}

/* ── Pasos ──────────────────────────────────── */
.bdr-step {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid #bfdbfe;
}

.bdr-step h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: none;
    position: relative;
}

.bdr-step h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #05347f;
    border-radius: 2px;
    margin: 0.5rem auto 0;
}

.bdr-hidden { display: none !important; }

/* ── Nota temporada ─────────────────────────── */
.bdr-season-notice {
    background: #05347f;
    color: #8ed1fc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
}

/* ── Formularios ────────────────────────────── */
.bdr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bdr-form-group {
    display: flex;
    flex-direction: column;
}

.bdr-form-group label {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.bdr-form-group input,
.bdr-form-group select,
.bdr-form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    background: #fff;
}

.bdr-form-group input:focus,
.bdr-form-group select:focus,
.bdr-form-group textarea:focus {
    outline: none;
    border-color: #05347f;
    box-shadow: 0 0 0 3px rgba(5,52,127,0.15);
}

.bdr-field-hint {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* ── Desglose precios ───────────────────────── */
.bdr-price-breakdown {
    background: #f0f6ff;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid #bfdbfe;
}

.bdr-price-breakdown h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.bdr-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #bfdbfe;
}

.bdr-discount  { color: #1a65c0; font-weight: 500; }

.bdr-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    border-top: 2px solid #bfdbfe;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-bottom: none;
}

.bdr-payment-now {
    background: #dbeafe;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0.25rem 0;
    font-weight: 600;
    color: #1e40af;
    border-bottom: none;
}

.bdr-balance {
    color: #718096;
    font-size: 0.9rem;
    border-bottom: none;
}

/* ── Botones ────────────────────────────────── */
.bdr-btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.bdr-btn-primary {
    background: #05347f;
    color: white;
}

.bdr-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5,52,127,0.35);
    background: #1a65c0;
}

.bdr-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.bdr-btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.bdr-btn-secondary:hover { background: #e2e8f0; }

/* ── Errores ────────────────────────────────── */
#bdr-date-error,
#bdr-error-msg {
    color: #c53030;
    background: #fed7d7;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    display: none;
}

.bdr-error {
    padding: 1rem;
    background: #fed7d7;
    color: #c53030;
    border-radius: 8px;
    margin: 1rem 0;
}

.bdr-login-required {
    padding: 2rem;
    text-align: center;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    max-width: 500px;
    margin: 2rem auto;
}

/* ============================================
   CALENDARIO VISUAL
   ============================================ */

.bdr-simple-calendar {
    background: #f0f6ff;
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    width: 100%;
}

/* ── Navegación carrusel calendario ─────────────────── */
.bdr-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.bdr-cal-btn {
    background: #05347f;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.bdr-cal-btn:hover:not([disabled]) { background: #1a65c0; }
.bdr-cal-btn[disabled] {
    background: #bfdbfe;
    color: #93c5fd;
    cursor: not-allowed;
}
.bdr-cal-label {
    font-size: 13px;
    font-weight: 600;
    color: #05347f;
    min-width: 50px;
    text-align: center;
}

/* ── Leyenda ────────────────────────────────── */
.bdr-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 12px;
}

.bdr-legend-free,
.bdr-legend-busy,
.bdr-legend-selected {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.bdr-legend-free     { background: #dbeafe; color: #1e40af; }
.bdr-legend-busy     { background: #fed7d7; color: #c53030; }
.bdr-legend-selected { background: #05347f; color: #fff; }

/* ── Grid de meses: 3 columnas centradas ────── */
.bdr-calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* ── Caja de mes ────────────────────────────── */
.bdr-month-box {
    background: white;
    border-radius: 10px;
    padding: 12px 8px;
    border: 1px solid #bfdbfe;
    width: 100%;
    min-width: 0;
}

.bdr-month-box h6 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 12px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid #bfdbfe;
}

/* ── Grid de 7 columnas ─────────────────────── */
.bdr-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
}

.bdr-day-header {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #a0aec0;
    padding: 4px 0;
    text-transform: uppercase;
}

.bdr-day-spacer {
    visibility: hidden;
    pointer-events: none;
    background: transparent !important;
    border: none !important;
}

/* ── Celda de día — cuadrado perfecto ───────── */
.bdr-day-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    width: 100%;
    transition: transform 0.12s, box-shadow 0.12s;
    user-select: none;
    line-height: 1;
    min-height: 0;
}

.bdr-day-cell.free {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.bdr-day-cell.free:hover {
    background: #bfdbfe;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bdr-day-cell.weekend {
    background: #fef9c3;
    color: #744210;
    border: 1px solid #f6e05e;
}

.bdr-day-cell.weekend:hover {
    background: #f6e05e;
    transform: scale(1.1);
}

.bdr-day-cell.occupied {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.7;
    font-size: 10px;
}

.bdr-day-cell.selected,
.bdr-day-cell.checkin {
    background: #05347f !important;
    color: white !important;
    border: 2px solid #1e40af !important;
    font-weight: 700;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(5,52,127,0.5);
    z-index: 1;
    position: relative;
}

.bdr-day-cell.checkout {
    background: #1a65c0 !important;
    color: white !important;
    border: 2px solid #1e40af !important;
    font-weight: 700;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(26,101,192,0.5);
    z-index: 1;
    position: relative;
}

.bdr-day-cell.in-range {
    background: #bfdbfe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ── Fechas seleccionadas ───────────────────── */
.bdr-selected-dates {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid #bfdbfe;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
    flex-wrap: wrap;
}

.bdr-selected-dates span {
    background: #eff6ff;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
}

/* ── Stripe ─────────────────────────────────── */
#card-element {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

#card-element:focus-within { border-color: #05347f; }

#card-errors {
    color: #c53030;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2em;
}

/* ── Términos ───────────────────────────────── */
.bdr-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f0f6ff;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #4a5568;
}

.bdr-terms-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Métodos de pago alternativos ─────────────────────────────────── */
.bdr-payment-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #718096;
    font-size: 13px;
    font-weight: 600;
}
.bdr-payment-divider::before,
.bdr-payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Contenedor de métodos alternativos (Bizum + transferencia en fila o uno centrado) */
.bdr-alt-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}
.bdr-alt-payments .bdr-request-btn {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 280px;
}

/* Botón Bizum */
.bdr-btn-bizum {
    background: #fff;
    color: #137333;
    border: 2px solid #34a853;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bdr-btn-bizum:hover:not(:disabled) {
    background: #e6f4ea;
    border-color: #137333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 115, 51, 0.2);
}
.bdr-btn-bizum:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Botón Transferencia */
.bdr-btn-transfer {
    background: #fff;
    color: #1e40af;
    border: 2px solid #3b82f6;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bdr-btn-transfer:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}
.bdr-btn-transfer:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Nota informativa bajo los botones alternativos */
.bdr-alt-payment-note {
    font-size: 12px;
    color: #718096;
    text-align: center;
    margin-top: 8px;
    padding: 6px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Mensaje de estado tras envío de Bizum/Transferencia */
.bdr-pending-msg {
    background: #dbeafe;
    border: 2px solid #1a65c0;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 14px;
    color: #1e40af;
    text-align: center;
    font-weight: 600;
}

/* Step 4 — mensaje para reservas pendientes de Bizum/Transferencia */
.bdr-pending-step4 {
    background: #fef9c3;
    border: 2px solid #f6e05e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    color: #744210;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 760px) {
    .bdr-calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bdr-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bdr-calendar-grid {
        grid-template-columns: minmax(0, 320px);
        justify-content: center;
    }

    .bdr-day-cell  { font-size: 13px; }
    .bdr-day-header { font-size: 11px; }

    .bdr-form-row {
        grid-template-columns: 1fr;
    }

    .bdr-reservation-container {
        padding: 0 0.5rem;
    }

    .bdr-step {
        padding: 1.25rem 0.875rem;
    }

    .bdr-alt-payments .bdr-request-btn {
        max-width: 100%;
    }
}

