/* Container Principal */
.domain-checkout-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  color: #333;
}

/* Grid Layout (Esquerda Form, Direita Resumo) */
.domain-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}

@media (max-width: 900px) {
  .domain-checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* SeÃ§Ãµes (Caixas Brancas) */
.domain-box-section {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

/* Headers das SeÃ§Ãµes */
.domain-section-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.domain-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d8ede9;
  /* Rosa claro estilo Engajae */
  color: #1b8772;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.domain-header-text h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.domain-header-text p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* FormulÃ¡rio (Inputs) */
.domain-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}



.form-group {
  margin-bottom: 5px;
}

.half-width {
  width: calc(50% - 8px);
}

.full-width {
  width: 100%;
}

@media (max-width: 600px) {
  .half-width {
    width: 100%;
  }
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

.domain-input {
  width: 100%;
  padding: 3px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  font-size: 14px;
  transition: all 0.2s;
  background: #f9f9f9;
}

.domain-input:focus {
  background: #fff;
  border-color: #1b8772 !important;
  outline: none;
  box-shadow: 0 0 8px 0 #1b87724d;
}

/* ------------------------------------------------------------- */
/* PAYMENT METHODS - MODERN GRID LAYOUT (The Magic Part) */
/* ------------------------------------------------------------- */
.domain_payment_methods,
.wc_payment_methods {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  /* Force 2 columns as requested */
  gap: 15px;
  padding: 0;
  margin: 0;
  width: 100%;
  list-style: none !important;
}

.wc_payment_method {
  display: contents !important;
  /* Flatten structure for Grid */
}

/* The Label is the Card */
.wc_payment_method label {
  order: 1 !important;
  /* Force all cards to appear first in the grid flow */
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  border: 2px solid #eef2f7;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 110px;
  width: 100%;
  margin: 0 !important;
  position: relative;
  outline: none !important;
  /* Remove default browser focus outline */
}

/* Hover State - Clean Gray instead of Yellow */
.wc_payment_method label:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 3. Selected State (Input Checked -> Label Style) */
.wc_payment_method input[type="radio"]:checked+label {
  border-color: #1b8772;
  /* Brand Pink for selection border */
  background: #fff;
  box-shadow: 0 0 0 1px #1b8772 inset;
  color: #000;
}

/* Remove checkmark icon */
.wc_payment_method input[type="radio"]:checked+label::after {
  display: none;
}

/* Hide Radio Input */
.wc_payment_method input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Payment Icons & Text */
.gw-text-wrapper {
  display: flex;
  flex-direction: column-reverse;
  /* Icon on Top */
  align-items: center;
  gap: 10px;
  width: 100%;
}

.gw-icon-wrapper img,
.gw-icon-wrapper svg {
  max-height: 30px;
  max-width: 50px;
  width: auto;
}

/* Payment Content Box - Appears Below All Cards */
.payment_box {
  grid-column: 1 / -1 !important;
  order: 999 !important;
  width: 100%;
  margin-top: 15px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.3s ease;
}

/* Hide extra stuff inside box */
.payment_box h3,
.payment_box h4,
.payment_box legend,
.payment_box>label:first-child {
  display: none !important;
}

.payment_box .form-row {
  margin-bottom: 15px;
}

.payment_box label {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
  font-weight: 600;
}

.payment_box input[type="text"],
.payment_box input[type="tel"],
.payment_box input[type="email"],
.payment_box input[type="password"] {
  background: #f7f7f7 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 12px !important;
  width: 100%;
}


/* Duplicate Button Removal */
.woocommerce-checkout-payment .place-order {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------------------------------------- */
/* SIDEBAR & TOTALS */
/* ------------------------------------------------------------- */
.domain-checkout-sidebar {
  position: sticky;
  top: 60px;
}

.domain-sidebar-inner {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #f5f5f5;
  padding-bottom: 15px;
}

.summary-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.item-count-badge {
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
}

.domain-cart-items-list {
  margin-bottom: 25px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
}

.item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.item-name {
  font-weight: 600;
  color: #333;
}

.item-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.item-renewal {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.item-price {
  font-weight: 600;
  color: #333;
}

.domain-summary-remove-item {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #ececec;
  background: #fff;
  color: #a7a7a7;
  text-decoration: none;
  transition: all 0.2s ease;
}

.domain-summary-remove-item svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.domain-summary-remove-item:hover,
.domain-summary-remove-item:focus {
  color: #e74c3c;
  border-color: #f2c7c3;
  background: #fff4f3;
  outline: none;
}

.summary-totals {
  border-top: 2px dotted #f0f0f0;
  padding-top: 15px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
}

.summary-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #111;
  margin-top: 20px;
  margin-bottom: 25px;
}

.wcds-zero-total-payment-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #1b8772;
  font-weight: 500;
}

.domain-checkout-terms {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e7ecef;
  border-radius: 12px;
  background: #f8fbfa;
}

.domain-checkout-terms .woocommerce-terms-and-conditions-wrapper {
  margin: 0;
}

.domain-checkout-terms .woocommerce-privacy-policy-text,
.domain-checkout-terms .woocommerce-terms-and-conditions {
  font-size: 12px;
  line-height: 1.55;
  color: #5f6b76;
  margin-bottom: 10px;
}

.domain-checkout-terms .woocommerce-terms-and-conditions p,
.domain-checkout-terms .woocommerce-privacy-policy-text p {
  margin: 0 0 10px;
}

.domain-checkout-terms .woocommerce-form__label-for-checkbox,
.domain-checkout-terms .form-row.validate-required {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #24323d;
}

.domain-checkout-terms input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #1b8772;
  flex: 0 0 auto;
}

.domain-checkout-terms a {
  color: #1b8772;
  text-decoration: none;
}

.domain-checkout-terms a:hover {
  text-decoration: underline;
}

/* Main Button */
.domain-checkout-btn {
  width: 100%;
  background: #1b8772 !important;
  color: #fff !important;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.domain-checkout-btn:hover {
  background: #366348 !important;
}

.domain-checkout-btn:disabled {
  background: #ffb3d1 !important;
  cursor: not-allowed !important;
}

.domain-checkout-btn svg {
  width: 18px;
  height: 18px;
}

/* Security Badges */
.security-badges {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: #aaa;
}

.security-badges svg {
  margin-bottom: 1px;
}

/* Messages */
.domain-msg-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px;
  border-radius: 6px;
  margin-top: 15px;
  font-size: 13px;
  text-align: center;
}

