/* ============================================================
   FORM.CSS — Dynvitia HQ
   Componentes de formulario reutilizables para el módulo Landing
   (y cualquier otro módulo futuro que necesite editar datos).
   ============================================================ */

.hq-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 73px); /* resta la topbar */
}

@media (max-width: 900px) {
  .hq-shell { grid-template-columns: 1fr; }
  .hq-sidebar { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
}

.hq-sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 0;
}

.hq-sidebar-link {
  display: block;
  padding: 13px 28px;
  font-size: 13.5px;
  color: rgba(244,244,240,0.55);
  text-decoration: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.hq-sidebar-link:hover { color: var(--hueso); background: rgba(244,244,240,0.03); }
.hq-sidebar-link.active {
  color: var(--hueso);
  border-left-color: var(--vino);
  background: rgba(140,38,62,0.08);
}

.hq-sidebar-group-label {
  padding: 18px 28px 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,244,240,0.3);
}
.hq-sidebar-group-label:first-child { padding-top: 0; }

.hq-content {
  padding: 44px 56px 100px;
  max-width: 780px;
}

@media (max-width: 900px) {
  .hq-content { padding: 32px 22px 80px; }
}

.hq-section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 0 0 10px;
}

.hq-section-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  margin: 0 0 8px;
}

.hq-section-desc {
  font-size: 13.5px;
  color: rgba(244,244,240,0.5);
  font-weight: 300;
  margin: 0 0 36px;
  max-width: 480px;
  line-height: 1.6;
}

/* ---------------- CAMPOS ---------------- */
.hq-field-group { margin-bottom: 28px; }

/* Bloques diferenciados visualmente — para no confundir "funciones"
   con "ejemplos/demos" dentro de la misma tarjeta de plan. */
.hq-subblock {
  border-left: 3px solid var(--line);
  padding: 4px 0 4px 16px;
  margin-bottom: 28px;
}
.hq-subblock-features { border-left-color: var(--taupe); }
.hq-subblock-demos { border-left-color: var(--vino); }

.hq-subblock-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(244,244,240,0.7);
  margin-bottom: 8px;
}
.hq-subblock-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hq-subblock-features .hq-subblock-icon { color: var(--taupe); }
.hq-subblock-demos .hq-subblock-icon { color: var(--vino); }

.hq-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 600px) { .hq-field-row { grid-template-columns: 1fr; } }

.hq-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(244,244,240,0.7);
  margin-bottom: 8px;
}

.hq-hint {
  font-size: 11.5px;
  color: rgba(244,244,240,0.35);
  margin-top: 6px;
  line-height: 1.5;
}

.hq-input, .hq-textarea, .hq-select {
  width: 100%;
  background: rgba(244,244,240,0.04);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--hueso);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hq-input:focus, .hq-textarea:focus, .hq-select:focus {
  outline: none;
  border-color: var(--taupe);
  background: rgba(244,244,240,0.06);
}
.hq-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

.hq-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D3A297' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ---------------- SWITCH ---------------- */
.hq-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.hq-switch-row:last-child { border-bottom: none; }

.hq-switch-label { font-size: 13.5px; color: var(--hueso); }
.hq-switch-sub { font-size: 11.5px; color: rgba(244,244,240,0.4); margin-top: 3px; }

.hq-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.hq-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.hq-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(244,244,240,0.15);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.hq-switch-track::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: var(--hueso);
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.hq-switch input:checked + .hq-switch-track { background: var(--vino); }
.hq-switch input:checked + .hq-switch-track::before { transform: translateX(18px); }

/* ---------------- BOTONES ---------------- */
.hq-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--vino);
  color: var(--white);
  border: none;
  padding: 13px 26px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.hq-btn-primary:hover { background: var(--vino-dark); transform: translateY(-1px); }
.hq-btn-primary:disabled { opacity: 0.5; cursor: default; transform: none; }

.hq-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  color: var(--hueso);
  border: 1px solid var(--line);
  padding: 12px 22px;
  border-radius: 3px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hq-btn-secondary:hover { border-color: var(--taupe); background: rgba(211,162,151,0.06); }

.hq-btn-danger-text {
  background: none;
  border: none;
  color: rgba(211,162,151,0.7);
  font-size: 12px;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hq-btn-danger-text:hover { color: var(--taupe); }

.hq-save-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hq-save-status {
  font-size: 12.5px;
  color: rgba(244,244,240,0.45);
}
.hq-save-status.ok { color: #8fae7c; }
.hq-save-status.err { color: var(--taupe); }

/* ---------------- LISTA DE ELEMENTOS REPETIBLES ---------------- */
.hq-repeat-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 14px;
  overflow: hidden;
}

.hq-repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: rgba(244,244,240,0.02);
}
.hq-repeat-head:hover { background: rgba(244,244,240,0.04); }

.hq-repeat-title {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hq-repeat-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(244,244,240,0.1);
  color: rgba(244,244,240,0.5);
  letter-spacing: 0.03em;
}
.hq-repeat-badge.off { background: rgba(211,162,151,0.15); color: var(--taupe); }

.hq-repeat-body {
  padding: 20px 18px 22px;
  border-top: 1px solid var(--line);
}

.hq-repeat-chevron {
  transition: transform 0.2s ease;
  color: rgba(244,244,240,0.4);
}
.hq-repeat-item.open .hq-repeat-chevron { transform: rotate(90deg); }

.hq-add-btn {
  width: 100%;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: none;
  color: rgba(244,244,240,0.5);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.hq-add-btn:hover { border-color: var(--taupe); color: var(--taupe); }

.hq-feature-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hq-feature-line .hq-input { flex: 1; }

.hq-icon-btn {
  background: none;
  border: 1px solid var(--line);
  color: rgba(244,244,240,0.5);
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.hq-icon-btn:hover { border-color: var(--taupe); color: var(--taupe); }

.hq-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.hq-radio-pill {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12.5px;
  cursor: pointer;
  color: rgba(244,244,240,0.6);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.hq-radio-pill.active {
  border-color: var(--vino);
  background: rgba(140,38,62,0.15);
  color: var(--hueso);
}

.hq-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(244,244,240,0.45);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}
.hq-back-link:hover { color: var(--taupe); }
