/* ═══════════════════════════════════════════════════════════
   SAF – Recurso Reposición Carrera Horizontal
   Estilos del formulario
   ═══════════════════════════════════════════════════════════ */

.saf-rr-wrap {
    max-width: 820px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    color: #222;
}

/* Cabecera */
.saf-rr-header {
    background: #006633;
    color: #fff;
    padding: 20px 28px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}
.saf-rr-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #fff !important;
}
.saf-rr-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.88;
}

/* Aviso orientativo */
.saf-rr-aviso-orientativo {
    background: #eef6f1;
    border-left: 4px solid #006633;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Secciones del formulario */
.saf-rr-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.saf-rr-section h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 700;
    color: #006633;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.saf-rr-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #006633;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Filas y campos */
.saf-rr-row { margin-bottom: 14px; }
.saf-rr-row--2col {
    display: flex;
    gap: 16px;
}
.saf-rr-row--2col .saf-rr-field { flex: 1; min-width: 0; }

.saf-rr-field {
    margin-bottom: 14px;
}
.saf-rr-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}
.saf-rr-field input[type="text"],
.saf-rr-field input[type="email"],
.saf-rr-field input[type="number"],
.saf-rr-field select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s;
}
.saf-rr-field input[type="text"]:focus,
.saf-rr-field input[type="email"]:focus,
.saf-rr-field input[type="number"]:focus,
.saf-rr-field select:focus {
    outline: none;
    border-color: #006633;
    box-shadow: 0 0 0 2px rgba(0,102,51,.15);
}
.saf-rr-field small {
    display: block;
    font-size: 11.5px;
    color: #777;
    margin-top: 4px;
}
.req { color: #c0392b; }

/* Radio buttons */
.saf-rr-field--radio label { margin-bottom: 6px; }
.saf-rr-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.saf-rr-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
}
.saf-rr-radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #006633;
    cursor: pointer;
}

/* Grupo de fecha */
.saf-rr-date-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.saf-rr-date-group input[type="number"] {
    width: 72px;
}
.saf-rr-date-group span {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

/* Aviso de acceso denegado */
.saf-rr-aviso {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 24px;
    color: #555;
    font-size: 14px;
}

/* Botón submit */
.saf-rr-submit-wrap {
    text-align: center;
    padding: 10px 0 4px;
}
.saf-rr-btn-primary {
    background: #006633;
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .2s, transform .1s;
}
.saf-rr-btn-primary:hover { background: #004d26; }
.saf-rr-btn-primary:active { transform: scale(.98); }
.saf-rr-btn-primary:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Loading */
.saf-rr-loading {
    margin-top: 14px;
    color: #555;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.saf-rr-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ddd;
    border-top-color: #006633;
    border-radius: 50%;
    animation: saf-spin .7s linear infinite;
}
@keyframes saf-spin { to { transform: rotate(360deg); } }

/* Error */
.saf-rr-error {
    margin-top: 12px;
    color: #c0392b;
    font-size: 13px;
    background: #fdf0ee;
    border: 1px solid #f5c6c1;
    border-radius: 4px;
    padding: 10px 14px;
}

/* Disclaimer */
.saf-rr-disclaimer {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 16px;
    padding: 0 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .saf-rr-row--2col { flex-direction: column; }
    .saf-rr-section { padding: 16px; }
    .saf-rr-btn-primary { width: 100%; justify-content: center; }
}
