/* ================= Formularios de Fluent Forms =================
   Los estilos van bajo .nv-form (.nv-form--footer y .nv-form--demo) y replican el diseño de los
   formularios del sitio. Fluent Forms carga su CSS después del tema, por eso los selectores son largos.
   Los campos se reconocen por su "Name Attribute" (ver FORMS.md). */

.nv-form .fluentform, .nv-form .fluentform *, .nv-form .fluentform .ff-el-group .ff-el-form-control { font-family: var(--font-body); }
.nv-form .fluentform .ff-el-group { margin: 0; }
.nv-form .fluentform .ff-el-input--label { display: block; margin: 0 0 8px; }
.nv-form .fluentform .ff-el-input--label label { display: block; margin: 0; font-size: var(--nv-fs-body); font-weight: 700; line-height: normal; }
.nv-form .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { margin-left: 0; content: " *"; }
.nv-form .fluentform .ff-el-group.ff-el-is-error .text-danger { margin-top: 6px; font-size: 14px; }
.nv-form .ff-message-success { margin: 0; padding: 0; border: 0; box-shadow: none; font-size: var(--nv-fs-body); }

/* ---------- Botón (mismo que .nv-btn) ---------- */
.nv-form .fluentform form .ff-btn.ff-btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-full); padding: var(--btn-pad-y) var(--btn-pad-x);
  font-size: var(--nv-fs-btn); font-weight: var(--weight-semibold); line-height: 1; text-align: center; cursor: pointer; opacity: 1;
  transition: filter var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.nv-form .fluentform form .ff-btn.ff-btn-submit:hover { filter: brightness(1.1); }
.nv-form .fluentform form .ff-btn.ff-btn-submit:active { transform: scale(0.97); }

/* ---------- Casilla de Términos ---------- */
.nv-form .fluentform .ff-el-tc { display: block; margin: 0; }
.nv-form .fluentform .ff-el-form-check-label .ff-el-form-check-input { position: static; }
.nv-form .fluentform .ff-el-tc label.ff_tc_label { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 0; cursor: pointer; }
.nv-form .fluentform .ff-el-tc label.ff_tc_label > span { display: block; flex: none; width: auto; padding: 0 !important; line-height: 0; }
.nv-form .fluentform .ff-el-tc label.ff_tc_label > div { display: block; padding: 0; }
.nv-form .fluentform .ff-el-tc input[type="checkbox"] { appearance: none; -webkit-appearance: none; display: grid; place-content: center; border-radius: 4px; cursor: pointer; }
.nv-form .fluentform .ff-el-tc a { text-decoration: underline; }

