/* =============================================================
   Reclamo Financiero — Formulario Nativo — Diseño Premium v3
   Estilo: Dark Glass · Inputs luminosos · Teal #447876
   ============================================================= */

/* ── Variables del sistema ── */
:root {
  --rf-teal:         #447876;
  --rf-teal-light:   #5a9e9b;
  --rf-teal-glow:    rgba(68, 120, 118, 0.25);
  --rf-teal-dim:     rgba(68, 120, 118, 0.15);
  --rf-accent:       #88C417;
  --rf-white:        #ffffff;
  --rf-white-60:     rgba(255,255,255,0.60);
  --rf-white-40:     rgba(255,255,255,0.40);
  --rf-white-15:     rgba(255,255,255,0.15);
  --rf-white-08:     rgba(255,255,255,0.08);
  --rf-white-05:     rgba(255,255,255,0.05);
  --rf-card-bg:      rgba(6, 16, 32, 0.86);
  --rf-input-bg:     rgba(255,255,255,0.06);
  --rf-input-border: rgba(255,255,255,0.12);
  --rf-error:        #ff6b6b;
  --rf-success:      #88C417;
  --rf-radius-card:  6px;
  --rf-radius-input: 5px;
  --rf-radius-btn:   4px;
  --rf-font:         'Lato', sans-serif;
  --rf-ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --rf-speed:        0.22s;
}

/* =============================================================
   CARD — Override del .hero__form original
   ============================================================= */
.hero__form:has(.rf-form-wrapper) {
  background:          var(--rf-card-bg) !important;
  backdrop-filter:     blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border:              1px solid rgba(68,120,118,0.28);
  border-top:          2.5px solid var(--rf-teal);
  border-radius:       var(--rf-radius-card);
  padding:             22px 26px 26px !important;
  box-shadow:
    0 40px 90px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 1px 0  rgba(68,120,118,0.20) inset;
  position: relative;
  overflow: hidden;
}

/* Brillo decorativo sutil en la esquina superior */
.hero__form:has(.rf-form-wrapper)::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(68,120,118,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* =============================================================
   ENCABEZADO DEL FORMULARIO
   ============================================================= */
.rf-form-wrapper {
  width: 100%;
  font-family: var(--rf-font);
}

/* Badge de seguridad sobre el título */
.rf-form-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.rf-form-badge span {
  font-family: var(--rf-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rf-teal-light);
  background: rgba(68,120,118,0.15);
  border: 1px solid rgba(68,120,118,0.35);
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
}

.rf-form-badge i {
  color: var(--rf-teal-light);
  font-size: 10px;
}

/* Título con gradiente */
.rf-form-title {
  font-family: var(--rf-font);
  font-size: 19px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 30%, var(--rf-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Línea divisora decorativa */
.rf-form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.rf-form-divider::before,
.rf-form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(68,120,118,0.40), transparent);
}

.rf-form-divider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rf-teal);
  box-shadow: 0 0 8px var(--rf-teal);
}

/* =============================================================
   GRID 2 COLUMNAS — LAYOUT COMPACTO
   ============================================================= */
.rf-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
}

/* Los hidden inputs no ocupan espacio en el grid */
.rf-form > input[type="hidden"] {
  display: none;
}

/* Campos que ocupan ambas columnas */
.rf-field--full,
.rf-form > .rf-submit-btn,
.rf-form > .rf-trust-row {
  grid-column: 1 / -1;
}

/* =============================================================
   CAMPOS
   ============================================================= */
.rf-field {
  margin-bottom: 8px;
  position: relative;
}

/* Wrapper posición relativa para el label flotante */
.rf-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* ── Inputs, Select, Textarea ── */
.rf-input,
.rf-select,
.rf-textarea {
  width: 100%;
  height: 50px;
  padding: 18px 14px 4px;
  font-family: var(--rf-font);
  font-size: 14px;
  font-weight: 400;
  color: var(--rf-white);
  background: var(--rf-input-bg);
  border: 1.5px solid var(--rf-input-border);
  border-radius: var(--rf-radius-input);
  transition: background var(--rf-speed) var(--rf-ease),
              border-color var(--rf-speed) var(--rf-ease),
              box-shadow var(--rf-speed) var(--rf-ease);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  caret-color: var(--rf-teal-light);
  color-scheme: dark;
}

