/* ==========================================================================
   Popup de cadastro de afiliado (BuyGoods / PagAmerican)
   Fluxo em 3 etapas sobre a página borrada.
   ========================================================================== */

.pq-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.pq-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pq-modal[hidden] {
  display: none;
}

body.pq-lock {
  overflow: hidden;
}

/* --- Diálogo -------------------------------------------------------------- */
.pq-dialog {
  position: relative;
  margin: auto;
  display: flex;
  align-items: stretch;
  gap: 44px;
  width: 100%;
  min-width: 0;
  max-width: 1000px;
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  padding: 72px 72px 64px;
  border-radius: 40px;
  background: #0a0400;
  color: #fff;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  animation: pq-pop 0.28s ease;
  overflow: hidden;
}

@keyframes pq-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

.pq-dialog * {
  color: inherit;
}

.pq-dialog__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fcd099;
  transition: background 0.2s ease, color 0.2s ease;
}

.pq-dialog__close:hover {
  background: rgba(231, 89, 4, 0.25);
  color: #fff;
}

.pq-dialog__close svg {
  width: 16px;
  height: 16px;
}

/* --- Coluna de apresentação ------------------------------------------------ */
.pq-intro {
  flex: 0 0 340px;
  width: 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pq-eyebrow {
  color: #fcd099;
  font-size: 18px;
  letter-spacing: 2.52px;
  line-height: 1.3;
}

.pq-intro h2 {
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
}

.pq-intro h2 em {
  font-family: "Space Grotesk", sans-serif;
  font-style: italic;
  font-weight: 600;
  color: #e75904;
}

.pq-intro__lead {
  color: #f6f4f3;
  font-size: 16px;
  line-height: 1.3;
}

.pq-commission {
  margin-top: 8px;
  padding: 16px;
  border: 1px solid rgba(231, 89, 4, 0.2);
  border-radius: 20px;
  background: rgba(166, 43, 2, 0.25);
}

.pq-commission__label {
  color: #fcd099;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pq-commission__value {
  margin-top: 8px;
  color: #fff;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
}

.pq-commission__value.is-range {
  font-size: 26px;
  line-height: 1.2;
}

.pq-commission__value span {
  margin-left: 6px;
  color: #fcd099;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pq-commission__note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.4;
}

.pq-privacy {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #f6f4f3;
  font-size: 14px;
  line-height: 1.3;
}

.pq-privacy svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #e75904;
}

/* --- Card do formulário -------------------------------------------------- */
.pq-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.pq-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pq-card {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 36px 28px 32px;
  border: 1px solid rgba(231, 89, 4, 0.6);
  border-radius: 20px;
  background: rgba(48, 46, 53, 0.15);
  overflow: hidden;
}

/* --- Barra de progresso ------------------------------------------------- */
.pq-progress {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pq-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pq-progress__head > span:first-child {
  color: #fcd099;
  font-weight: 600;
}

.pq-progress__pct {
  color: #7b7572;
}

.pq-progress__track {
  position: relative;
  height: 20px;
}

.pq-progress__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 9px;
  height: 3px;
  background: #3d3d3d;
  border-radius: 3px;
}

.pq-progress__fill {
  position: absolute;
  left: 0;
  top: 9px;
  height: 3px;
  width: 25.5%;
  background: #e75904;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.pq-progress__steps {
  position: absolute;
  inset: 0;
}

.pq-progress__steps li {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #3d3d3d;
  font-size: 11px;
  font-weight: 600;
  color: #7b7572;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.pq-progress__steps li:nth-child(1) {
  left: 0;
}

.pq-progress__steps li:nth-child(2) {
  left: 39.8%;
}

.pq-progress__steps li:nth-child(3) {
  left: 82.55%;
}

.pq-progress__steps li.is-active {
  background: #e75904;
  border-color: #fff;
  color: #fff;
}

.pq-progress__labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.pq-progress__labels > span {
  color: #7b7572;
  transition: color 0.25s ease;
}

.pq-progress__labels > span:nth-child(2) {
  text-align: center;
}

.pq-progress__labels > span:last-child {
  text-align: right;
}

.pq-progress__labels > span.is-active {
  color: #fff;
}

/* --- Etapas ------------------------------------------------------------- */
.pq-step {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid rgba(231, 89, 4, 0.2);
  padding-top: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 89, 4, 0.5) transparent;
}

.pq-step::-webkit-scrollbar {
  width: 6px;
}

.pq-step::-webkit-scrollbar-thumb {
  background: rgba(231, 89, 4, 0.5);
  border-radius: 6px;
}

.pq-step[hidden] {
  display: none;
}

/* Etapa única (PagAmerican) — sem barra de progresso acima */
.pq-step--single {
  border-top: 0;
  padding-top: 2px;
}

.pq-rule {
  width: 100%;
  height: 1px;
  border: 0;
  background: rgba(231, 89, 4, 0.2);
  margin: 4px 0;
}

.pq-step__intro h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.pq-step__intro p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.4;
}

