/* ============================================================================
   PAYMENT / PLANS / CHECKOUT PAGE POLISH (SCOPED)
   ============================================================================
   Safe, layout-only styles for payment-related pages.
   Uses .gp-payment-page body class and SureCart selectors.
   NO global body/html rules - fully scoped.
   ========================================================================= */

/* Basic spacing - layout controlled by page template settings */
.gp-payment-page .sc-product-list {
  padding-left: 16px;
  padding-right: 16px;
}

/* Heading spacing and readability */
.gp-payment-page h1,
.gp-payment-page h2 {
  line-height: 1.2;
  margin: 0.6em 0;
}

.gp-payment-page h3 {
  line-height: 1.3;
  margin: 0.5em 0;
}

/* Button polish */
.gp-payment-page .sc-button,
.gp-payment-page .sc-price-choice .sc-button {
  padding: 12px 16px;
  font-weight: 600;
}

/* Price choice cards spacing */
.gp-payment-page .sc-price-choice {
  margin-bottom: 16px;
}

/* Product list spacing */
.gp-payment-page .sc-product-list .sc-product {
  margin-bottom: 20px;
}

/* Form field spacing */
.gp-payment-page .sc-checkout .sc-form-control {
  margin-bottom: 16px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .gp-payment-page .sc-product-list {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gp-payment-page .sc-price-choice {
    margin-bottom: 12px;
  }

  .gp-payment-page h1 {
    font-size: 1.75rem;
  }

  .gp-payment-page h2 {
    font-size: 1.5rem;
  }
}

/* === GP Payment: Pro layout v1 === */

/* Layout: responsive grid for the product list */
.gp-payment-page .sc-product-list {
  display: grid;
  gap: 24px;
}

/* Mobile: 1 column by default */
@media (min-width: 640px) {
  .gp-payment-page .sc-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gp-payment-page .sc-product-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Position parent for ribbon */
.gp-payment-page sc-price-choice {
  position: relative;
}

/* Card shell */
.gp-payment-page .price-choice {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 18px 20px;
  /* background removed to allow SureCart dark mode to control it */
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden; /* Clip ribbon at rounded corners */
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    border-color 0.16s ease-out;
}

/* Hidden price choices should collapse completely */
.gp-payment-page sc-price-choice[style*="display: none"],
.gp-payment-page sc-price-choice[style*="display:none"],
.gp-payment-page .price-choice[style*="display: none"],
.gp-payment-page .price-choice[style*="display:none"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Hover state */
.gp-payment-page .price-choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.10);
  border-color: rgba(56, 189, 248, 0.5); /* soft accent, tweak later */
}

/* Header area: name + price */
.gp-payment-page .price-choice__title {
  margin-bottom: 6px;
}

.gp-payment-page .price-choice__name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.gp-payment-page .price-choice__details {
  margin-bottom: 10px;
}

.gp-payment-page .price-choice__price {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Small subtitle / description if present */
.gp-payment-page .price-choice__description,
.gp-payment-page .price-choice__meta {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.7);
}

/* Space above button area */
.gp-payment-page .price-choice .sc-button {
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  font-weight: 600;
  border-radius: 999px;
}

/* Optional badge: if SureCart gives you anything like this */
.gp-payment-page .price-choice__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Savings badge - simple corner text */
.gp-payment-page .savings-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 10;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .gp-payment-page .savings-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
  }
}

/* Alternative: Floating badge for subtle approach */
.gp-payment-page .savings-badge-alt {
  position: absolute;
  top: -8px;
  right: 12px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 6px;
  box-shadow:
    0 6px 20px rgba(16, 185, 129, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gp-payment-page .price-choice:hover .savings-badge-alt {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(16, 185, 129, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Featured / recommended plan (if you add this class in the editor) */
.gp-payment-page .price-choice--featured {
  border-width: 2px;
  border-color: #38bdf8;
  box-shadow: 0 22px 50px rgba(56, 189, 248, 0.25);
  position: relative;
}

.gp-payment-page .price-choice--featured::before {
  content: "Most Popular";
  position: absolute;
  top: 14px;
  right: 18px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === GP Checkout: Pro layout for /checkout/?checkout_id=... === */

/* Overall checkout container */
.gp-payment-page .sc-checkout {
  margin: 24px auto 40px;
  padding: 20px 16px;
}

/* Layout: main form + summary side-by-side on desktop */
.gp-payment-page .sc-checkout__layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 900px) {
  .gp-payment-page .sc-checkout__layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: flex-start;
    gap: 24px;
  }
}

/* Card styling for panels (form + summary) */
.gp-payment-page .sc-checkout__main,
.gp-payment-page .sc-checkout__summary {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  /* background removed to allow SureCart dark mode to control it */
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 18px 20px;
}

/* Headline / section titles */
.gp-payment-page .sc-checkout h1,
.gp-payment-page .sc-checkout h2,
.gp-payment-page .sc-checkout h3 {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* Field spacing */
.gp-payment-page .sc-checkout .sc-form-field,
.gp-payment-page .sc-checkout .sc-form-group {
  margin-bottom: 12px;
}

/* Summary line items */
.gp-payment-page .sc-checkout__summary-items {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Total row emphasis */
.gp-payment-page .sc-checkout__summary-total {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

/* Primary pay/complete button */
.gp-payment-page .sc-checkout__actions .sc-button,
.gp-payment-page .sc-checkout .sc-button[type="submit"] {
  width: 100%;
  margin-top: 14px;
  padding: 11px 16px;
  font-weight: 600;
  border-radius: 999px;
}

/* Make small helper text a bit softer */
.gp-payment-page .sc-checkout small,
.gp-payment-page .sc-checkout .sc-help-text {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.7);
}

/* Small tweaks on very small screens */
@media (max-width: 480px) {
  .gp-payment-page .sc-checkout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .gp-payment-page .sc-checkout__main,
  .gp-payment-page .sc-checkout__summary {
    padding: 16px 14px;
  }
}