.rf-textarea {
  height: auto;
  min-height: 72px;
  padding-top: 20px;
  resize: vertical;
  line-height: 1.55;
}

/* Ocultar placeholder — solo existe para el truco del floating label */
.rf-input::placeholder,
.rf-textarea::placeholder { color: transparent; }

/* Quitar spinner de inputs number */
.rf-input[type="number"]::-webkit-outer-spin-button,
.rf-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rf-input[type="number"] { -moz-appearance: textfield; }

/* ── Foco ── */
.rf-input:focus,
.rf-select:focus,
.rf-textarea:focus {
  outline: none;
  background: rgba(68,120,118,0.10);
  border-color: var(--rf-teal);
  box-shadow: 0 0 0 3px var(--rf-teal-glow),
              0 4px 20px rgba(68,120,118,0.12);
}

/* ── Error ── */
.rf-field.has-error .rf-input,
.rf-field.has-error .rf-select,
.rf-field.has-error .rf-textarea {
  border-color: var(--rf-error);
  background: rgba(255,107,107,0.06);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.15);
}

/* ── Éxito ── */
.rf-field.has-success .rf-input,
.rf-field.has-success .rf-select,
.rf-field.has-success .rf-textarea {
  border-color: rgba(136,196,23,0.60);
}

/* =============================================================
   FLOATING LABELS
   ============================================================= */
.rf-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--rf-font);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--rf-white-40);
  pointer-events: none;
  transition: top      var(--rf-speed) var(--rf-ease),
              transform var(--rf-speed) var(--rf-ease),
              font-size var(--rf-speed) var(--rf-ease),
              color    var(--rf-speed) var(--rf-ease),
              letter-spacing var(--rf-speed) var(--rf-ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 18px);
  background: transparent;
  padding: 0 3px;
  line-height: 1;
  z-index: 1;
}

/* Label flotada — input con contenido o enfocado */
.rf-input:focus          ~ .rf-label,
.rf-input:not(:placeholder-shown) ~ .rf-label,
.rf-textarea:focus       ~ .rf-label,
.rf-textarea:not(:placeholder-shown) ~ .rf-label {
  top: 8px;
  transform: none;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--rf-teal-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: transparent;
}

/* Label del textarea */
.rf-label-textarea {
  top: 16px;
  transform: none;
}
.rf-textarea:focus ~ .rf-label-textarea,
.rf-textarea:not(:placeholder-shown) ~ .rf-label-textarea {
  top: 7px;
}

/* Label del campo moneda — posición normal como los demás */
.rf-label-currency { left: 14px; }

/* =============================================================
   SELECT PAÍS — Custom dropdown premium dark glass
   ============================================================= */

.rf-select-wrapper {
  position: relative;
}

/* Ocultar el select nativo y su flecha cuando está en modo custom */
.rf-select-wrapper.rf-custom-init .rf-select {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.rf-select-wrapper.rf-custom-init::after { display: none; }

/* ── Trigger (reemplaza visualmente al select) ── */
.rf-custom-trigger {
  position: relative;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: flex-end;
  padding: 0 36px 8px 14px;
  background: var(--rf-input-bg);
  border: 1px solid var(--rf-input-border);
  border-radius: var(--rf-radius-input);
  cursor: pointer;
  font-family: var(--rf-font);
  font-size: 14px;
  color: var(--rf-white-40);
  transition: border-color var(--rf-speed) var(--rf-ease),
              background   var(--rf-speed) var(--rf-ease);
  user-select: none;
  box-sizing: border-box;
}
.rf-custom-trigger.has-value { color: var(--rf-white); }
.rf-custom-trigger:focus     { outline: none; border-color: var(--rf-teal); background: rgba(68,120,118,0.08); }
.rf-select-wrapper.open .rf-custom-trigger { border-color: var(--rf-teal); background: rgba(68,120,118,0.08); }

/* Chevron del trigger */
.rf-custom-trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-20%);
  width: 0; height: 0;
  border-left:  5px solid transparent;
  border-right: 5px solid transparent;
  border-top:   5px solid var(--rf-white-40);
  transition: transform var(--rf-speed) var(--rf-ease),
              border-top-color var(--rf-speed) var(--rf-ease);
}
.rf-select-wrapper.open .rf-custom-trigger::after {
  transform: translateY(-80%) rotate(180deg);
  border-top-color: var(--rf-teal-light);
}

