/* W-8BEN-E Generator — form.css */

#w8bene-app {
  max-width: 780px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: #c1272d;
}

/* ── Cabecera ─────────────────────────────────────────────── */
.w8-header {
  background: #c1272d;
  color: #fff;
  padding: 16px 20px 12px;
  border-radius: 8px 8px 0 0;
}
.w8-header__logo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.w8-header__form-id {
  font-size: 1.3rem;
  letter-spacing: 1px;
}
.w8-header__omb {
  font-size: 0.75rem;
  opacity: .8;
}
.w8-header__title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  opacity: .95;
  line-height: 1.4;
}
.w8-header__sub {
  margin: 0;
  font-size: 0.7rem;
  opacity: .7;
  line-height: 1.4;
}

/* ── Indicadores de paso ──────────────────────────────────── */
.w8-steps {
  display: flex;
  background: #ac1e24;
  border-left: 1px solid #1a1a1a;
  border-right: 1px solid #1a1a1a;
  overflow: hidden;
}
.w8-step {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e9dede;
  cursor: default;
  position: relative;
  transition: background .2s, color .2s;
  border-bottom: 3px solid transparent;
}
.w8-step.active {
  color: #c1272d;
  background: #fff;
  border-bottom-color: #660000;
}
.w8-step.completed {
  color: #000;
  background: #f0fff4;
  border-bottom-color: #276749;
  cursor: pointer;
}
.w8-step.completed::after {
  content: ' ✓';
}

/* ── Paneles / Pasos ──────────────────────────────────────── */
.w8-panel {
  background: #fff;
  border: 1px solid #cbd5e0;
  border-top: none;
  padding: 24px 24px 16px;
  margin: 0;
}
.w8-panel__title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #fff;
  background: #c1272d;
  display: block;
  margin: -24px -24px 20px;
  padding: 8px 14px;
}
.w8-panel__num {
  opacity: .7;
  margin-right: 6px;
}
.w8-section-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #4a5568;
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

/* ── Grid de campos ───────────────────────────────────────── */
.w8-grid {
  display: grid;
  gap: 14px;
}
.w8-grid--2 { grid-template-columns: repeat(2, 1fr); }
.w8-grid--3 { grid-template-columns: repeat(3, 1fr); }
.w8-field--full { grid-column: 1 / -1; }

@media (max-width: 580px) {
  .w8-grid--2,
  .w8-grid--3 { grid-template-columns: 1fr; }
  .w8-field--full { grid-column: 1; }
}

/* ── Campos ───────────────────────────────────────────────── */
.w8-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.w8-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a5568;
  line-height: 1.3;
}
.req { color: #e53e3e; }
.w8-input {
  padding: 9px 12px;
  border: 1.5px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #1a202c;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  box-sizing: border-box;
}
.w8-input:focus {
  outline: none;
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0,51,102,.12);
}
.w8-input--error {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 3px rgba(229,62,62,.12) !important;
}
.w8-hint {
  font-size: 0.68rem;
  color: #a0aec0;
  line-height: 1.3;
}
.w8-field-error {
  font-size: 0.72rem;
  color: #e53e3e;
  font-weight: 600;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.w8-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}
.w8-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #003366;
  cursor: pointer;
}

/* ── Info box ─────────────────────────────────────────────── */
.w8-info-box {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #2c5282;
  line-height: 1.5;
}

/* ── Texto de certificación ───────────────────────────────── */
.w8-cert-text {
  background: #f7fafc;
  border-left: 4px solid #003366;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #4a5568;
  line-height: 1.6;
  border-radius: 0 6px 6px 0;
}

/* ── Navegación inferior ──────────────────────────────────── */
.w8-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

/* ── Botones ──────────────────────────────────────────────── */
.w8-btn {
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .18s, transform .1s;
  text-decoration: none;
  display: inline-block;
}
.w8-btn:active { transform: translateY(1px); }

.w8-btn--next {
  background: #c1272d;
  color: #fff;
}
.w8-btn--next:hover { background: #a61f24; }

.w8-btn--back {
  background: #c1272d;
  color: #4a5568;
}
.w8-btn--back:hover { background: #a61f24; }

.w8-btn--submit {
  background: #c1272d;
  color: #fff;
  padding: 12px 28px;
  font-size: 0.95rem;
}
.w8-btn--submit:hover { background: #a61f24; }
.w8-btn--submit:disabled {
  background: #1d1d1d;
  cursor: not-allowed;
  transform: none;
}

.w8-btn--download {
  background: #c1272d;
  color: #fff !important;
  font-size: 1rem;
  padding: 13px 32px;
  text-decoration: none !important;
  display: inline-block;
}
.w8-btn--download:hover { background: #a61f24; }

.w8-btn--secondary {
  background: #edf2f7;
  color: #4a5568;
}
.w8-btn--secondary:hover { background: #a61f24; }

/* ── Spinner ──────────────────────────────────────────────── */
.w8-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  border: 1px solid #cbd5e0;
  border-top: none;
  background: #fff;
}
.w8-spinner__inner {
  text-align: center;
  color: #4a5568;
}
.w8-spinner__ring {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #003366;
  border-radius: 50%;
  animation: w8spin .8s linear infinite;
  margin: 0 auto 14px;
}
@keyframes w8spin { to { transform: rotate(360deg); } }

/* ── Resultado ────────────────────────────────────────────── */
.w8-result {
  background: #fff;
  border: 1px solid #cbd5e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 40px 24px;
  text-align: center;
}
.w8-result__icon { font-size: 3rem; margin-bottom: 8px; }
.w8-result h3 { margin: 0 0 20px; color: #276749; font-size: 1.2rem; }
.w8-result .w8-btn { margin: 0 8px; }

.w8-disclaimer {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #c05621;
  background: #fffbeb;
  border: 1px solid #fbd38d;
  border-radius: 6px;
  padding: 10px 14px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ── Errores ──────────────────────────────────────────────── */
.w8-errors {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 16px;
  color: #c53030;
  font-size: 0.82rem;
}
.w8-errors ul { margin: 0; padding-left: 18px; }
.w8-errors li { margin-bottom: 4px; }

/* ── Último panel: borde inferior redondeado ──────────────── */
.w8-panel:last-of-type { border-radius: 0 0 8px 8px; }


.w8-nav>button {
  background-color: #c1272d !important;
  color: #ffffff !important;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* Estados interactivos */
.w8-nav>button:hover, .w8-nav>button:focus {
  background-color: #a61f24 !important; /* leve cambio para feedback visual */
  color: #ffffff !important;
  outline: none;
}

