/* ==========================================================================
   MODAIS DO PROJETO EASY GUIDE - CSS
   ========================================================================== */

/* Backdrop Global */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(16, 24, 40, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100%;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Diálogo / Container do Modal */
.modal-dialog {
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 25px 60px -12px rgba(16, 24, 40, 0.25), 0 0 0 1px rgba(18, 131, 116, 0.12);
  width: 100%;
  max-width: 100%;
  position: relative;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  overflow: hidden;
  box-sizing: border-box;
}

.modal-backdrop.is-open .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-dialog-form {
  max-width: 630px;
}

/* Linha Superior Isolada para o Botão Fechar */
.modal-top-action-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

/* Botão Fechar */
.modal-close-btn {
  position: static;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f4f7;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475467;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #e4e7ec;
  color: #101828;
  transform: scale(1.05);
}

/* Conteúdo Interno */
.modal-content {
  padding: 30px 36px 36px 36px;
}

/* Cabeçalho do Formulário com Stepper */
.modal-header {
  margin-bottom: 20px;
  padding-right: 0;
  width: 100%;
}

.modal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  width: 100%;
}

.modal-eyebrow {
  margin-bottom: 0;
  background: #eef9f7;
  color: #0e6b5e;
  border: 1px solid #d5f2ed;
}

.modal-step-counter {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: #0e6b5e;
  background: #eef9f7;
  padding: 4px 12px;
  border-radius: 40px;
  border: 1px solid #d5f2ed;
  white-space: nowrap;
}

/* Barra de Progresso do Stepper */
.modal-stepper-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.modal-stepper-bar.modal-stepper-2 {
  grid-template-columns: repeat(2, 1fr);
}

.stepper-track-segment {
  height: 4px;
  border-radius: 4px;
  background: #eaecf0;
  transition: background-color 0.3s ease;
}