/* Label flotante — siempre elevada sobre el trigger */
.rf-select-wrapper .rf-label {
  top: 7px;
  transform: none;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rf-teal-light);
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

/* Error / éxito en el trigger custom */
.rf-field.has-error  .rf-custom-trigger { border-color: var(--rf-error); background: rgba(255,107,107,0.06); }
.rf-field.has-success .rf-custom-trigger { border-color: rgba(136,196,23,0.60); }

/* ── Dropdown panel ── */
.rf-custom-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0; right: 0;
  z-index: 99999;
  background: linear-gradient(160deg, rgba(8,18,45,0.99) 0%, rgba(4,10,28,0.99) 100%);
  border: 1px solid rgba(68,120,118,0.40);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.75),
              0 0 0 1px rgba(255,255,255,0.04) inset;
  overflow: hidden;
  flex-direction: column;
  max-height: 300px;
}
.rf-select-wrapper.open .rf-custom-dropdown { display: flex; }

/* Buscador */
.rf-custom-search {
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(68,120,118,0.18);
  flex-shrink: 0;
}
.rf-custom-search input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(68,120,118,0.22);
  border-radius: 6px;
  color: var(--rf-white);
  font-family: var(--rf-font);
  font-size: 12.5px;
  padding: 7px 10px;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--rf-speed) var(--rf-ease);
}
.rf-custom-search input::placeholder { color: var(--rf-white-40); }
.rf-custom-search input:focus { border-color: var(--rf-teal); }

/* Lista de opciones */
.rf-custom-options {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.rf-custom-options::-webkit-scrollbar { width: 4px; }
.rf-custom-options::-webkit-scrollbar-track { background: transparent; }
.rf-custom-options::-webkit-scrollbar-thumb { background: rgba(68,120,118,0.45); border-radius: 2px; }

/* Opción individual */
.rf-custom-option {
  padding: 9px 16px;
  font-family: var(--rf-font);
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: background var(--rf-speed) var(--rf-ease),
              color     var(--rf-speed) var(--rf-ease);
}
.rf-custom-option:hover    { background: rgba(68,120,118,0.14); color: var(--rf-white); }
.rf-custom-option.selected { background: rgba(68,120,118,0.22); color: var(--rf-teal-light); font-weight: 700; }

/* Cabecera de optgroup */
.rf-custom-optgroup {
  padding: 8px 14px 3px;
  font-family: var(--rf-font);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rf-teal-light);
  opacity: 0.65;
}
.rf-custom-optgroup + .rf-custom-option { /* primer ítem después del header */ }
.rf-custom-optgroup:not(:first-child) {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(68,120,118,0.14);
}

/* ── Flecha del select nativo (fallback, cuando no hay custom) ── */
.rf-select-wrapper:not(.rf-custom-init)::after {
  content: '';
  position: absolute;
  right: 15px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left:  5px solid transparent;
  border-right: 5px solid transparent;
  border-top:   6px solid var(--rf-white-40);
  pointer-events: none;
}
.rf-select-wrapper:not(.rf-custom-init) .rf-select {
  padding: 20px 40px 4px 14px;
  height: 50px;
  cursor: pointer;
  color: var(--rf-white);
}

/* =============================================================
   PREFIJO MONEDA — Badge elegante dentro del input (lado derecho)
   ============================================================= */
.rf-currency-prefix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--rf-font);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.10em;
  color: var(--rf-teal-light);
  background: rgba(68,120,118,0.14);
  border: 1px solid rgba(68,120,118,0.30);
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  transition: background var(--rf-speed) var(--rf-ease),
              border-color var(--rf-speed) var(--rf-ease);
}

.rf-input-wrapper:focus-within .rf-currency-prefix {
  background: rgba(68,120,118,0.22);
  border-color: var(--rf-teal);
  color: var(--rf-teal-light);
}

