/* =============================================
   RESERVAS RESTAURANTE — Frontend CSS v3
   ============================================= */

.rr-card {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 45px -12px rgba(0,0,0,0.15);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.rr-header {
    background: #111;
    color: #fff;
    text-align: left;
    padding: 2rem 2.5rem 1.6rem;
}
.rr-header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff !important;
    border: none !important;
}
.rr-header p {
    margin: 0;
    opacity: 0.65;
    font-size: 0.9rem;
    color: #fff !important;
}

.rr-body {
    padding: 2rem 2.5rem 2.5rem;
    background: #faf8f2;
}

/* ══════════════════════════════════════
   FILAS — layout con clases explícitas
══════════════════════════════════════ */

/* Fila: contenedor horizontal */
.rr-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Columnas dentro de la fila */
.rr-row .rr-field        { flex: 1; }
.rr-row .rr-field-third  { flex: 1; }
.rr-row .rr-field-half   { flex: 2; }
.rr-row .rr-field-full   { flex: 1; width: 100%; }

/* Campo solo (sin fila) = ancho completo */
.rr-field-block {
    margin-bottom: 1rem;
}

/* ── Labels ── */
.rr-field label,
.rr-field-block label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

/* ── Inputs, selects, textareas ── */
.rr-card input[type="text"],
.rr-card input[type="tel"],
.rr-card input[type="email"],
.rr-card input[type="date"],
.rr-card input[type="number"],
.rr-card select,
.rr-card textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1.5px solid #dbe4e6;
    background: #fff;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}
.rr-card select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}
.rr-card input:focus,
.rr-card select:focus,
.rr-card textarea:focus {
    border-color: #007eab;
    box-shadow: 0 0 0 3px rgba(0,126,171,0.12);
    background: #fff;
}
.rr-card textarea {
    resize: vertical;
    min-height: 90px;
}
.rr-card input::placeholder,
.rr-card textarea::placeholder {
    color: #b0bec5;
    font-size: 0.9rem;
}

/* ── Stepper adultos/niños ── */
.rr-stepper-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1.5px solid #dbe4e6;
    background: #fff;
}
.rr-stepper-label {
    font-size: 0.9rem;
    color: #555;
}
.rr-stepper-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.rr-stepper-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #dbe4e6;
    background: #f8fafc;
    color: #007eab;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}
.rr-stepper-btn:hover { background: #e8f4f8; }
.rr-stepper-val {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    min-width: 20px;
    text-align: center;
}

/* ── Checkbox política ── */
.rr-politica {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 1.2rem 0 0;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}
.rr-politica input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #007eab;
    padding: 0 !important;
}

/* ── Botones ── */
.rr-botones {
    display: flex;
    gap: 1rem;
    margin-top: 1.4rem;
}
.rr-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    line-height: 1.2;
    font-family: inherit;
    text-decoration: none; /* .rr-btn ahora también se usa en el <a> de WhatsApp */
}
.rr-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.rr-btn:active { transform: translateY(0); }
.rr-btn.rojo  { background: #cc1919; color: #fff !important; }
.rr-btn.verde { background: #25D366; color: #fff !important; }

/* ── Nota al pie ── */
.rr-note {
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    line-height: 1.65;
}
.rr-note strong { color: #374151; }

/* ── Mensaje éxito/error ── */
.rr-mensaje {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none;
}
.rr-mensaje.ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.rr-mensaje.err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ══════════════════════════════════════
   RESPONSIVE — Tablet (≤680px)
══════════════════════════════════════ */
@media (max-width: 680px) {
    .rr-body { padding: 1.5rem 1.2rem 2rem; }
    .rr-header { padding: 1.5rem 1.2rem 1.2rem; }
    .rr-header h2 { font-size: 1.3rem; }

    /* Todas las filas se apilan verticalmente */
    .rr-row { flex-direction: column; gap: 0.8rem; }

    /* Excepción: adultos y niños siguen lado a lado en móvil */
    .rr-row.rr-row-comensales { flex-direction: row; }

    .rr-botones { flex-direction: column; }
    .rr-btn { width: 100%; }
}
