/* form-base.css - reglas compartidas para formularios */

.form-panel, .credito-form-block, .afiliacion-form-block {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: #182951;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.form-header { display:flex; gap:20px; align-items:flex-start; margin-bottom:12px; }
.form-logo img { max-width:140px; height:auto; display:block; }
.title-wrap { flex:1; text-align:center; }
.title-wrap h2 { margin:0; font-size:18px; letter-spacing:1px; }

input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  padding:8px; border-radius:4px; border:1px solid rgba(255,255,255,0.12); background: rgba(15,39,79,0.98); color:#fff; width:100%; box-sizing:border-box;
}

.label-block { display:block; margin-bottom:6px; }

.credito-row { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.min-w-140 { min-width:140px; }
.min-w-170 { min-width:170px; }
.min-w-220 { min-width:220px; }
.credito-col { flex:1; min-width:220px; }

.beneficiario-card { border:1px solid rgba(255,255,255,0.06); padding:12px; margin-bottom:12px; border-radius:6px; background: rgba(255,255,255,0.02); }

.form-actions { margin-top:12px; display:flex; gap:8px; justify-content:flex-end; }

@media (max-width:640px){
  .form-header { flex-direction:column; align-items:flex-start; }
  .credito-row { flex-direction:column; align-items:flex-start; }
}

/* Utilities for inline-to-class replacements */
.small-input { width:10%; }
.small-input.medium { width:20%; }
.small-input.year { width:15%; }
.full-width { width:100%; max-width:100%; }
.row-flex { display:flex; gap:1rem; align-items:center; }
.fixed-240 { width:240px; }

/* utilitarios adicionales globales */
.text-center { text-align:center; }
.mt-12 { margin-top:12px; }
.flex { display:flex; }
.flex-center { display:flex; align-items:center; gap:10px; }
.flex-space { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.opacity-disabled { opacity:.5; pointer-events:none; }

/* Más utilidades */
.hidden { display:none; }
.flex-1 { flex:1; }
.flex-wrap { display:flex; gap:.5rem; flex-wrap:wrap; }
.disabled { opacity:.5; pointer-events:none; }

/* Utility: screen-reader only (visible to assistive tech, hidden visually) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Footer responsiveness: ensure footer base items wrap and remain visible on small screens */
.footer-base {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.footer-base span { display:inline-block; min-width:0; }

@media (max-width:640px){
  .footer-base { justify-content:center; text-align:center; }
}

/* Force footer visibility in case other styles hide it */
.site-footer { position: relative; z-index: 9999; }
.site-footer .footer-base span { color: inherit !important; display: inline-block !important; }
.site-footer .brand, .site-footer .brand * { color: inherit !important; }

/* Ensure footer appears above fixed headers and floating widgets */
.site-footer { position: relative !important; z-index: 10000 !important; }
.site-footer .footer-base { position: relative !important; z-index: 10001 !important; }

/* Add bottom padding to main content so footer is not overlapped by fixed header or widgets */
main.container { padding-bottom: 120px; }
@media (max-width: 640px){
  main.container { padding-bottom: 180px; }
}

/* If there are floating widgets, ensure footer is above them; if widgets use different classes, adjust accordingly */
.chat-widget, .floating-action, .whatsapp-float { z-index: 1999; }

/* Final safety: if a widget uses extremely high z-index, lower it for common classes (adjust only if present) */
.wh-widget, .tawkto, .livechat, .whatsapp-float { z-index: 9998 !important; }