/* Input moneda: ocupa todo el ancho, deja espacio para la badge USD */
.rf-input-currency {
  flex: 1;
  padding-right: 58px;
}

/* =============================================================
   MENSAJES AUXILIARES
   ============================================================= */
.rf-hint {
  display: block;
  font-size: 10.5px;
  color: var(--rf-white-40);
  margin-top: 5px;
  padding-left: 3px;
  line-height: 1.4;
}

.rf-error-msg {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--rf-error);
  margin-top: 5px;
  padding-left: 3px;
  line-height: 1.4;
}

.rf-field.has-error .rf-error-msg {
  display: flex;
}

/* =============================================================
   BOTÓN ENVIAR
   ============================================================= */
.rf-submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  background: linear-gradient(135deg, #447876 0%, #2d5a58 60%, #3a7270 100%);
  color: var(--rf-white);
  border: none;
  border-radius: var(--rf-radius-btn);
  font-family: var(--rf-font);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--rf-speed) var(--rf-ease),
              box-shadow var(--rf-speed) var(--rf-ease),
              background var(--rf-speed) var(--rf-ease);
  box-shadow: 0 4px 24px rgba(68,120,118,0.45),
              0 1px 0 rgba(255,255,255,0.10) inset;
}

/* Shimmer sweep al hover */
.rf-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.12) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--rf-ease);
}

.rf-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(68,120,118,0.60),
              0 1px 0 rgba(255,255,255,0.15) inset;
}

.rf-submit-btn:hover::before {
  transform: translateX(120%);
}

.rf-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(68,120,118,0.40);
}

.rf-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Estado cargando */
.rf-btn-spinner        { display: none; align-items: center; gap: 8px; }
.rf-submit-btn.loading .rf-btn-text    { display: none; }
.rf-submit-btn.loading .rf-btn-spinner { display: flex; }

/* Trust badge bajo el botón */
.rf-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rf-white-05);
}

.rf-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--rf-font);
  font-size: 10px;
  font-weight: 700;
  color: var(--rf-white-40);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.rf-trust-item i {
  color: var(--rf-teal-light);
  font-size: 11px;
}

/* =============================================================
   MODAL OTP — Dark Glass Premium
   ============================================================= */
.rf-otp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 18, 0.88);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.rf-otp-overlay.open { display: flex; }

.rf-otp-modal {
  background: linear-gradient(160deg, rgba(10,24,52,0.98) 0%, rgba(4,14,32,0.99) 100%);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(68,120,118,0.35);
  border-top: 2px solid var(--rf-teal);
  border-radius: 20px;
  padding: 40px 36px 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow:
    0 60px 120px rgba(0,0,0,0.75),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 60px rgba(68,120,118,0.10);
  animation: rfModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
}

/* Glow decorativo detrás */
.rf-otp-modal::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(68,120,118,0.15) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes rfModalIn {
  from { opacity: 0; transform: scale(0.90) translateY(30px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* Botón cerrar */
.rf-otp-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.18s;
  line-height: 1;
  z-index: 2;
}

.rf-otp-close:hover {
  background: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.20);
}

/* Ícono del teléfono */
.rf-otp-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, rgba(68,120,118,0.20), rgba(68,120,118,0.08));
  border: 1.5px solid rgba(68,120,118,0.40);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  box-shadow: 0 0 24px rgba(68,120,118,0.20);
}

/* Título del modal */
.rf-otp-modal h3 {
  font-family: var(--rf-font);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 30%, var(--rf-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtítulo con número */
.rf-otp-subtitle {
  font-family: var(--rf-font);
  font-size: 13.5px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 28px;
}

/* Número de teléfono destacado */
.rf-otp-subtitle strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--rf-teal-light);
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
}

/* Cajas de 6 dígitos */
.rf-otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.rf-otp-digit {
  width: 50px; height: 60px;
  text-align: center;
  font-family: var(--rf-font);
  font-size: 28px;
  font-weight: 900;
  color: var(--rf-white);
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  transition: all 0.18s var(--rf-ease);
  caret-color: var(--rf-teal-light);
  color-scheme: dark;
}

