/* =============================================
   POP-UPS / MODALS
   ============================================= */

/* ---------- Overlay ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-overlay::-webkit-scrollbar {
  display: none;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Modal Content Animation ---------- */
.popup-overlay > *:first-child {
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  opacity: 0;
}

.popup-overlay.active > *:first-child {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ---------- Close Button ---------- */
.popup__close {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  color: var(--tertiary-normal);
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.popup__close:hover {
  opacity: 1;
}

.popup__close--dark {
  color: var(--tertiary-dark);
}

/* =============================================
   FORM POPUP — alinhado Figma node 153:1135
   ============================================= */

.popup-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 32px;
  max-width: 720px;
  width: 100%;
  margin: auto;
  background: var(--primary-dark);
  border-radius: 40px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  position: relative;
}

.popup-form .popup__close {
  color: var(--tertiary-normal);
}

.popup-form__title {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.2em;
  letter-spacing: 0.05em;
  color: var(--base-white);
  text-align: center;
}

.popup-form__input {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--base-white);
  border: 1px solid var(--surface-normal);
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.popup-form__input i,
.popup-form__input-icon {
  width: 34px;
  text-align: center;
  font-size: 24px;
  line-height: 1.4em;
  color: var(--surface-normal);
  flex-shrink: 0;
}

.popup-form__input input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-family);
  font-size: 24px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--primary-darker);
  background: transparent;
}

.popup-form__input input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* ---------- Custom Dropdown ---------- */
.popup-form__dropdown {
  position: relative;
}

.popup-form__dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--base-white);
  border: 1px solid var(--surface-normal);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  letter-spacing: 0.05em;
}

.popup-form__dropdown-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.popup-form__dropdown-lead-icon {
  width: 34px;
  flex-shrink: 0;
  text-align: center;
  font-size: 24px;
  line-height: 1.4;
  color: var(--surface-normal);
}

.popup-form__dropdown.open .popup-form__dropdown-trigger {
  border-radius: 8px 8px 0 0;
  border-color: var(--surface-darker);
}

.popup-form__dropdown-label {
  font-family: var(--font-family);
  font-size: 24px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--surface-darker);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-form__dropdown-label.has-value,
.popup-form__dropdown-label.selected {
  color: var(--primary-darker);
}

.popup-form__dropdown-label.harmonizacao-placeholder {
  color: #9ca3af;
}

.popup-form__dropdown-arrow {
  font-size: 24px;
  color: var(--surface-normal);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.popup-form__dropdown.open .popup-form__dropdown-arrow {
  transform: rotate(180deg);
}

.popup-form__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--base-white);
  border: 1px solid var(--surface-darker);
  border-top: none;
  border-radius: 0 0 8px 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 10;
  max-height: 240px;
  overflow-y: auto;
}

.popup-form__dropdown.open .popup-form__dropdown-menu {
  display: block;
}

.popup-form__dropdown-menu li {
  font-family: var(--font-family);
  font-size: 20px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--primary-darker);
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.popup-form__dropdown-menu li:hover {
  background: var(--surface-light-hover);
}

.popup-form__dropdown-menu li:last-child {
  border-radius: 0 0 8px 8px;
}

/* Harmonização — lista custom (form.js) */
.harmonizacao-dropdown {
  position: relative;
}

.harmonizacao-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--base-white);
  border: 1px solid var(--surface-darker);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 20;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.form-option-button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  font-size: 20px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--primary-darker);
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}

.form-option-button:hover,
.form-option-button.selected {
  background: var(--surface-light-hover);
}

#harmonizacao-select.focused {
  border-color: #d3111a;
  box-shadow: 0 0 0 3px rgba(211, 17, 26, 0.1);
  border-radius: 8px 8px 0 0;
}

#harmonizacao-select.focused .popup-form__dropdown-lead-icon {
  color: var(--secondary-normal);
}

#harmonizacao-group.dropdown-open #harmonizacao-select {
  border-radius: 8px 8px 0 0;
}

#harmonizacao-arrow.rotated {
  transform: rotate(180deg);
}

.form-error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(211, 17, 26, 0.12);
  border: 1px solid rgba(211, 17, 26, 0.35);
  border-radius: 8px;
  color: var(--base-white);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.4;
}

.form-error-box i {
  margin-top: 2px;
  flex-shrink: 0;
  color: #ffb4b8;
}

.popup-form__input--error {
  border-color: var(--secondary-normal) !important;
}

.popup-form__dropdown--error .popup-form__dropdown-trigger {
  border-color: var(--secondary-normal) !important;
}

.popup-form .btn-primary {
  width: 100%;
}

.popup-form__disclaimer {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--base-white);
  text-align: center;
}

.popup-form__disclaimer a {
  color: var(--secondary-normal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.popup-form__disclaimer a:hover {
  opacity: 0.9;
}

/* =============================================
   VIDEO POPUP
   ============================================= */

.popup-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  position: relative;
  max-width: 1100px;
  width: 100%;
  margin: auto;
}

.popup-video .popup__close {
  position: relative;
  top: 0;
  right: 0;
  align-self: flex-end;
}

.popup-video__frame {
  position: relative;
  width: 100%;
  max-height: 75vh;
  aspect-ratio: 16/9;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.popup-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}

.popup-video__icon {
  font-size: 184px;
  color: var(--primary-light-active);
}

.popup-video .btn-primary {
  max-width: 646px;
  width: 100%;
}

/* =============================================
   DEPOIMENTOS POPUP
   ============================================= */

.popup-depoimentos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 32px 0;
  max-width: 1100px;
  width: 100%;
  margin: auto;
  background: var(--base-white);
  border-radius: 40px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  position: relative;
}

