/* ============================================================
   GeaIQ Surveys — Formulario público
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  -webkit-font-smoothing: antialiased;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Material icons ───────────────────────────────────────── */
.mi {
  font-family: 'Material Symbols Outlined';
  font-weight: 300;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: #252D3A;
  border-radius: 2px
}

/* ── Form title ───────────────────────────────────────────── */
.gq-form-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #E6EAF1;
  line-height: 1.2;
  margin-bottom: 8px;
}

.gq-form-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, .48);
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ── Field wrapper ────────────────────────────────────────── */
.gq-field {
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 18px;
  background: rgba(15, 20, 28, .45);
  transition: border-color .2s;
}

.gq-field:focus-within {
  border-color: rgba(20, 224, 196, .35);
}

.gq-field-label {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #E6EAF1;
  margin-bottom: 10px;
}

.gq-field-label .req {
  color: #E84855;
  margin-left: 3px;
}

.gq-field-help {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .35);
  line-height: 1.45;
}

/* ── Inputs ───────────────────────────────────────────────── */
.gq-input {
  background: rgba(10, 14, 20, .8);
  border: 1px solid #252D3A;
  border-radius: 8px;
  padding: 10px 14px;
  color: #E6EAF1;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  width: 100%;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
}

.gq-input:focus {
  border-color: #14E0C4;
}

.gq-input::placeholder {
  color: #4a5568;
}

textarea.gq-input {
  resize: vertical;
  min-height: 80px;
}

/* ── Radio / Checkbox ─────────────────────────────────────── */
.gq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.gq-option input[type="radio"],
.gq-option input[type="checkbox"] {
  accent-color: #14E0C4;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.gq-option-lbl {
  font-size: 14px;
  color: #C6CBD4;
  line-height: 1.4;
}

/* ── Select ───────────────────────────────────────────────── */
select.gq-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}

/* ── País / Provincia fijados por el creador (read-only) ──── */
.gq-ls-locked {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid #1C2028;
  border-radius: 8px;
  font-size: 13px;
  color: #6B7280;
  cursor: default;
  user-select: none;
}

/* ── Mapa de posición dentro del campo location_select ────── */
.gq-ls-map {
  margin-top: 10px;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #252D3A;
  cursor: crosshair;
  transition: border-color .2s;
}

.gq-ls-map:focus-within {
  border-color: rgba(20, 224, 196, .35);
}

.gq-ls-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11.5px;
  color: #6B7280;
}

/* ── Scale buttons ────────────────────────────────────────── */
.gq-scale {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gq-scale-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #252D3A;
  color: #98A2B3;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}

.gq-scale-btn:hover {
  border-color: rgba(20, 224, 196, .4);
  color: #14E0C4;
}

.gq-scale-btn.active {
  background: #14E0C4;
  border-color: #14E0C4;
  color: #05070B;
  font-weight: 600;
}

.gq-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10.5px;
  color: #6B7280;
  font-family: 'Space Grotesk', sans-serif;
}

/* ── Rating stars ─────────────────────────────────────────── */
.gq-stars {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.gq-star {
  font-family: 'Material Symbols Outlined';
  font-size: 28px;
  color: rgba(255, 255, 255, .2);
  cursor: pointer;
  transition: color .1s, transform .12s;
  line-height: 1;
  user-select: none;
  font-weight: 300;
}

.gq-star:hover,
.gq-star.active {
  color: #FFD83D;
  transform: scale(1.15);
}

/* ── File upload ──────────────────────────────────────────── */
.gq-file-zone {
  border: 1.5px dashed #252D3A;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
  color: #98A2B3;
  font-size: 13px;
}

.gq-file-zone:hover {
  border-color: rgba(20, 224, 196, .4);
}

.gq-file-zone input {
  display: none;
}

/* ── Divider ──────────────────────────────────────────────── */
.gq-divider {
  margin: 32px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.gq-divider-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #E6EAF1;
}

.gq-divider-desc {
  font-size: 13px;
  color: #98A2B3;
  margin-top: 4px;
}

/* ── Info block ───────────────────────────────────────────── */
.gq-info-block {
  margin: 20px 0;
}
.gq-info-block-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: #E6EAF1;
  margin-bottom: 6px;
}
.gq-info-block-text {
  font-size: .875rem;
  color: #98A2B3;
  line-height: 1.6;
  margin-bottom: 8px;
  white-space: pre-wrap;
}
.gq-info-block-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: #E6EAF1;
  text-decoration: none;
  margin-bottom: 16px;
  padding: 7px 14px;
  border: 1px solid rgba(79,195,247,.35);
  border-radius: 8px;
  background: rgba(79,195,247,.07);
  transition: background .15s, border-color .15s;
}
.gq-info-block-link:hover {
  background: rgba(79,195,247,.14);
  border-color: rgba(79,195,247,.6);
}
.gq-info-block-img {
  max-width: 100%;
  border-radius: 6px;
  display: block;
  margin-top: 8px;
  margin-inline: auto;
}
.gq-info-block-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: .82rem;
  color: #94A3B8;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 6px;
  transition: background .15s;
}
.gq-info-block-file:hover { background: rgba(148, 163, 184, .08); }