.rf-otp-digit:focus {
  outline: none;
  border-color: var(--rf-teal);
  background: rgba(68,120,118,0.12);
  box-shadow: 0 0 0 3px rgba(68,120,118,0.25), 0 4px 16px rgba(68,120,118,0.15);
}

.rf-otp-digit.filled {
  border-color: var(--rf-teal);
  background: rgba(68,120,118,0.14);
  color: var(--rf-teal-light);
}

.rf-otp-digit.shake {
  animation: rfShake 0.42s var(--rf-ease);
  border-color: var(--rf-error);
  background: rgba(255,107,107,0.08);
}

@keyframes rfShake {
  0%,100% { transform: translateX(0); }
  15%     { transform: translateX(-6px); }
  35%     { transform: translateX(5px); }
  55%     { transform: translateX(-4px); }
  75%     { transform: translateX(3px); }
}

/* Error OTP */
.rf-otp-error-msg {
  min-height: 20px;
  font-family: var(--rf-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--rf-error);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.4;
  background: rgba(255,107,107,0.08);
  border-radius: 6px;
  padding: 6px 10px;
  display: none;
}

.rf-otp-error-msg:not(:empty) { display: block; }

/* Botón verificar — hereda rf-submit-btn */
.rf-otp-modal .rf-submit-btn {
  margin-top: 0;
  letter-spacing: 1.5px;
}

/* Fila reenvío */
.rf-otp-resend-row {
  text-align: center;
  font-family: var(--rf-font);
  font-size: 12.5px;
  color: rgba(255,255,255,0.35);
  margin-top: 18px;
}

.rf-link-btn {
  background: none;
  border: none;
  font-family: var(--rf-font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rf-teal-light);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s;
}

.rf-link-btn:hover  { color: #ffffff; }
.rf-link-btn:disabled {
  color: rgba(255,255,255,0.20);
  cursor: not-allowed;
  text-decoration: none;
}

/* =============================================================
   TOAST — Notificación Premium (slide desde arriba-derecha)
   ============================================================= */
#rf-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  transform: translateX(calc(100% + 32px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  padding: 16px 14px 16px 16px;
  border-radius: 14px;
  z-index: 999999;
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.28s var(--rf-ease);
  pointer-events: none;
  font-family: var(--rf-font);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 20px 60px rgba(0,0,0,0.50), 0 4px 16px rgba(0,0,0,0.30);
}

#rf-toast.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#rf-toast.rf-toast-success {
  background: linear-gradient(135deg, rgba(30,80,40,0.96), rgba(20,60,30,0.97));
  border-color: rgba(68,196,23,0.30);
  box-shadow: 0 20px 60px rgba(0,0,0,0.50), 0 0 30px rgba(68,196,23,0.12);
}

#rf-toast.rf-toast-error {
  background: linear-gradient(135deg, rgba(100,20,20,0.96), rgba(80,10,10,0.97));
  border-color: rgba(255,80,80,0.30);
  box-shadow: 0 20px 60px rgba(0,0,0,0.50), 0 0 30px rgba(255,80,80,0.12);
}

#rf-toast.rf-toast-info {
  background: linear-gradient(135deg, rgba(10,30,70,0.96), rgba(6,20,50,0.97));
  border-color: rgba(68,120,118,0.35);
  box-shadow: 0 20px 60px rgba(0,0,0,0.50), 0 0 30px rgba(68,120,118,0.15);
}

/* Círculo del ícono */
.rf-toast-icon-wrap {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 900;
}

.rf-toast-success .rf-toast-icon-wrap {
  background: rgba(68,196,23,0.20);
  color: #7de050;
  border: 1px solid rgba(68,196,23,0.30);
}

.rf-toast-error .rf-toast-icon-wrap {
  background: rgba(255,80,80,0.20);
  color: #ff8080;
  border: 1px solid rgba(255,80,80,0.30);
}

.rf-toast-info .rf-toast-icon-wrap {
  background: rgba(68,120,118,0.20);
  color: var(--rf-teal-light);
  border: 1px solid rgba(68,120,118,0.35);
}

