* {
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  background-color: var(--field-bg) !important;
}

html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: pan-y;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
}

#stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background-color: var(--bg-color);
  transition: padding 0.3s ease-in-out;
}

/* Área principal de conteúdo (Formulário ou Splash) */
.form-container,
#splash {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center; /* Centraliza se couber, alha ao topo se transbordar */
  overflow-y: auto;
  padding: 2rem 0;
}

/* Splash Screen Fluida */
#splash {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--bg-color);
  transition: opacity 0.5s ease;
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  pointer-events: none;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.btn-accent {
  background-color: var(--accent-color);
  color: white;
}

.text-accent {
  color: var(--accent-color);
}

.ring-accent {
  --tw-ring-color: var(--accent-color);
}

/* Splash Screen */
#splash {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-color);
  cursor: pointer;
  transition:
    opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.8s;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.splash-media {
  width: 100%;
  max-width: clamp(300px, 90vw, 1000px);
  flex: 1 1 auto;
  min-height: 0;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 2.5rem;
  margin-bottom: 2rem;
}

.splash-content h1 {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.splash-content p {
  opacity: 0.6;
  max-width: 800px;
}

.splash-ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.1;
  filter: blur(60px);
  object-fit: cover;
}

/* Custom Dropdown Bairros */
.dropdown-container {
  position: relative;
  transition: all 0.3s ease;
}

/* Novo estado suspenso e centralizado */
.dropdown-container.open {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Centralizado por padrão (para inputs texto) */
  padding: 2rem;
  gap: 1.5rem;
  animation: overlayFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Alinhamento ao Topo para Dropdowns de Localização */
.modal-type-estado,
.modal-type-cidade,
.modal-type-bairro {
  justify-content: flex-start !important;
  padding-top: 4rem !important;
}

/* Ajuste para inputs de texto genéricos (entre o topo e o teclado) */
.modal-type-texto {
  padding-bottom: 25vh; /* Empurra um pouco para cima para não ser coberto pelo teclado */
}

.modal-label {
  width: 100%;
  max-width: 800px;
  text-align: left;
  font-weight: 800;
  font-size: 1.1rem;
  opacity: 0.9;
  color: white;
  margin-bottom: -0.5rem;
}

.modal-input-group {
  display: flex;
  flex-wrap: nowrap; /* Garante que fiquem lado a lado */
  width: 100%;
  max-width: 800px;
  gap: 1rem;
  align-items: center;
}

.modal-input-group > .relative {
  flex: 1;
  min-width: 0; /* Permite que o flex-item encolha se necessário sem quebrar */
}

.modal-ok-btn {
  margin-top: 0 !important;
  flex-shrink: 0; /* Impede que o botão diminua ou suma */
}

.dropdown-list {
  width: 100%;
  max-width: 800px;
  margin-top: 0.5rem;
  max-height: 40vh; /* Limita a altura da lista para não cobrir tudo */
  overflow-y: auto;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(12px);
  }
}

@keyframes searchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Centralização específica para campos de texto simples */
.dropdown-container.open.modal-type-texto {
  justify-content: center;
  padding-bottom: 31vh; /* Empurra para cima para não ser coberto pelo teclado */
}

/* Label da pergunta no modal */
.modal-label {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  max-width: 800px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}

/* Container do input quando aberto em modal */
.dropdown-container.open .relative {
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  position: relative;
}

/* Botão OK posicionado no lado direito do input */
.dropdown-container.open .modal-ok-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 1.25rem;
  height: 56px;
  padding: 0 2rem;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
  white-space: nowrap;
}

.dropdown-container.open .modal-ok-btn:active {
  transform: translateY(-50%) scale(0.95);
  filter: brightness(0.9);
}

.dropdown-container.open input {
  max-width: 800px;
  height: 80px;
  font-size: 1.5rem !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding-left: 2rem;
  padding-right: 130px !important; /* Espaço para o botão OK */
  border: 2px solid var(--accent-color);
  background: white !important;
  color: #1e293b !important;
  width: 100%;
  box-sizing: border-box;
}

