/* ========================================
   CHECKOUT MODAL - Compacto padrão dourado
   ======================================== */

.checkout-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkout-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.checkout-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 54, 93, 0.95);
  backdrop-filter: blur(8px);
}

.checkout-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 400px;
  width: 92%;
  max-height: 94vh;
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid #d4af37;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.4s ease;
}

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

.checkout-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.checkout-modal-close:hover {
  color: #d4af37;
  transform: rotate(90deg);
}

.checkout-modal-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.checkout-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1b365d;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.checkout-modal-header p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.35;
}

/* ========================================
   FORM STYLING - compacto sem labels
   ======================================== */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-form .form-group {
  margin-bottom: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.checkout-form input[type="text"]:focus,
.checkout-form input[type="email"]:focus,
.checkout-form input[type="tel"]:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.checkout-form input.error {
  border-color: #e74c3c;
  background-color: #fef5f5;
}

/* Telefone intl-tel-input compacto */
.checkout-form .form-group .iti {
  width: 100%;
}

.checkout-form .form-group .iti .iti__tel-input {
  padding: 10px 12px 10px 56px !important;
  min-height: unset;
  height: auto;
  font-size: 1rem;
  border: 2px solid #d4af37;
  border-radius: 8px;
}

.checkout-form .form-group .iti .iti__country-container {
  left: 8px;
}

.checkout-form .form-group .iti .iti__selected-country {
  padding: 0 4px;
}

/* ========================================
   CHECKBOX GROUP
   ======================================== */

.checkout-form .checkbox-group {
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  margin-bottom: 0.5rem;
}

.checkout-form .checkbox-group.error {
  border: 2px solid #e74c3c;
  background-color: #fef5f5;
}

.checkout-form .checkboxes {
  display: flex;
  gap: 20px;
  margin-bottom: 4px;
}

/* Texto de consentimento acima dos checkboxes */
.checkout-form .consent-text {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.35;
  margin: 0 0 6px 0;
  text-align: left;
}

.checkout-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1b365d;
  user-select: none;
}

.checkout-form .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #d4af37;
}

.checkout-form .checkbox-hint {
  font-size: 0.7rem;
  color: #999;
  font-style: italic;
  margin-top: 2px;
}

.checkout-form .checkbox-group.error .checkbox-hint {
  color: #e74c3c;
  font-weight: 600;
}

/* ========================================
   TURNSTILE
   ======================================== */

.checkout-turnstile-wrap {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.checkout-form .cf-turnstile {
  display: flex;
  justify-content: center;
  transform-origin: center;
}

/* ========================================
   BUTTON
   ======================================== */

.btn-checkout {
  width: 100%;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
}

.btn-checkout:active {
  transform: translateY(0);
}

.btn-checkout:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-checkout .btn-icon {
  font-size: 18px;
}

/* ========================================
   FORM MESSAGES
   ======================================== */

.checkout-form .form-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  animation: messageSlideIn 0.3s ease;
}

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

.checkout-form .form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.checkout-form .form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ========================================
   DISCLAIMER
   ======================================== */

.checkout-form .form-disclaimer {
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  line-height: 1.35;
  margin-top: 0.5rem;
}

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

@media (max-width: 768px) {
  .checkout-modal-content {
    padding: 1rem;
    max-width: calc(100% - 24px);
  }

  .checkout-modal-header h2 {
    font-size: 1.1rem;
  }

  .checkout-modal-header p {
    font-size: 0.8rem;
  }

  .checkout-form .form-group {
    margin-bottom: 0.5rem;
  }

  .checkout-form input[type="text"],
  .checkout-form input[type="email"],
  .checkout-form input[type="tel"] {
    font-size: 16px;
    padding: 8px 10px;
  }

  .checkout-form .form-group .iti .iti__tel-input {
    padding: 8px 10px 8px 52px !important;
  }

  .checkout-form .checkbox-group {
    padding: 6px 8px;
  }

  .checkout-form .cf-turnstile {
    transform: scale(0.88);
  }

  .btn-checkout {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .checkout-modal-content {
    width: 96%;
    padding: 0.85rem;
  }

  .checkout-modal-header h2 {
    font-size: 1rem;
  }

  .checkout-form .form-group {
    margin-bottom: 0.4rem;
  }

  .checkout-form input[type="text"],
  .checkout-form input[type="email"],
  .checkout-form input[type="tel"] {
    padding: 8px 10px;
  }

  .checkout-form .form-group .iti .iti__tel-input {
    padding: 8px 8px 8px 50px !important;
  }

  .checkout-form .cf-turnstile {
    transform: scale(0.82);
  }
}
