/* =============================================
   RESET BÁSICO
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background: #1a1a1a;
  min-height: 100vh;
}

/* =============================================
   OVERLAY
   ============================================= */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;

  /* Animação de entrada */
  animation: overlayFadeIn 0.25s ease forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =============================================
   CAIXA DO POPUP
   ============================================= */
.popup-box {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 36px 28px 32px;
  border-radius: 20px;
  background: linear-gradient(170deg, #8b4220 0%, #6b2d12 40%, #4e1e09 100%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;

  /* Animação de entrada */
  animation: boxSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes boxSlideIn {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =============================================
   BOTÃO FECHAR
   ============================================= */
.popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.popup-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   TÍTULO E SUBTÍTULO
   ============================================= */
.popup-box h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.popup-box p {
  color: #f0ddd2;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 22px;
  padding: 0 4px;
}

/* =============================================
   GRUPOS DE CAMPOS
   ============================================= */
.field-group {
  margin-bottom: 12px;
}

/* =============================================
   INPUTS
   ============================================= */
.popup-box input[type="text"],
.popup-box input[type="email"] {
  width: 100%;
  padding: 15px 16px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.popup-box input[type="text"]::placeholder,
.popup-box input[type="email"]::placeholder {
  color: #aaa;
}

.popup-box input[type="text"]:focus,
.popup-box input[type="email"]:focus {
  border-color: #FDB423;
  box-shadow: 0 0 0 3px rgba(253, 180, 35, 0.25);
}

/* Estado de erro */
.popup-box input.input-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* =============================================
   MENSAGENS DE ERRO
   ============================================= */
.field-error {
  display: block;
  color: #ffb3a7;
  font-size: 12px;
  text-align: left;
  margin-top: 4px;
  padding-left: 4px;
  min-height: 16px;
  font-weight: 600;
}

/* =============================================
   BOTÃO SUBMIT
   ============================================= */
#btn_checkout {
  width: 100%;
  padding: 17px 16px;
  margin-top: 4px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #fdc733 0%, #FDB423 60%, #e8a010 100%);
  color: #2b1a0f;
  font-weight: 900;
  font-size: 15px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 4px 15px rgba(253, 180, 35, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

#btn_checkout:hover {
  transform: scale(1.025) translateY(-1px);
  box-shadow:
    0 8px 22px rgba(253, 180, 35, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.25);
  filter: brightness(1.04);
}

#btn_checkout:active {
  transform: scale(0.99) translateY(0px);
  box-shadow: 0 2px 8px rgba(253, 180, 35, 0.3);
}

#btn_checkout:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  font-size: 17px;
  line-height: 1;
}

/* Estado de loading no botão */
#btn_checkout.loading {
  pointer-events: none;
  opacity: 0.85;
}

/* =============================================
   RESPONSIVO — MOBILE
   ============================================= */
@media (max-width: 480px) {
  .popup-box {
    padding: 28px 20px 26px;
    border-radius: 16px;
  }

  .popup-box h2 {
    font-size: 20px;
  }

  .popup-box p {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .popup-box input[type="text"],
  .popup-box input[type="email"] {
    padding: 13px 14px;
    font-size: 16px; /* evita zoom no iOS */
  }

  #btn_checkout {
    padding: 15px 14px;
    font-size: 14px;
  }
}
