/* ============================================================
   forms.csccr.info — estilos.css
   Paleta CSC: sidebar #0f172a · activo #1e3a8a · azul #0071CE
   navy #001689 · fondo #fafbfc
   RTL: usar propiedades lógicas (margin-inline-start, etc.)
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafbfc;
    color: #1f2937;
    line-height: 1.5;
}

.mono { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; }

/* ---------------- Formulario público ---------------- */

.form-publico {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

.form-cabecera {
    text-align: center;
    margin-bottom: 24px;
}

.form-cabecera img {
    max-height: 80px;
    margin-bottom: 12px;
}

.form-cabecera h1 {
    color: #001689;
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.form-cabecera .org {
    color: #0071CE;
    font-weight: 600;
    margin: 0 0 12px;
}

.form-cabecera .intro {
    color: #4b5563;
    font-size: 0.95rem;
}

.selector-idioma {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.selector-idioma a {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #374151;
    font-size: 0.85rem;
    background: #fff;
}

.selector-idioma a.activo {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #fff;
}

.nota {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 18px;
    margin: 0 0 20px;
}

legend {
    font-weight: 700;
    color: #001689;
    padding: 0 8px;
}

.campo { margin-bottom: 14px; }

.campo label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.campo .req { color: #dc2626; }

.campo .hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
}

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo input[type="date"],
.campo input[type="time"],
.campo select,
.campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.campo input:focus, .campo select:focus, .campo textarea:focus {
    outline: 2px solid #0071CE;
    outline-offset: 0;
    border-color: #0071CE;
}

.campo.error input, .campo.error select {
    border-color: #dc2626;
}

.campo .msg-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

.fila-doble {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 540px) {
    .fila-doble { grid-template-columns: 1fr; }
}

.campo-archivo input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.check-politica {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.check-politica input { margin-top: 3px; }

.btn-enviar {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-enviar:hover { background: #001689; }
.btn-enviar:disabled { background: #9ca3af; cursor: wait; }

.alerta-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.tarjeta-gracias {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 36px 24px;
    text-align: center;
    max-width: 560px;
    margin: 48px auto;
}

.tarjeta-gracias h1 { color: #065f46; }

.tarjeta-gracias .ref {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 1.05rem;
}

/* ---------------- Filas repetibles (invitados / proveedores) ---------------- */

.btn-secundario {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: #fff;
    color: #1e3a8a;
    border: 1px solid #1e3a8a;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-secundario:hover { background: #eff6ff; }

.fila-persona { margin-bottom: 10px; }

.fila-persona input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.btn-quitar {
    width: 42px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.btn-quitar:hover { background: #fee2e2; }

/* ---------------- RTL (hebreo) ---------------- */

[dir="rtl"] { text-align: right; }
[dir="rtl"] .campo label { text-align: right; }
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="email"],
[dir="rtl"] .mono,
[dir="rtl"] .ref {
    direction: ltr;          /* números y emails siempre LTR */
    text-align: right;
    unicode-bidi: plaintext;
}