/* Cuerpo del toast */
.rf-toast-body {
  flex: 1;
  min-width: 0;
}

.rf-toast-title {
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

.rf-toast-msg {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  line-height: 1.45;
  word-break: break-word;
}

/* Botón cerrar del toast */
.rf-toast-x {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.18s, background 0.18s;
  align-self: flex-start;
}

.rf-toast-x:hover {
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.08);
}

/* =============================================================
   CONTADOR DE CARACTERES (descripción)
   ============================================================= */
.rf-char-counter {
  display: block;
  text-align: right;
  font-family: var(--rf-font);
  font-size: 10px;
  font-weight: 600;
  color: var(--rf-white-40);
  margin-top: 4px;
  padding-right: 2px;
  transition: color 0.20s var(--rf-ease);
  letter-spacing: 0.3px;
  user-select: none;
}

/* ~85 % del límite → amarillo suave */
.rf-char-counter--warn {
  color: rgba(255, 190, 60, 0.75);
}

/* 100 % del límite → rojo */
.rf-char-counter--over {
  color: var(--rf-error);
  font-weight: 800;
}

/* =============================================================
   RESPONSIVE — Mobile / Tablet
   ============================================================= */
@media (max-width: 768px) {
  /* 1 columna en mobile/tablet */
  .rf-form {
    grid-template-columns: 1fr;
  }
  .rf-field,
  .rf-field--full {
    grid-column: 1 / -1;
  }

  /* OTP digits más compactos */
  .rf-otp-digit  { width: 42px; height: 52px; font-size: 22px; }

  /* Trust row wraps en 2 */
  .rf-trust-row  { flex-wrap: wrap; gap: 10px; }

  /* Toast ocupa el ancho disponible */
  #rf-toast { max-width: calc(100vw - 32px); white-space: normal; border-radius: 10px; }
}

@media (max-width: 768px) {
  .hero__form:has(.rf-form-wrapper) {
    padding: 20px 16px 24px !important;
  }
  .rf-form-title { font-size: 17px; }
}

@media (max-width: 480px) {
  .rf-otp-modal  { padding: 36px 18px 28px; }
  .rf-otp-inputs { gap: 5px; }
  .rf-otp-digit  { width: 42px; height: 52px; font-size: 22px; }
  .rf-trust-row  { flex-wrap: wrap; gap: 10px; }
  #rf-toast { max-width: calc(100vw - 32px); white-space: normal; border-radius: 10px; }
}

/* =============================================================
   MULTISELECT — ¿Dónde invirtió el dinero?
   ============================================================= */

/* Guardas: el select nativo va siempre oculto y ningún plugin
   (nice-select) debe renderizar nada dentro de los formularios */
.rf-field select[multiple]      { display: none !important; }
.rf-field .nice-select,
.rf-form  .nice-select          { display: none !important; }

/* Trigger — mismo aspecto que los inputs */
.rf-ms-trigger {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 40px 0 14px;
  background: var(--rf-input-bg);
  border: 1px solid var(--rf-input-border);
  border-radius: var(--rf-radius-input);
  cursor: pointer;
  transition: border-color var(--rf-speed) var(--rf-ease),
              background var(--rf-speed) var(--rf-ease);
  user-select: none;
}

.rf-ms-trigger:hover,
.rf-ms-trigger:focus {
  outline: none;
  border-color: var(--rf-teal);
  background: rgba(68,120,118,0.08);
}

.rf-ms--open .rf-ms-trigger {
  border-color: var(--rf-teal);
  background: rgba(68,120,118,0.08);
}

/* Flecha */
.rf-ms-trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--rf-white-60);
  transition: transform var(--rf-speed) var(--rf-ease);
}

.rf-ms--open .rf-ms-trigger::after {
  transform: translateY(-80%) rotate(180deg);
}

/* Placeholder text */
.rf-ms-placeholder {
  font-family: var(--rf-font);
  font-size: 14px;
  color: var(--rf-white-60);
  pointer-events: none;
}

.rf-ms-placeholder em.rf-required-star {
  color: var(--rf-error);
  font-style: normal;
  margin-left: 2px;
}

/* Con selecciones: texto blanco + badge contador teal */
.rf-ms-placeholder.has-value {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rf-white);
}