.dropdown-container.open .dropdown-arrow {
  display: none !important;
}

/* Ajustes para telas horizontais/curtas */

/* Ajustes para mobile: botão OK empilhado abaixo do input */

/* Bloqueio de scroll no body */
body.dropdown-active {
  overflow: hidden !important;
}

.simple-keyboard {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #ebedef;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0 1rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
  z-index: 3000;
  font-family: var(--font-family) !important;
  pointer-events: auto;

  /* Animação */
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  overflow: hidden;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    visibility 0.4s;
}

.simple-keyboard.show {
  max-height: 400px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  padding: 8px;
}

.simple-keyboard .hg-row {
  margin-bottom: 5px;
}

.simple-keyboard .hg-row:last-child {
  margin-bottom: 0;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--field-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  margin-top: 0.5rem;
  max-height: clamp(200px, 40vh, 600px);
  overflow-y: auto;
  z-index: 50;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lista no modo overlay (só aparece se tiver a classe .show) */
.dropdown-container.open .dropdown-list.show {
  display: block;
  position: static;
  width: 100%;
  max-width: 800px;
  margin-top: -0.5rem;
  border-radius: 2.5rem;
  max-height: calc(100vh - 540px); /* Espaço garantido para o teclado */
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
  background: white;
  animation: listPopIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes listPopIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dropdown-list.show {
  display: block;
}

.dropdown-item {
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.25rem, 3vw, 2.5rem);
  cursor: pointer;
  font-size: clamp(0.875rem, 1.5vw, 1.2rem);
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--bg-color);
  color: var(--accent-color);
  padding-left: 1.5rem;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.dropdown-container.open .dropdown-arrow {
  transform: rotate(180deg);
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-spin-custom {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar custom */
.dropdown-list::-webkit-scrollbar {
  width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

*::-webkit-scrollbar {
  width: 3px;
}

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

*::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 0;
}

/* Sistema de Slides */
.question-slide {
  display: none;
}

.question-slide.active {
  display: block;
}

.question-slide.active > div:first-child {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-slide.slide-out {
  display: block;
}

.question-slide.slide-out > div:first-child {
  animation: slideOut 0.3s forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Barra de Progresso */
.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 10px;
}

/* Navegação */
.nav-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  background: linear-gradient(to top, var(--bg-color) 70%, var(--bg-color) 30%, transparent);
  padding: 2rem 1.5rem 2rem 1.5rem;
  z-index: 100;
  display: flex;
  gap: 1rem;
  box-sizing: border-box;
}

.btn-nav {
  flex: 1;
  padding: 1.25rem;
  border-radius: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-prev {
  background: var(--field-bg);
  color: var(--text-color);
  opacity: 0.6;
  border: 1px border-black/5;
}

.btn-prev:hover {
  opacity: 1;
  background: var(--bg-color);
}

.btn-next {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 10px 20px -5px var(--accent-color);
}

.btn-next:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-submit {
  background: var(--accent-color);
  color: #fff;
  width: 100%;
}

/* Rodapé de Segurança */
.security-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(to top, var(--bg-color) 60%, transparent);
  z-index: 40;
  pointer-events: none;
}

.security-text {
  opacity: 0.3;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-color);
}

.main-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1400px;
  margin: auto; /* Truque do flexbox: centraliza se houver espaço, alinha ao topo se transbordar */
  align-items: center;
  padding-bottom: 160px; /* Margem de segurança para o footer fixo */
}

main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.custom-alert.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.logo {
  width: 90%;
  max-width: 250px;
  height: auto;
  max-height: 150px;
}

/* Customização dos botões */
.simple-keyboard .hg-button {
  font-family: var(--font-family);
  height: clamp(38px, 6vh, 48px);
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 700;
  background: #ffffff;
  border: none;
  border-radius: 10px;
  color: var(--text-color);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05);
  border-bottom: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  transition: all 0.1s ease;
  padding: 0 5px;
}