.stepper-track-segment.active {
  background: var(--color-teal, #128374);
}

/* Steps do Wizard */
.modal-wizard-step {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal-wizard-step.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step-header {
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 25px;
  font-weight: 700;
  color: #101828;
  line-height: 1.3;
  margin-bottom: 10px;
}

.modal-subtitle {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15px;
  color: #475467;
  line-height: 1.5;
  margin-bottom: 6px;
}

/* Formulário de Captura */
.lead-capture-form {
  display: flex;
  flex-direction: column;
}

/* Destaques Tipográficos Brand */
.text-teal {
  color: var(--color-teal, #128374);
}

.text-teal-dark {
  color: var(--color-teal-dark, #0e6b5e);
}

/* ============================================================
   ETAPA 1: RANGES DE QUALIFICAÇÃO (Paleta UHS Verde/Teal com Opacidades)
   ============================================================ */
.qualification-sliders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 18px 0 20px 0;
}

.qualification-range-item {
  border-radius: 18px;
  padding: 18px 20px 16px 20px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Tier 1: Convênios (Opacidade suave) */
.qualification-range-item.range-card-tier1 {
  background: rgba(18, 131, 116, 0.035);
  border: 1.5px solid rgba(18, 131, 116, 0.15);
}

/* Tier 2: Solicitações (Opacidade média) */
.qualification-range-item.range-card-tier2 {
  background: rgba(18, 131, 116, 0.065);
  border: 1.5px solid rgba(18, 131, 116, 0.24);
}

/* Tier 3: Faturamento (Destaque Principal - Gradiente Teal & Opacidade) */
.qualification-range-item.range-card-tier3 {
  background: linear-gradient(135deg, rgba(18, 131, 116, 0.08) 0%, rgba(110, 221, 212, 0.16) 100%);
  border: 1.5px solid rgba(18, 131, 116, 0.35);
  box-shadow: 0 4px 18px -2px rgba(18, 131, 116, 0.1);
}

.qualification-range-item.is-disqualified {
  border-color: #fde68a !important;
  background: #fffdf5 !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08) !important;
}

/* Linha 1: Título e Ícone Exclusivos */
.range-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.range-item-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef9f7;
  border: 1px solid #d5f2ed;
  color: var(--color-teal, #128374);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.range-item-icon-circle.highlight-icon {
  background: #e2f4f2;
  border-color: #b9ece5;
}

.range-item-label {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  flex: 1;
}

/* Linha 2: Valor Selecionado em Linha Própria com Destaque */
.range-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(18, 131, 116, 0.15);
  border-radius: 12px;
  padding: 8px 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.range-value-caption {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.range-item-badge {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 30px;
  white-space: nowrap;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

/* Badges com Tons da Paleta UHS Verde/Teal */
.range-item-badge.badge-tier1 {
  color: #0e6b5e;
  background: rgba(18, 131, 116, 0.12);
  border: 1px solid rgba(18, 131, 116, 0.25);
}

.range-item-badge.badge-tier2 {
  color: #0e6b5e;
  background: rgba(18, 131, 116, 0.16);
  border: 1px solid rgba(18, 131, 116, 0.3);
}

.range-item-badge.badge-tier3 {
  color: #0e6b5e;
  background: rgba(18, 131, 116, 0.22);
  border: 1px solid rgba(18, 131, 116, 0.4);
}

.range-item-badge.is-warning {
  color: #b45309 !important;
  background: #fef3c7 !important;
  border-color: #fde68a !important;
}

.range-slider-control {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: #eaecf0;
  outline: none;
  cursor: pointer;
  margin: 10px 0 6px 0;
  display: block;
}

/* Thumbs Customizados para os Sliders (Padrão Teal) */
.range-slider-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #128374;
  border: 3.5px solid #ffffff;
  box-shadow: 0 3px 10px rgba(18, 131, 116, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.range-slider-control.slider-tier3::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.48);
}

.range-slider-control::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  background: #0e6b5e;
}

.range-slider-control.is-warning::-webkit-slider-thumb {
  background: #d97706 !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.45) !important;
}

.range-slider-control::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #128374;
  border: 3.5px solid #ffffff;
  box-shadow: 0 3px 10px rgba(18, 131, 116, 0.4);
  cursor: pointer;
}

.range-slider-control.slider-tier3::-moz-range-thumb {
  width: 30px;
  height: 30px;
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.48);
}

.range-slider-control.is-warning::-moz-range-thumb {
  background: #d97706 !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.45) !important;
}

.range-item-bounds {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12.5px;
  color: #475467;
  font-weight: 600;
  margin-top: 6px;
}

/* Alerta Convênio NÃO */
.convenio-alert-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: #92400e;
  animation: fadeInDown 0.25s ease-out;
}

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

.alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.alert-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
}

.expandir-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 2px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid #fcd34d;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
}

.expandir-checkbox-label:hover {
  background: #ffffff;
  border-color: #f59e0b;
}

.expandir-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.expandir-checkbox-label .checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #d97706;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s ease;
}

.expandir-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #d97706;
  border-color: #d97706;
}

.expandir-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.expandir-checkbox-label .checkbox-text {
  font-size: 12.5px;
  line-height: 1.35;
  color: #78350f;
  text-align: left;
}

/* ============================================================
   ETAPA 2: FATURAMENTO COM RANGE SLIDER
   ============================================================ */
.faturamento-range-container {
  padding: 24px 20px 20px 20px;
  background: #f8fafb;
  border: 1.5px solid #e4eceb;
  border-radius: 20px;
  margin: 16px 0 20px 0;
}

.range-slider-wrapper {
  margin-bottom: 22px;
  position: relative;
  width: 100%;
}

.faturamento-range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(to right, #128374 0%, #128374 22%, #e4eceb 22%, #e4eceb 100%);
  outline: none;
  cursor: pointer;
  margin: 10px 0;
}

/* Custom Thumb Webkit */
.faturamento-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #128374;
  border: 3.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.4), 0 2px 4px rgba(16, 24, 40, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.faturamento-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  background: #0e6b5e;
}

.faturamento-range-input::-webkit-slider-thumb:active {
  transform: scale(1.18);
  background: #0a4f45;
}