.rf-ms-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--rf-teal);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0;
}

/* Dropdown — position:fixed para escapar overflow:hidden */
.rf-ms-dropdown {
  display: none;
  position: fixed;
  z-index: 99990;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: linear-gradient(160deg, rgba(10,24,52,0.98) 0%, rgba(4,14,32,0.99) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(68,120,118,0.55);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55),
              0 0 24px rgba(68,120,118,0.12),
              inset 0 1px 0 rgba(255,255,255,0.05);
  max-height: 264px;
  overflow-y: auto;
  overflow-x: hidden;
}

.rf-ms-dropdown.open {
  display: flex;
  animation: rfMsDropIn 0.18s var(--rf-ease);
}

@keyframes rfMsDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
.rf-ms-dropdown::-webkit-scrollbar { width: 4px; }
.rf-ms-dropdown::-webkit-scrollbar-track { background: transparent; }
.rf-ms-dropdown::-webkit-scrollbar-thumb { background: var(--rf-teal-dim); border-radius: 2px; }

/* Option rows */
.rf-ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 5px;
  font-family: var(--rf-font);
  font-size: 13px;
  font-weight: 400;
  color: var(--rf-white-60);
  cursor: pointer;
  transition: background var(--rf-speed) var(--rf-ease),
              color var(--rf-speed) var(--rf-ease);
}

.rf-ms-option:hover { background: var(--rf-teal-dim); color: var(--rf-white); }

.rf-ms-option.selected {
  background: rgba(68,120,118,0.20);
  color: var(--rf-white);
  font-weight: 700;
}

/* Checkbox dot */
.rf-ms-check {
  flex-shrink: 0;
  width: 16px; height: 16px;
  border: 1px solid var(--rf-white-40);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--rf-speed) var(--rf-ease);
}

.rf-ms-option.selected .rf-ms-check {
  background: var(--rf-teal);
  border-color: var(--rf-teal);
}

.rf-ms-option.selected .rf-ms-check::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* Chips — shown below the trigger, outside the wrapper */
.rf-ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 0;
}

.rf-ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Nunca encoger: el chip ocupa exactamente lo que mide su texto */
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(68,120,118,0.28), rgba(68,120,118,0.16));
  border: 1px solid rgba(90,158,155,0.45);
  border-radius: 14px;
  padding: 4px 9px 4px 11px;
  font-family: var(--rf-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rf-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  animation: rfChipIn 0.18s var(--rf-ease);
}

@keyframes rfChipIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Texto completo siempre legible; en pantallas angostas
   envuelve a 2 líneas en vez de truncarse */
.rf-ms-chip-label {
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 0;
}

/* width/height con !important: el tema tiene reglas tipo
   ".hero__form form button { width: 97% }" que deforman el botón */
.rf-ms-chip .rf-ms-chip-x {
  flex: 0 0 auto;
  width: 18px !important;
  height: 18px !important;
  min-width: 0;
  max-width: none;
  background: none;
  border: none;
  color: var(--rf-white-60);
  cursor: pointer;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--rf-speed) var(--rf-ease),
              background var(--rf-speed) var(--rf-ease);
}

.rf-ms-chip .rf-ms-chip-x:hover { background: rgba(255,255,255,0.10); }

.rf-ms-chip-x:hover { color: var(--rf-error); }

/* Error / success states on the trigger */
.rf-field.has-error .rf-ms-trigger {
  border-color: var(--rf-error) !important;
  box-shadow: 0 0 0 2px rgba(255,107,107,0.15);
}

.rf-field.has-success .rf-ms-trigger {
  border-color: var(--rf-success) !important;
}

/* Mobile — chips a ancho completo disponible, área táctil cómoda */
@media (max-width: 480px) {
  .rf-ms-chips  { gap: 7px; }
  .rf-ms-chip   { font-size: 12.5px; padding: 5px 10px 5px 12px; }
  .rf-ms-chip .rf-ms-chip-x { width: 22px !important; height: 22px !important; font-size: 17px; }
  .rf-ms-option { padding: 12px 12px; }
  .rf-ms-dropdown { max-height: 240px; }
}