.simple-keyboard .hg-button i {
  font-size: 1.25rem !important;
  pointer-events: none;
}

.simple-keyboard .hg-button:active {
  background: #e2e8f0;
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.simple-keyboard .hg-button[data-skbtn="{bksp}"] {
  background: #fee2e2;
  color: #ef4444;
}

.simple-keyboard .hg-button[data-skbtn="{enter}"] {
  background: var(--accent-color);
  color: white;
}

.simple-keyboard .hg-button[data-skbtn="{space}"] {
  background: #f0fdfa;
  color: #0d9488;
  flex-grow: 1;
}

.simple-keyboard .hg-button[data-skbtn="{shift}"] {
  background: #f1f5f9;
  color: #64748b;
}

.hg-layout-shift .hg-button[data-skbtn="{shift}"] {
  background: var(--accent-color);
  color: white;
}

/* Layout Adaptativo (Media Queries por Intenção) */

.vertical .dropdown-list {
  max-height: 60vh;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--field-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  margin-top: 0.5rem;
  max-height: clamp(200px, 40vh, 600px);
  overflow-y: auto;
  z-index: 50;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Alertas Adaptativos */
/* Alertas Adaptativos (Estilo Checkin) */
.custom-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  background: white;
  z-index: 9999;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  opacity: 0;
  pointer-events: none;
  padding: 15px 20px;
  border-radius: 12px;
  min-width: 300px;
  max-width: 90%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-alert.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.custom-alert.alert-error {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #991b1b;
}

.custom-alert.alert-success {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #166534;
}

.custom-alert.alert-info {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1e40af;
}

.custom-alert-icon {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.5);
}

.custom-alert-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}

.custom-alert-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-alert-close:hover {
  opacity: 1;
}

/* Accent Popup - Virtual Keyboard */
.accent-popup {
  position: fixed;
  display: none;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 8px;
  z-index: 9999;
  flex-direction: row;
  gap: 8px;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  animation: accentPopupScale 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.accent-popup.active {
  display: flex;
}

@keyframes accentPopupScale {
  from {
    transform: translate(-50%, -80%) scale(0.5);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -100%) scale(1);
    opacity: 1;
  }
}