.pq-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Campos ----------------------------------------------------------- */
.pq-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pq-field__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.pq-field__label i {
  color: #e75904;
  font-style: normal;
}

.pq-badge {
  padding: 3px 8px;
  border: 1px solid #7b7572;
  border-radius: 50px;
  color: #7b7572;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pq-field input {
  width: 100%;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pq-field input::placeholder {
  color: #5f6374;
}

.pq-field input:focus {
  outline: none;
  border-color: rgba(231, 89, 4, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.pq-field__help {
  padding: 0 8px;
  color: #7b7572;
  font-size: 12px;
  line-height: 1.4;
}

.pq-field__error {
  padding: 0 8px;
  color: #ff8a8a;
  font-size: 12px;
}

.pq-field__error:empty {
  display: none;
}

.pq-field.is-invalid input {
  border-color: #ff8a8a;
}

/* --- Ofertas (etapa 3) --------------------------------------------------- */
.pq-offers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pq-offers__label {
  color: #fcd099;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.pq-offers__count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7b7572;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pq-offers__count b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
}

.pq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pq-acc {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.pq-acc.is-open {
  border-color: rgba(231, 89, 4, 0.6);
}

.pq-acc__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.pq-acc__toggle small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 400;
}

.pq-acc__toggle svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  color: #fcd099;
  transition: transform 0.25s ease;
}

.pq-acc.is-open .pq-acc__toggle svg {
  transform: rotate(180deg);
}

.pq-acc__body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 16px 16px;
}

.pq-acc:not(.is-open) .pq-acc__body {
  display: none;
}

.pq-offer {
  flex: 1 1 calc(50% - 6px);
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pq-offer:hover {
  border-color: rgba(231, 89, 4, 0.5);
}

.pq-offer:has(input:checked) {
  border-color: #e75904;
  background: rgba(231, 89, 4, 0.12);
}

.pq-offer input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  accent-color: #e75904;
}

.pq-offer__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: #fff;
}

.pq-offer__cpa {
  padding: 4px 8px;
  border-radius: 50px;
  background: #e75904;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Aviso ----------------------------------------------------------- */
.pq-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(245, 181, 68, 0.4);
  border-radius: 12px;
  background: rgba(245, 181, 68, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  line-height: 1.5;
}

.pq-warning strong {
  color: #f5b544;
}

.pq-warning svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #f5b544;
}

/* --- Confirmações ---------------------------------------------------- */
.pq-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pq-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #f6f4f3;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.pq-check:has(input:checked) {
  border-color: rgba(231, 89, 4, 0.6);
  background: rgba(231, 89, 4, 0.1);
}

.pq-check input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: #e75904;
}

.pq-step__error {
  color: #ff8a8a;
  font-size: 12px;
}

/* --- Sucesso ------------------------------------------------------- */
.pq-success {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding-top: 28px;
}

.pq-success__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(231, 89, 4, 0.2);
  color: #e75904;
}

.pq-success__icon svg {
  width: 28px;
  height: 28px;
}

.pq-success h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.pq-success p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.4;
}

/* --- Ações ------------------------------------------------------------- */
.pq-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid rgba(231, 89, 4, 0.2);
  padding-top: 28px;
}

.pq-actions [data-prev] {
  margin-right: auto;
}

.pq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pq-btn[hidden] {
  display: none;
}

.pq-btn svg {
  width: 12px;
  height: 12px;
}

.pq-btn--ghost {
  background: #3d3d3d;
  border: 1px solid #7b7572;
  color: #fff;
}

.pq-btn--ghost:hover {
  background: #33383f;
}

.pq-btn--primary {
  background: #e75904;
  color: #fff;
  font-weight: 600;
}

.pq-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(231, 89, 4, 0.3);
}

.pq-btn:focus-visible {
  outline: 3px solid rgba(254, 211, 113, 0.7);
  outline-offset: 3px;
}