/* ================= Pie de página ================= */
.nv-form--footer .fluentform fieldset { display: flex; flex-direction: column; gap: 16px; }
.nv-form--footer .fluentform .ff-el-input--label label { letter-spacing: var(--tracking-wide); color: #C8E4FF; }
.nv-form--footer .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { color: #F4F7F6; }
.nv-form--footer .fluentform .ff-el-group .ff-el-form-control {
  display: block; width: 100%; height: auto; min-height: 0; background: transparent; border: none; box-shadow: inset 0 0 0 1px #73B3E6;
  border-radius: var(--radius-md); padding: 14px 16px; color: #FAFCFB; font-size: max(16px, var(--nv-fs-body)); line-height: normal; outline: none;
}
.nv-form--footer .fluentform .ff-el-group textarea.ff-el-form-control { min-height: 180px; resize: vertical; }
.nv-form--footer .fluentform .ff-el-group .ff-el-form-control:hover { box-shadow: inset 0 0 0 1px #A8F3D0; color: #A8F3D0; }
.nv-form--footer .fluentform .ff-el-group .ff-el-form-control:focus { background: transparent; box-shadow: inset 0 0 0 1px #FAFCFB; color: #F4F7F6; outline: none; }
.nv-form--footer .fluentform .ff-el-tc label.ff_tc_label { font-size: var(--nv-fs-body); color: #F4F7F6; font-weight: 400; line-height: normal; }
.nv-form--footer .fluentform .ff-el-tc a, .nv-form--footer .fluentform .ff-el-tc a:hover { color: #F4F7F6; }
.nv-form--footer .fluentform .ff-el-tc label.ff_tc_label input[type="checkbox"] { flex: none; margin: 3px 3px 3px 4px; width: 16px; height: 16px; background: var(--bg-surface); border: 1px solid var(--accent-primary); }
.nv-form--footer .fluentform .ff-el-tc input[type="checkbox"]:checked { background: var(--accent-primary); }
.nv-form--footer .fluentform .ff-el-tc input[type="checkbox"]:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #FAFCFB; border-bottom: 2px solid #FAFCFB; transform: translateY(-1px) rotate(-45deg); }
.nv-form--footer .fluentform form .ff-btn.ff-btn-submit { display: flex; width: 100%; background: var(--accent-primary); color: #060a09; }
.nv-form--footer .fluentform form .ff-btn.ff-btn-submit:hover { background: #A8F3D0; color: #060a09; }
.nv-form--footer .fluentform .text-danger { color: #F27373; }
.nv-form--footer .ff-message-success { color: #F4F7F6; background: transparent; }
/* Excepción autorizada explícitamente (2026-10-22): más aire alrededor de la casilla de Términos en celular. */
@media (max-width: 899px) {
  .nv-form--footer .fluentform .ff-el-group:has(.ff-el-tc), .nv-form--footer .fluentform .ff_submit_btn_wrapper { margin-top: 16px; }
}

/* ================= Agenda una demo =================
   Rejilla de dos columnas; Prefijo + Teléfono comparten la segunda columna (96 px + 10 px + resto). */
.nv-form--demo .fluentform fieldset {
  display: grid; grid-template-columns: calc(50% - 10px) 106px minmax(0, 1fr); column-gap: 10px; row-gap: 20px;
}
.nv-form--demo .fluentform .ff-el-group { grid-column: 1; min-width: 0; }
.nv-form--demo .fluentform .ff-el-group:has([name="apellido"], [name="giro"], [name="direccion"]) { grid-column: 2 / -1; margin-left: 10px; }
.nv-form--demo .fluentform .ff-el-group:has([name="prefijo"]) { grid-column: 2; margin-left: 10px; }
.nv-form--demo .fluentform .ff-el-group:has([name="telefono"]) { grid-column: 3; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"], [name="descripcion"], .ff-el-tc), .nv-form--demo .fluentform .ff_submit_btn_wrapper { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .nv-form--demo .fluentform fieldset { grid-template-columns: 96px minmax(0, 1fr); column-gap: 10px; }
  .nv-form--demo .fluentform .ff-el-group, .nv-form--demo .fluentform .ff-el-group:has([name="apellido"], [name="giro"], [name="direccion"]) { grid-column: 1 / -1; margin-left: 0; }
  .nv-form--demo .fluentform .ff-el-group:has([name="prefijo"]) { grid-column: 1; margin-left: 0; }
  .nv-form--demo .fluentform .ff-el-group:has([name="telefono"]) { grid-column: 2; }
}

.nv-form--demo .fluentform .ff-el-input--label label { color: #293155; }
.nv-form--demo .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { color: #233c72; }
.nv-form--demo .fluentform .ff-el-group .ff-el-form-control {
  display: block; width: 100%; height: auto; min-height: 0; background: transparent; border: 1px solid rgba(41,49,85,0.22); border-radius: var(--radius-md);
  padding: 14px 16px; font-size: 16px; line-height: normal; color: #060a09; outline: none; box-shadow: none;
  transition: border-color 200ms cubic-bezier(.2,.8,.2,1);
}
/* Flecha propia: la del navegador queda sin margen a la derecha (16 px, igual que el texto a la izquierda). */
.nv-form--demo .fluentform .ff-el-group select.ff-el-form-control,
.nv-form--demo .fluentform .ff-el-group select.ff-el-form-control:focus { appearance: none; -webkit-appearance: none; height: auto; padding-right: 44px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23293155' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px; }
.nv-form--demo .fluentform .ff-el-group textarea.ff-el-form-control { resize: vertical; }
.nv-form--demo .fluentform .ff-el-group .ff-el-form-control::placeholder { color: #6B7280; opacity: 1; }
.nv-form--demo .fluentform .ff-el-group .ff-el-form-control:focus { background: transparent; color: #060a09; border-color: #73B3E6; box-shadow: 0 0 0 3px rgba(115,179,230,0.25); }

/* Selector de producto (píldoras) */
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) .ff-el-input--label { margin-bottom: 10px; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) .ff-el-input--content { display: flex; flex-wrap: wrap; gap: 12px; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) .text-danger { flex-basis: 100%; margin-top: 0; }
.nv-form--demo .fluentform .ff-el-group.ff_list_inline .ff-el-form-check, .nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) .ff-el-form-check { display: block; width: auto !important; margin: 0; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) label.ff-el-form-check-label {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 12px 20px;
  border: 1px solid rgba(41,49,85,0.22); border-radius: var(--radius-full); cursor: pointer;
  font-size: 16px; font-weight: 600; color: #293155;
  transition: background 200ms cubic-bezier(.2,.8,.2,1), color 200ms cubic-bezier(.2,.8,.2,1), border-color 200ms cubic-bezier(.2,.8,.2,1);
}
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) label.ff-el-form-check-label input { accent-color: #233c72; width: 18px; height: 18px; margin: 0; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) label.ff-el-form-check-label:has(input:checked) { background: #233c72; border-color: #233c72; color: #FAFCFB; }
.nv-form--demo .fluentform .ff-el-group:has([name^="productos"]) label.ff-el-form-check-label:has(input:checked) input { accent-color: #73B3E6; }

.nv-form--demo .fluentform .ff-el-tc label.ff_tc_label { font-size: 14px; font-weight: 400; color: #060a09; line-height: normal; }
.nv-form--demo .fluentform .ff-el-tc a { color: #233c72; }
.nv-form--demo .fluentform .ff-el-tc label.ff_tc_label input[type="checkbox"] { flex: none; margin: 2px 3px 3px 4px; width: 18px; height: 18px; background: #FAFCFB; border: 1px solid #233c72; }
.nv-form--demo .fluentform .ff-el-tc label.ff_tc_label input[type="checkbox"]:checked { background: #FAFCFB; }
.nv-form--demo .fluentform .ff-el-tc input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 4px; border-left: 2px solid #233c72; border-bottom: 2px solid #233c72; transform: translateY(-1px) rotate(-45deg); }

.nv-form--demo .fluentform .ff_submit_btn_wrapper { display: flex; justify-content: center; margin-top: 12px; }
.nv-form--demo .fluentform form .ff-btn.ff-btn-submit, .nv-form--demo .fluentform form .ff-btn.ff-btn-submit:hover { background: #233c72; color: #FAFCFB; }
.nv-form--demo .fluentform .text-danger { color: #B3261E; }
.nv-form--demo .ff-message-success { font-weight: 700; color: #233c72; text-align: center; background: transparent; }

/* Ajustes solo celular: campo Descripción más alto y botón en dos líneas con interlineado cómodo. */
@media (max-width: 899px) {
  .nv-form--demo .fluentform .ff-el-group textarea[name="descripcion"] { min-height: 160px; }
  .nv-form--demo .fluentform form .ff-btn.ff-btn-submit { line-height: 1.4; text-wrap: balance; padding: 18px 28px; }
}