.accent-variant {
  min-width: 44px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.1s ease;
  color: #1e293b;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.accent-variant:active,
.accent-variant.active {
  background: var(--accent-color, #10b981);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Dark mode support */
.dark .accent-popup {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dark .accent-variant {
  background: #27272a;
  color: #f4f4f5;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

/* Custom Keyboard Button Sizes */
.simple-keyboard .hg-button.btn-space {
  flex-grow: 8 !important;
}

.simple-keyboard .hg-button.btn-backspace {
  flex-grow: 2 !important;
}

/* Opções sem Scroll Interno */
.options-list {
  max-height: none;
  overflow: visible;
  padding-right: 10px;
  margin-right: -10px;

  /* Flex wrap permite itens com larguras flexíveis, esticando órfãos ou forçando quebra para inteiros */
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
}

.options-list label {
  flex: 1 1 auto;
  width: calc(
    50% - 0.375rem
  ); /* Exatos 50% considerando metade do gap de 0.75rem */
  min-width: 250px; /* Reduzido levemente para englobar celulares menores em pé caso prefira, ou mantém 280px */
}

.options-list::-webkit-scrollbar {
  width: 6px;
}

.options-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

.options-list::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
  opacity: 0.3;
}

/* Premium Custom Radios & Checkboxes */
.options-list label {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Efeito de preenchimento suave ao selecionar */
.options-list label:has(input:checked) {
  background-color: white !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

.dark .options-list label:has(input:checked) {
  background-color: #27272a !important;
}

/* Esconder o input padrão mas manter acessível */
.options-list input[type="radio"],
.options-list input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: white;
  margin: 0;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.options-list input[type="radio"] {
  border-radius: 50%;
}

.options-list input[type="checkbox"] {
  border-radius: 6px;
}

/* Estilo do marcador interno (ponto/check) */
.options-list input[type="radio"]::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: scale(0);
  transition: 0.2s transform cubic-bezier(0.18, 0.89, 0.32, 1.28);
  background: white;
}

.options-list input[type="checkbox"]::before {
  content: " \2713";
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  color: white;
  transform: scale(0);
  transition: 0.2s transform cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Estados de Seleção */
.options-list input:checked {
  background: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
}

.options-list input:checked::before {
  transform: scale(1);
}

/* Texto ao selecionar */
.options-list label span {
  flex: 1; /* Força que ele ocupe o restante do espaço após o checkbox */
  min-width: 0; /* Previne que o flex ignore a quebra de texto */
  word-break: break-word; /* Garante que palavras longas em options quebrem */
}

.options-list label:has(input:checked) span {
  color: var(--accent-color);
  opacity: 1 !important;
  font-weight: 700;
}

/* Dark Mode fixes */
.dark .options-list input {
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.1);
}

#offline-sync-indicator {
  display: none !important;
}

/* Modal de Privacidade */
.privacy-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: overlayFadeIn 0.3s ease;
}

.privacy-modal-overlay.hidden {
  display: none;
}

.privacy-modal-card {
  background: white;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.privacy-modal-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.privacy-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
  text-align: left;
}

.privacy-modal-body h2 {
  font-weight: 800;
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.privacy-modal-body p {
  margin-bottom: 1rem;
}
.privacy-modal-body ul {
  margin-bottom: 1rem;
  list-style: disc;
  padding-left: 1.5rem;
}
.privacy-modal-body li {
  margin-bottom: 0.5rem;
}

.privacy-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================
   RESPONSIVO E MEDIA QUERIES
   ========================================== */

@media (max-height: 600px) {
  .dropdown-container.open {
    padding: 1rem;
  }
  .dropdown-container.open input {
    height: 60px;
    font-size: 1.2rem;
    padding-right: 90px !important;
  }
  .dropdown-container.open .modal-ok-btn {
    height: 40px;
    right: 8px;
    padding: 0 1.25rem;
    font-size: 1rem;
  }
  .dropdown-container.open .dropdown-list {
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 640px) {
  .dropdown-container.open .modal-ok-btn {
    height: 48px;
    padding: 0 1.5rem;
    font-size: 1rem;
    right: 8px;
    border-radius: 0.9rem;
  }

  .dropdown-container.open input {
    font-size: 1.2rem !important;
    padding-right: 90px !important;
  }

  .dropdown-item {
    padding: 0.6rem 1.25rem !important;
    font-size: 1.05rem !important;
  }

  .dropdown-container.open .dropdown-list.show {
    max-height: clamp(180px, calc(100vh - 480px), 350px) !important;
    border-radius: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  .progress-container {
    margin-bottom: 1.5rem;
    height: 4px;
  }
}

@media (max-width: 640px) {
  .btn-nav {
    padding: 1rem;
    font-size: 0.9rem;
    border-radius: 1.25rem;
  }
  .nav-footer {
    padding: 1rem 1rem 1.25rem 1rem;
  }
  .main-container {
    padding-bottom: 120px !important;
  }
}

@media (max-width: 640px) {
  .security-footer {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .main-container {
    width: 100%;
    padding-bottom: 20px;
  }

  .question-slide .rounded-3xl {
    padding: 1.5rem !important;
    border-radius: 1.5rem !important;
  }
}

@media (min-width: 800px) and (orientation: portrait) {
  main {
    max-width: 900px;
  }
}

@media (max-width: 640px) {
  .options-list input[type="radio"],
  .options-list input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 640px) {
  .privacy-modal-card {
    max-height: 90vh;
    border-radius: 2rem;
    width: 95%;
  }
  .privacy-modal-header,
  .privacy-modal-body,
  .privacy-modal-footer {
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  #splash {
    padding: 1rem;
  }
  .splash-media {
    max-width: 100%;
    max-height: 55vh;
    border-radius: 2rem;
    margin-bottom: 2rem;
  }
}