/* Custom Thumb Firefox */
.faturamento-range-input::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #128374;
  border: 3.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.4);
  cursor: pointer;
}

.faturamento-display-box {
  text-align: center;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #d5f2ed;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(18, 131, 116, 0.06);
}

.faturamento-display-prefix {
  display: block;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.faturamento-dynamic-value {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--color-teal, #128374);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.range-bounds-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.range-bound-pill {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  color: #475467;
  background: #ffffff;
  border: 1px solid #e4eceb;
  padding: 4px 12px;
  border-radius: 20px;
}

.range-bound-max {
  color: var(--color-teal, #128374);
  border-color: #d5f2ed;
  background: #eef9f7;
}

/* ============================================================
   ETAPA 3: FORMULÁRIO DE CONTATO
   ============================================================ */
.step-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-label {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  color: #344054;
}

.form-label .req {
  color: #d92d20;
}

.form-input,
.form-select {
  width: 100%;
  height: 48px;
  border: 1.5px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 14px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14.5px;
  color: #101828;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--color-teal, #128374);
  box-shadow: 0 0 0 3.5px rgba(18, 131, 116, 0.15);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23475467' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Erros de Validação */
.field-error {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12px;
  color: #d92d20;
  display: none;
  margin-top: 2px;
}

.form-group.is-invalid .form-input,
.form-group.is-invalid .form-select {
  border-color: #fda29b;
  background-color: #fef3f2;
}

.form-group.is-invalid .field-error {
  display: block;
}

/* ============================================================
   AÇÕES DO WIZARD (BOTÕES AVANÇAR / VOLTAR / ENVIAR)
   ============================================================ */
.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  width: 100%;
}

.wizard-actions-double {
  justify-content: space-between;
  align-items: center;
}

.btn-wizard-next,
.btn-submit-lead {
  flex: 1;
  height: 52px;
  background-color: var(--color-teal, #128374);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(18, 131, 116, 0.28);
}

.btn-wizard-next:hover:not(:disabled),
.btn-submit-lead:hover {
  background-color: var(--color-teal-dark, #0e6b5e);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(18, 131, 116, 0.38);
}

.btn-wizard-next:disabled {
  background-color: #eaecf0;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-wizard-prev {
  height: 52px;
  padding: 0 22px;
  background-color: #ffffff;
  color: #344054;
  border: 1.5px solid #d0d5dd;
  border-radius: 100px;
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-wizard-prev:hover {
  background-color: #f8fafc;
  border-color: #98a2b3;
  color: #0f172a;
}

.form-security-note {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 12.5px;
  color: #667085;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

/* Estado de Sucesso */
.modal-body-success {
  text-align: center;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #eef9f7;
  border: 2px solid #d5f2ed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(18, 131, 116, 0.15);
}

.success-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: #101828;
  margin-bottom: 12px;
}

.success-desc {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15px;
  color: #475467;
  line-height: 1.5;
  max-width: 460px;
  margin-bottom: 28px;
}

.btn-success-close {
  min-width: 160px;
  justify-content: center;
}

/* ==========================================================================
   MODAL DE VÍDEO NO YOUTUBE (Tema Claro Clean / Padrão UHS)
   ========================================================================== */
.modal-backdrop-video {
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-dialog-video {
  max-width: 920px;
  background: #ffffff;
  border-radius: 28px;
  border: 1.5px solid rgba(110, 221, 212, 0.45);
  box-shadow: 0 25px 60px rgba(18, 131, 116, 0.16), 0 0 0 1px rgba(110, 221, 212, 0.15);
  overflow: hidden;
}

.modal-content-video {
  padding: 0;
}

.video-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #edf9f7 100%);
  border-bottom: 1px solid rgba(110, 221, 212, 0.3);
}

.video-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-pill {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  background: #e2f4f2;
  color: #21948b;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(110, 221, 212, 0.3);
}

.video-modal-title {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 17px;
  font-weight: 700;
  color: #101828;
  margin: 0;
  line-height: 1.3;
}

.video-close-btn {
  position: static;
  background: #eef9f7;
  border: 1px solid rgba(110, 221, 212, 0.4);
  color: #4e4e4e;
  box-shadow: 0 2px 6px rgba(18, 131, 116, 0.08);
}

.video-close-btn:hover {
  background: #ffffff;
  color: #21948b;
  border-color: #21948b;
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.18);
}

.video-responsive-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  background: #f8fafb;
}

.video-responsive-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-footer {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #f8fdfc 0%, #edf9f7 100%);
  border-top: 1px solid rgba(110, 221, 212, 0.3);
  flex-wrap: wrap;
}

.video-footer-text {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 15px;
  color: #4e4e4e;
  font-weight: 500;
  margin: 0;
}

/* Responsividade Modais */
@media (max-width: 768px) {
  /* Experiência App Full-Screen para o Modal de Demonstração */
  #modal-demo.modal-backdrop {
    padding: 0;
    background: #ffffff;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  #modal-demo .modal-dialog-form {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #modal-demo.is-open .modal-dialog-form {
    transform: translateY(0);
  }

  #modal-demo .modal-top-action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    padding-top: max(4px, env(safe-area-inset-top));
  }

  #modal-demo .modal-close-btn {
    position: static;
    top: auto;
    right: auto;
    width: 40px;
    height: 40px;
    background: #f2f4f7;
    border-radius: 50%;
    color: #344054;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  }

  #modal-demo .modal-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)) 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
  }

  #modal-demo .modal-header {
    margin-bottom: 20px;
    padding-right: 0; /* Largura total liberada */
    width: 100%;
  }

  #modal-demo .modal-title {
    font-size: 22px;
    line-height: 1.3;
  }

  #modal-demo .modal-subtitle {
    font-size: 14px;
    line-height: 1.45;
  }

  #modal-demo .qualification-sliders-list {
    gap: 14px;
    margin: 14px 0 18px 0;
  }

  #modal-demo .qualification-range-item {
    padding: 16px 14px 14px 14px;
    border-radius: 16px;
  }

  #modal-demo .range-item-top {
    gap: 10px;
    margin-bottom: 10px;
  }

  #modal-demo .range-item-icon-circle {
    width: 32px;
    height: 32px;
  }

  #modal-demo .range-item-label {
    font-size: 14.5px;
    line-height: 1.3;
  }

  #modal-demo .range-value-row {
    padding: 7px 12px;
    margin-bottom: 8px;
  }

  #modal-demo .range-value-caption {
    font-size: 11.5px;
  }

  #modal-demo .range-item-badge {
    font-size: 13.5px;
    padding: 3px 12px;
  }

  #modal-demo .range-item-bounds {
    font-size: 12px;
  }

  #modal-demo .form-group {
    margin-bottom: 14px;
  }

  #modal-demo .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
  }

  #modal-demo .form-input,
  #modal-demo .form-select {
    font-size: 16px; /* Previne auto-zoom no iOS */
    height: 50px;
    border-radius: 12px;
    padding: 0 14px;
  }

  #modal-demo .form-label {
    font-size: 13.5px;
    margin-bottom: 6px;
  }

  #modal-demo .btn-wizard-next,
  #modal-demo .btn-wizard-prev,
  #modal-demo .btn-submit-lead {
    height: 52px;
    font-size: 15px;
    border-radius: 100px;
  }

  #modal-demo .modal-body-success {
    padding: 40px 10px;
    margin: auto 0;
    text-align: center;
  }

  /* Modais Padrão (Vídeo e outros) */
  .modal-backdrop:not(#modal-demo) {
    padding: 12px 10px;
    align-items: center;
  }

  .modal-dialog:not(.modal-dialog-form) {
    border-radius: 22px;
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: auto;
  }

  .modal-dialog-video {
    border-radius: 20px;
    max-width: 100%;
    width: 100%;
    margin: auto;
  }

  .video-modal-topbar {
    padding: 12px 14px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .video-modal-header-info {
    gap: 4px;
    flex: 1;
    min-width: 0;
  }

  .video-pill {
    font-size: 11px;
    padding: 2px 10px;
  }

  .video-modal-title {
    font-size: 13.5px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .video-close-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .video-modal-footer {
    padding: 14px 14px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .video-footer-text {
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    width: 100%;
  }

  .video-modal-footer .btn-figma-primary {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    font-size: 14px;
    padding: 8px 14px 8px 8px;
    white-space: normal;
    text-align: center;
  }

  .video-modal-footer .btn-figma-primary .icon-circle {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  #modal-demo .modal-content {
    padding: max(20px, calc(env(safe-area-inset-top) + 8px)) 16px max(24px, env(safe-area-inset-bottom)) 16px;
  }

  #modal-demo .modal-title {
    font-size: 20px;
  }

  .modal-backdrop:not(#modal-demo) {
    padding: 8px;
  }

  .modal-dialog:not(.modal-dialog-form) {
    border-radius: 18px;
    max-height: calc(100dvh - 16px);
  }

  .modal-dialog-video {
    border-radius: 16px;
  }

  .video-modal-topbar {
    padding: 10px 12px;
  }

  .video-modal-footer {
    padding: 12px;
  }
}

/* ==========================================================================
   MODAIS LEGAIS (TERMOS DE USO & POLÍTICAS DE PRIVACIDADE)
   ========================================================================== */

.modal-dialog-legal {
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-content-legal {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
  overflow: hidden;
  padding: 0;
}

.modal-legal-body {
  padding: 0 32px 28px 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.modal-legal-header {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eaecf0;
}

.legal-badge {
  display: inline-block;
  background: rgba(18, 131, 116, 0.1);
  color: #128374;
  font-family: var(--font-primary, 'Plus Jakarta Sans', sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.modal-legal-title {
  font-family: var(--font-primary, 'Plus Jakarta Sans', sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: #101828;
  margin: 4px 0;
  letter-spacing: -0.5px;
}

.modal-legal-subtitle {
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 13px;
  color: #667085;
  margin: 0;
}

.legal-text-scroll {
  overflow-y: auto;
  padding-right: 12px;
  max-height: calc(85vh - 220px);
  font-family: var(--font-primary, 'DM Sans', sans-serif);
  font-size: 14.5px;
  line-height: 1.65;
  color: #344054;
}

.legal-text-scroll::-webkit-scrollbar {
  width: 6px;
}

.legal-text-scroll::-webkit-scrollbar-track {
  background: #f2f4f7;
  border-radius: 999px;
}

.legal-text-scroll::-webkit-scrollbar-thumb {
  background: #d0d5dd;
  border-radius: 999px;
}

.legal-text-scroll::-webkit-scrollbar-thumb:hover {
  background: #98a2b3;
}

.legal-text-scroll h3 {
  font-family: var(--font-primary, 'Plus Jakarta Sans', sans-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: #101828;
  margin: 20px 0 8px 0;
}

.legal-text-scroll h3:first-of-type {
  margin-top: 0;
}

.legal-text-scroll p {
  margin: 0 0 14px 0;
}

.legal-text-scroll ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
}

.legal-text-scroll li {
  margin-bottom: 8px;
}

.legal-contact-callout {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-left: 4px solid #128374;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.legal-contact-callout a {
  color: #128374;
  font-weight: 600;
  text-decoration: underline;
}

.modal-legal-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #eaecf0;
  display: flex;
  justify-content: flex-end;
}

.btn-legal-close {
  background: #128374;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  font-family: var(--font-primary, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-legal-close:hover {
  background: #0e6c60;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 131, 116, 0.25);
}

@media (max-width: 640px) {
  .modal-dialog-legal {
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .modal-legal-body {
    padding: 0 20px 20px 20px;
  }

  .modal-legal-title {
    font-size: 21px;
  }

  .legal-text-scroll {
    max-height: calc(100dvh - 250px);
    font-size: 14px;
  }

  .btn-legal-close {
    width: 100%;
    padding: 12px;
  }
}