.popup-depoimentos__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  width: 100%;
}

.popup-depoimentos__title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--primary-darker);
  text-align: center;
}

.popup-depoimentos__title span {
  color: var(--secondary-normal);
}

.popup-depoimentos__subtitle {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4em;
  letter-spacing: 0.05em;
  color: var(--surface-darker);
  text-align: center;
}

.popup-depoimentos__carousel {
  width: 100%;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

.popup-depoimentos__track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s ease;
}

.popup-depoimentos__slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  max-height: calc(100vh - 380px);
  background: #1a1a1a;
  border-radius: 26px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
}

.popup-depoimentos__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.popup-depoimentos__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  transition: background 0.3s ease;
}

.popup-depoimentos__slide:hover .popup-depoimentos__overlay {
  background: rgba(0, 0, 0, 0.15);
}

.popup-depoimentos__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 111px;
  color: var(--primary-light-active);
  z-index: 2;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.85;
}

.popup-depoimentos__slide:hover .popup-depoimentos__play {
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 1;
}

.popup-depoimentos__slide.is-playing .popup-depoimentos__thumb,
.popup-depoimentos__slide.is-playing .popup-depoimentos__overlay,
.popup-depoimentos__slide.is-playing .popup-depoimentos__play {
  display: none;
}

.popup-depoimentos__slide iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 26px;
}

.popup-depoimentos__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-depoimentos__arrow {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--surface-darker);
  cursor: pointer;
  width: 32px;
  text-align: center;
}

.popup-depoimentos__dots {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-light-active);
  border-radius: 100px;
}

.popup-depoimentos__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-normal);
  cursor: pointer;
  transition: background 0.3s ease;
}

.popup-depoimentos__dot.active {
  background: var(--secondary-normal-active);
}

.popup-depoimentos .btn-primary {
  max-width: 646px;
  width: 90%;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 834px) {
  .popup-overlay {
    padding: 16px;
  }

  /* -- Form -- */
  .popup-form {
    gap: 20px;
    border-radius: 24px;
  }

  .popup-form__title {
    font-size: 36px;
  }

  .popup-form__input {
    padding: 14px;
    gap: 12px;
  }

  .popup-form__input i,
  .popup-form__input-icon {
    font-size: 20px;
    width: 28px;
  }

  .popup-form__input input {
    font-size: 18px;
  }

  .popup-form__dropdown-label {
    font-size: 18px;
  }

  .popup-form__dropdown-lead-icon {
    font-size: 20px;
    width: 28px;
  }

  .popup-form__dropdown-menu li {
    font-size: 16px;
  }

  .form-option-button {
    font-size: 16px;
  }

  /* -- Video -- */
  .popup-video {
    gap: 24px;
  }

  .popup-video__frame {
    border-radius: 16px;
  }

  .popup-video__icon {
    font-size: 100px;
  }

  /* -- Depoimentos -- */
  .popup-depoimentos {
    border-radius: 24px;
    gap: 24px;
    padding: 24px 0;
  }

  .popup-depoimentos__title {
    font-size: 24px;
  }

  .popup-depoimentos__subtitle {
    font-size: 18px;
  }

  .popup-depoimentos__play {
    font-size: 80px;
  }

  .popup-depoimentos__track {
    padding: 0 24px;
    gap: 16px;
  }

  .popup__close {
    top: 20px;
    right: 20px;
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .popup-overlay {
    padding: 12px;
  }

  /* -- Form -- */
  .popup-form {
    padding: 20px;
    gap: 16px;
    border-radius: 16px;
  }

  .popup-form__title {
    font-size: 24px;
  }

  .popup-form__input {
    padding: 12px;
    gap: 10px;
  }

  .popup-form__input i,
  .popup-form__input-icon {
    font-size: 18px;
    width: 24px;
  }

  .popup-form__input input {
    font-size: 16px;
  }

  .popup-form__dropdown-label {
    font-size: 14px;
  }

  .popup-form__dropdown-lead-icon {
    font-size: 18px;
    width: 24px;
  }

  .form-option-button {
    font-size: 14px;
    padding: 12px;
  }

  .form-error-box {
    font-size: 14px;
  }

  .popup-form__dropdown-trigger {
    padding: 12px;
  }

  .popup-form__dropdown-menu li {
    font-size: 14px;
    padding: 12px;
  }

  .popup-form__dropdown-arrow {
    font-size: 18px;
  }

  .popup-form__disclaimer {
    font-size: 11px;
  }

  .popup-form__dropdown-label.harmonizacao-placeholder {
    white-space: normal;
    line-height: 1.35;
  }

  /* -- Video -- */
  .popup-video {
    gap: 16px;
  }

  .popup-video__frame {
    border-radius: 12px;
  }

  .popup-video__icon {
    font-size: 60px;
  }

  .popup-video .btn-primary {
    max-width: 100%;
  }

  /* -- Depoimentos -- */
  .popup-depoimentos {
    border-radius: 16px;
    gap: 16px;
    padding: 16px 0;
  }

  .popup-depoimentos__header {
    padding: 0 16px;
    gap: 8px;
  }

  .popup-depoimentos__title {
    font-size: 20px;
  }

  .popup-depoimentos__subtitle {
    font-size: 14px;
  }

  .popup-depoimentos__play {
    font-size: 56px;
  }

  .popup-depoimentos__track {
    padding: 0 16px;
    gap: 12px;
  }

  .popup-depoimentos .btn-primary {
    max-width: 90%;
  }

  .popup__close {
    top: 12px;
    right: 12px;
    font-size: 18px;
  }
}