.domain-msg-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 10px;
  border-radius: 6px;
  margin-top: 15px;
  font-size: 13px;
  text-align: center;
}

/* Ajuste Responsivo do Grid de Pagamento */
@media (max-width: 480px) {

  .domain_payment_methods,
  .wc_payment_methods {
    grid-template-columns: 1fr;
  }

  .domain-checkout-terms {
    padding: 12px 14px;
  }

  .domain-checkout-terms .woocommerce-form__label-for-checkbox,
  .domain-checkout-terms .form-row.validate-required {
    font-size: 12px;
  }
}

.woocommerce-checkout .woocommerce-checkout-review-order-table {
  border: none;
}

.item-price.domain-search-cart-item-price .subscription-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.item-price.domain-search-cart-item-price .subscription-price .subscription-details {
  font-weight: 400;
  font-size: 12px;
  color: #868686;
}

.domain-coupon-section button:hover {
  box-shadow: none;
}

.domain-coupon-form input {
  background: #f9f9f9;
}

.domain-coupon-form input::placeholder {
  font-size: 12px;
}

.domain-coupon-form button {
  font-size: 12px;
  background-color: #1b8772;
  color: #fff;
  border-radius: 15px;
}

.domain-coupon-form input:focus {
  border: solid 1px #1b8772 !important;
  box-shadow: 0 0 8px 0 rgba(249, 34, 123, 0.41) !important;
  background: #fff;
}

/* ------------------------------------------------------------- */
/* CHECKOUT STEPS (Step 1 -> Step 2) */
/* ------------------------------------------------------------- */
.ds-steps-wrapper {
  margin-bottom: 40px;
}

.ds-flow-step {
  width: 100%;
  display: none;
}

.ds-flow-step.is-active {
  display: block !important;
}

.ds-step-actions {
  margin-top: 30px;
  text-align: right;
  justify-content: flex-end;
}

.ds-step-actions.ds-is-visible {
  display: flex !important;
}

.ds-step-actions.ds-is-hidden {
  display: none !important;
}

.ds-steps-wrapper button.ds-step-btn,
.ds-steps-wrapper button#btn-goto-step-2,
.ds-steps-wrapper button#btn-back-step-1 {
  all: unset;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  padding: 12px 32px;
  border-radius: 15px;
  border: none !important;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27, 135, 114, 0.2);
  text-align: center;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  background-clip: padding-box;
}

.ds-steps-wrapper button.ds-step-btn--primary,
.ds-steps-wrapper button.ds-step-btn--secondary,
.ds-steps-wrapper button#btn-goto-step-2,
.ds-steps-wrapper button#btn-back-step-1 {
  background-color: #1b8772;
}

.ds-btn-icon {
  flex: 0 0 auto;
  vertical-align: middle;
}

.ds-btn-icon--right {
  margin-left: 8px;
}

.ds-btn-icon--left {
  margin-right: 6px;
}

.ds-steps-wrapper button.ds-step-btn:hover,
.ds-steps-wrapper button#btn-goto-step-2:hover,
.ds-steps-wrapper button#btn-back-step-1:hover {
  background-color: #366348;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(27, 135, 114, 0.3);
  color: #fff !important;
}

.ds-steps-wrapper button.ds-step-btn:active,
.ds-steps-wrapper button#btn-goto-step-2:active,
.ds-steps-wrapper button#btn-back-step-1:active {
  transform: translateY(0);
}

.ds-steps-wrapper button.ds-step-btn:disabled,
.ds-steps-wrapper button#btn-goto-step-2:disabled,
.ds-steps-wrapper button#btn-back-step-1:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ds-step-actions-top {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

@media (max-width: 767px) {
  .ds-step-actions-top {
    text-align: center;
    margin-bottom: 20px;
  }

  .ds-steps-wrapper button#btn-back-step-1,
  .ds-steps-wrapper button.ds-step-btn--secondary {
    margin: 0 auto 20px;
  }
}

/* Button Spinner */
.ds-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: ds-spin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes ds-spin {
  to { transform: rotate(360deg); }
}

.ds-btn--loading {
  pointer-events: none;
  opacity: 0.8 !important;
}
