.vsp-apoio-modal[hidden] {
  display: none !important;
}

body.vsp-apoio-modal-open {
  overflow: hidden;
}

.vsp-apoio-modal,
.vsp-apoio-modal * {
  box-sizing: border-box;
}

.vsp-apoio-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  color: #0d2e46;
  font-family: inherit;
}

.vsp-apoio-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 25, 40, 0.76);
  backdrop-filter: blur(4px);
}

.vsp-apoio-dialog {
  position: relative;
  width: min(600px, 100%);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 31px 34px 28px;
  border: 1px solid rgba(202, 138, 4, 0.45);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 25px 75px rgba(3, 23, 38, 0.3);
}

.vsp-apoio-close {
  position: absolute;
  top: 14px;
  right: 17px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #173b5e;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.vsp-apoio-kicker {
  margin: 0 80px 6px 0;
  color: #b77700;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vsp-apoio-dialog h2 {
  margin: 0 70px 9px 0;
  color: #082d49;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.08;
}

.vsp-apoio-dialog > p:not(.vsp-apoio-kicker):not(.vsp-apoio-privacy) {
  margin: 0;
  color: #38556d;
  font-size: 15px;
  line-height: 1.55;
}

.vsp-apoio-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 19px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7efe1;
  color: #173b5e;
}

.vsp-apoio-selected span {
  font-size: 13px;
  font-weight: 700;
}

.vsp-apoio-selected strong {
  color: #b77700;
  font-size: 20px;
  white-space: nowrap;
}

#vsp-apoio-form > label:not(.vsp-apoio-consent) {
  display: block;
  margin: 12px 0 5px;
  color: #082d49;
  font-size: 13px;
  font-weight: 800;
}

#vsp-apoio-form > label span {
  color: #60758a;
  font-weight: 500;
}

#vsp-apoio-form > input:not([type="hidden"]):not([type="checkbox"]) {
  display: block;
  width: 100%;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 59, 94, 0.25);
  border-radius: 8px;
  background: #fff;
  color: #082d49;
  font: inherit;
  font-size: 15px;
}

#vsp-apoio-form > input:focus {
  outline: 3px solid rgba(202, 138, 4, 0.2);
  border-color: #ca8a04;
}

.vsp-apoio-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 17px 0 0;
  color: #38556d;
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
}

.vsp-apoio-consent input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #173b5e;
}

.vsp-apoio-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.vsp-apoio-actions button {
  min-height: 47px;
  padding: 10px 14px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.vsp-apoio-submit {
  border: 1px solid #082d49;
  background: #082d49;
  color: #fff;
}

.vsp-apoio-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.vsp-apoio-skip {
  border: 1px solid rgba(23, 59, 94, 0.36);
  background: #fff;
  color: #173b5e;
}

.vsp-apoio-actions button:hover,
.vsp-apoio-actions button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 45, 73, 0.12);
}

.vsp-apoio-error {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #b42318;
  background: #fff0ee;
  color: #8f1d14;
  font-size: 13px;
  line-height: 1.4;
}

.vsp-apoio-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 600px) {
  .vsp-apoio-modal {
    align-items: center;
    padding: max(10px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .vsp-apoio-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 18px 16px 17px;
    border-radius: 15px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .vsp-apoio-close {
    position: sticky;
    z-index: 5;
    top: -8px;
    float: none;
    display: block;
    width: max-content;
    margin: -8px -5px 5px auto;
    padding: 8px 10px;
    border: 1px solid rgba(23, 59, 94, 0.18);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 4px 12px rgba(8, 45, 73, 0.08);
  }

  .vsp-apoio-kicker {
    margin: 0 0 4px;
    font-size: 10px;
  }

  .vsp-apoio-dialog h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.1;
  }

  .vsp-apoio-dialog > p:not(.vsp-apoio-kicker) {
    font-size: 13px;
    line-height: 1.4;
  }

  .vsp-apoio-selected {
    align-items: center;
    margin: 12px 0 9px;
    padding: 9px 11px;
  }

  .vsp-apoio-selected span {
    font-size: 11px;
  }

  .vsp-apoio-selected strong {
    font-size: 17px;
  }

  #vsp-apoio-form > label:not(.vsp-apoio-consent) {
    margin: 8px 0 3px;
    font-size: 12px;
  }

  #vsp-apoio-form > input:not([type="hidden"]):not([type="checkbox"]) {
    min-height: 41px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .vsp-apoio-consent {
    margin-top: 12px;
    font-size: 11.5px;
    line-height: 1.36;
  }

  .vsp-apoio-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .vsp-apoio-actions button {
    min-height: 43px;
    padding: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vsp-apoio-actions button {
    transition: none;
  }
}