/* --- MTW brand ---------------------------------------------------------- */
.pq-modal__overlay {
  background: rgba(10, 4, 0, 0.48);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.pq-dialog {
  isolation: isolate;
  border-top: 5px solid #e75904;
  border-radius: 24px;
  background:
    radial-gradient(circle at 13% 8%, rgba(231, 89, 4, 0.24), transparent 34%),
    linear-gradient(125deg, #0a0400, #21100a);
  box-shadow: 0 40px 120px rgba(10, 4, 0, 0.62);
}

.pq-dialog::before {
  width: 520px;
  aspect-ratio: 1.26;
  content: "";
  position: absolute;
  left: -220px;
  bottom: -220px;
  z-index: -1;
  background: url("../img/mtw-bear-outline.svg") center/contain no-repeat;
  filter: invert(1);
  opacity: 0.42;
  pointer-events: none;
}

.pq-dialog__close {
  background: rgba(255, 255, 255, 0.08);
  color: #fea413;
}

.pq-dialog__close:hover {
  background: rgba(231, 89, 4, 0.28);
}

.pq-dialog__close:focus-visible {
  outline: 3px solid rgba(254, 211, 113, 0.75);
  outline-offset: 3px;
}

.pq-eyebrow,
.pq-commission__label,
.pq-progress__head > span:first-child,
.pq-offers__label {
  color: #fea413;
}

.pq-intro h2,
.pq-step__intro h3,
.pq-success h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.025em;
}

.pq-intro h2 em {
  font-family: "Space Grotesk", sans-serif;
  font-style: normal;
  font-weight: 700;
  color: #fcd099;
}

.pq-intro__lead,
.pq-privacy,
.pq-check {
  color: #f6f4f3;
}

.pq-commission {
  border-color: rgba(231, 89, 4, 0.34);
  border-radius: 12px;
  background: rgba(61, 61, 61, 0.42);
}

.pq-commission__value span,
.pq-acc__toggle svg {
  color: #fcd099;
}

.pq-privacy svg {
  color: #e75904;
}

.pq-card {
  border-color: rgba(231, 89, 4, 0.46);
  border-radius: 12px;
  background: rgba(61, 61, 61, 0.24);
}

.pq-progress__pct,
.pq-progress__labels > span,
.pq-field__help,
.pq-offers__count,
.pq-badge {
  color: #a9a3a0;
}

.pq-progress__track::before,
.pq-progress__steps li,
.pq-btn--ghost {
  background: #3d3d3d;
}

.pq-progress__fill,
.pq-progress__steps li.is-active,
.pq-btn--primary,
.pq-offer__cpa {
  background: #e75904;
}

.pq-progress__steps li.is-active,
.pq-btn--primary,
.pq-offer__cpa {
  color: #0a0400;
}

.pq-progress__steps li.is-active {
  border-color: #fea413;
}

.pq-progress__labels > span.is-active {
  color: #fff;
}

.pq-step,
.pq-actions,
.pq-rule {
  border-color: rgba(231, 89, 4, 0.24);
}

.pq-rule {
  background: rgba(231, 89, 4, 0.24);
}

.pq-step {
  scrollbar-color: rgba(231, 89, 4, 0.55) transparent;
}

.pq-step::-webkit-scrollbar-thumb {
  background: rgba(231, 89, 4, 0.55);
}

.pq-field input {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.pq-field input:focus {
  border-color: rgba(231, 89, 4, 0.86);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(231, 89, 4, 0.12);
}

.pq-field__label i,
.pq-success__icon {
  color: #e75904;
}

.pq-acc.is-open,
.pq-offer:has(input:checked),
.pq-check:has(input:checked) {
  border-color: rgba(231, 89, 4, 0.72);
  background: rgba(231, 89, 4, 0.12);
}

.pq-offer:hover {
  border-color: rgba(254, 164, 19, 0.64);
}

.pq-offer input,
.pq-check input {
  accent-color: #e75904;
}

.pq-warning {
  border-color: rgba(254, 164, 19, 0.46);
  background: rgba(254, 164, 19, 0.1);
}

.pq-warning strong,
.pq-warning svg {
  color: #fed371;
}

.pq-success__icon {
  background: rgba(231, 89, 4, 0.18);
}

.pq-btn {
  min-height: 48px;
  border-radius: 8px;
}

.pq-btn--ghost {
  border-color: #7b7572;
}

.pq-btn--primary:hover {
  box-shadow: 0 10px 28px rgba(231, 89, 4, 0.34);
}

.pq-btn:focus-visible {
  outline-color: rgba(254, 211, 113, 0.78);
}

/* --- CartPanda -------------------------------------------------------- */
.pq-choice-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
}

.pq-choice-group legend {
  padding: 0 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.pq-choice-group legend i,
.pq-step--cartpanda .pq-offers__label i {
  color: #e75904;
  font-style: normal;
}

.pq-choice-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #f6f4f3;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.pq-choice-group input {
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: #e75904;
}

.pq-choice-group.is-invalid {
  border-color: #ff8a8a;
}

.pq-confirm--cartpanda {
  gap: 10px;
}

.pq-confirm__text {
  color: #f6f4f3;
  font-size: 13px;
  line-height: 1.5;
}

/* --- Responsivo ------------------------------------------------------- */
@media (max-width: 940px) {
  .pq-dialog {
    flex-direction: column;
    gap: 28px;
    max-width: 560px;
    padding: 56px 28px 32px;
    border-radius: 28px;
  }

  .pq-intro {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .pq-card {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .pq-modal {
    padding: 0;
  }

  .pq-dialog {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    border-radius: 0;
    padding: 56px 16px 24px;
  }

  .pq-intro {
    gap: 8px;
  }

  .pq-intro__lead,
  .pq-commission,
  .pq-privacy {
    display: none;
  }

  .pq-intro h2 {
    font-size: 28px;
  }

  .pq-card {
    padding: 24px 16px;
    gap: 20px;
  }

  .pq-offer {
    flex-basis: 100%;
  }

  .pq-btn {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pq-dialog {
    animation: none;
  }

  .pq-progress__fill,
  .pq-acc__toggle svg,
  .pq-btn {
    transition: none;
  }
}