/* ── Error message ────────────────────────────────────────── */
.gq-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  color: #E84855;
  font-family: 'Inter', system-ui, sans-serif;
}

.gq-err-txt {
  font-family: 'Inter', system-ui, sans-serif;
}

.gq-global-error {
  background: rgba(232, 72, 85, .08);
  border: 1px solid rgba(232, 72, 85, .25);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: #E84855;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Submit ───────────────────────────────────────────────── */
.gq-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: #14E0C4;
  color: #05070B;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 0;
  transition: transform .18s, box-shadow .18s;
  margin-top: 16px;
}

.gq-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -6px rgba(20, 224, 196, .5);
}

.gq-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Success screen ───────────────────────────────────────── */
.gq-success {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Inter', system-ui, sans-serif;
}

.gq-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(20, 224, 196, .1);
  border: 1px solid rgba(20, 224, 196, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.gq-success h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #E6EAF1;
  margin-bottom: 8px;
}

.gq-success p {
  font-size: 14px;
  color: #98A2B3;
  line-height: 1.6;
}

/* ── Toast ────────────────────────────────────────────────── */
.gq-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  color: #E6EAF1;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  font-family: 'Inter', system-ui, sans-serif;
  animation: gq-slide-in .3s ease-out;
  transition: opacity .3s, transform .3s;
}

.gq-toast.out {
  opacity: 0;
  transform: translateX(60px);
}

@keyframes gq-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Leaflet custom ───────────────────────────────────────── */
.leaflet-control-attribution {
  background: rgba(0, 0, 0, .5) !important;
  color: rgba(255, 255, 255, .22) !important;
  font-size: 9px !important;
}

.leaflet-control-zoom a {
  background: #1a2535 !important;
  color: rgba(255, 255, 255, .6) !important;
  border-color: rgba(255, 255, 255, .1) !important;
}

.leaflet-control-zoom a:hover {
  background: #253347 !important;
  color: #fff !important;
}

/* ── Paginación ───────────────────────────────────────────── */
.gq-page-progress {
  margin-bottom: 20px;
}
.gq-page-label {
  font-size: 11px;
  color: #6B7280;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.gq-page-progress-track {
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.gq-page-progress-fill {
  height: 100%;
  background: #14E0C4;
  border-radius: 2px;
  transition: width .3s ease;
}
.gq-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.gq-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: #98A2B3;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all .18s;
}
.gq-back-btn:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.2);
  color: #E6EAF1;
}

/* ── Bloque dirección (location_select showAddress) ────────── */
.ls-addr-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.ls-addr-block .gq-input {
  font-size: 13px;
}

/* ── Campo Matrix ─────────────────────────────────────────── */
.gq-matrix-wrap {
  overflow-x: auto;
  margin-top: 4px;
}
.gq-matrix {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.gq-matrix th,
.gq-matrix td {
  padding: 8px 12px;
  text-align: center;
}
.gq-matrix thead th {
  font-weight: 600;
  color: rgba(255,255,255,.38);
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.gq-matrix tbody tr:nth-child(odd) {
  background: rgba(255,255,255,.025);
}
.gq-matrix tbody tr:hover {
  background: rgba(255,255,255,.05);
}
.gq-matrix td.row-lbl {
  text-align: left;
  font-weight: 500;
  color: #C6CBD4;
  padding-right: 16px;
}
.gq-matrix input[type="radio"],
.gq-matrix input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gq-ac, #14E0C4);
  cursor: pointer;
}