/**
 * Geektoys Farmacovigilancia y Tecnovigilancia
 * CSS portado 1-a-1 desde el prototipo del cliente (farmacovigilancia-ajustado.html).
 * Se prefijan todas las reglas con .gt-fv para no contaminar el tema de WP.
 */

/* ---- Variables ---- */
.gt-fv {
  --blue:   #0064a8;
  --dark:   #004d83;
  --purple: #7650c8;
  --light:  #f4f8fb;
  --border: #d9e3ec;
  --text:   #23313f;
  --muted:  #657282;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(0,0,0,.08);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.55;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

.gt-fv *, .gt-fv *::before, .gt-fv *::after { box-sizing: border-box; }

/* ---- Header del form ---- */
.gt-fv .form-header {
  padding: 28px;
  background: linear-gradient(135deg, var(--dark), var(--blue));
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.gt-fv .form-header h2 { margin: 0; font-size: 22px; }
.gt-fv .form-header p  { margin: 6px 0 0; opacity: .85; font-size: 15px; }

/* ---- Alert / aviso ---- */
.gt-fv .alert {
  padding: 16px;
  margin-bottom: 24px;
  background: #fff8e8;
  border: 1px solid #f1d28a;
  border-radius: 14px;
  color: #5e4a1b;
  font-size: 14px;
}

/* ---- Steps (secciones numeradas) ---- */
.gt-fv .step {
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.gt-fv .step-title {
  padding: 18px 22px;
  background: #f7fafd;
  border-bottom: 1px solid var(--border);
}
.gt-fv .step-title h3 { margin: 0; color: var(--dark); font-size: 16px; }
.gt-fv .step-title small { color: var(--muted); font-size: 13px; }

/* ---- Grid de campos ---- */
.gt-fv .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 22px;
}
.gt-fv .field { display: flex; flex-direction: column; gap: 6px; }
.gt-fv .full  { grid-column: 1 / -1; }

/* ---- Labels ---- */
.gt-fv label { font-size: 14px; font-weight: 700; color: var(--text); }
.gt-fv .required { color: var(--danger); }
.gt-fv .help { font-size: 12px; font-weight: 400; color: var(--muted); }

/* ---- Inputs, selects, textareas ---- */
.gt-fv input,
.gt-fv select,
.gt-fv textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 13px;
  border: 1px solid #c8d4df;
  border-radius: 10px;
  background: #fff;
  font: 14px inherit;
  color: #283747;
  transition: border-color .15s, box-shadow .15s;
}
.gt-fv textarea  { min-height: 112px; resize: vertical; }
.gt-fv select    { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23657282' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

.gt-fv input:focus,
.gt-fv select:focus,
.gt-fv textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,100,168,.13);
}

.gt-fv input:disabled,
.gt-fv select:disabled,
.gt-fv textarea:disabled {
  background: #f0f3f6;
  color: #9aa4af;
  cursor: not-allowed;
}

/* ---- Estado inválido ---- */
.gt-fv .field-invalid input,
.gt-fv .field-invalid select,
.gt-fv .field-invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180,35,24,.1);
}
.gt-fv .field-error {
  display: none;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}
.gt-fv .field-error.visible { display: block; }

/* ---- Bloque condicional ---- */
.gt-fv .conditional {
  grid-column: 1 / -1;
  padding: 18px;
  background: #f9fafb;
  border: 1px dashed #b7c3d0;
  border-radius: 14px;
}
.gt-fv .conditional h4 { margin: 0 0 14px; color: var(--purple); font-size: 14px; }
.gt-fv .conditional .fields { padding: 0; }

/* ---- Oculto (grupos condicionales) ---- */
.gt-fv .gt-hidden { display: none !important; }

/* ---- Checkbox inline ---- */
.gt-fv .check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.gt-fv .check input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-top: 4px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}
.gt-fv .check.full { grid-column: 1 / -1; }
.gt-fv .check-block {
  padding: 12px 14px;
  background: #f7fafd;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ---- Bloque aviso legal pendiente ---- */
.gt-fv .legal-pending {
  padding: 12px;
  background: #fff8e8;
  border-radius: 10px;
  color: #5e4a1b;
  font-size: 13px;
}

/* ---- Submit ---- */
.gt-fv .submit {
  padding: 28px;
  background: #f7fafd;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.gt-fv .legal { max-width: 760px; font-size: 13px; color: #5b6878; }

.gt-fv .btn {
  display: inline-block;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 700 15px inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .05s;
}
.gt-fv .btn:hover    { background: var(--dark); }
.gt-fv .btn:active   { transform: translateY(1px); }
.gt-fv .btn:disabled,
.gt-fv .btn.loading  { opacity: .65; cursor: progress; }

/* ---- Feedback post-envío ---- */
.gt-fv .feedback {
  display: none;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
}
.gt-fv .feedback.visible { display: block; }
.gt-fv .feedback.ok  { background: #e7f7ee; border: 1px solid #b6e6c9; color: #14713f; }
.gt-fv .feedback.err { background: #fdeaea; border: 1px solid #f3c2c2; color: #a52d2d; }

/* ---- Honeypot ---- */
.gt-fv .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .gt-fv .fields { grid-template-columns: 1fr; }
  .gt-fv .full   { grid-column: auto; }
  .gt-fv .submit { align-items: flex-start; flex-direction: column; }
}

