/* === Payment Form Styles === */

.spg-wrap {
  max-width: 520px;
  margin: 32px auto;
  border: 1px solid #323BAE;
  padding: 36px 28px 32px 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #323BAE;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Form labels */
.spg-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #323BAE;
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* Form fields */
.spg-form input[type="number"],
.spg-form input[type="email"],
.spg-form input[type="tel"] {
  width: 100%;
  padding: 13px 18px;
  border: 1.5px solid #323BAE;
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  color: #323BAE;
  margin-bottom: 18px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.spg-form input[type="number"]::placeholder,
.spg-form input[type="email"]::placeholder,
.spg-form input[type="tel"]::placeholder {
  color: #323BAE;
  opacity: 0.7;
}

/* Placeholder color on focus (invert for white background) */
.spg-form input[type="number"]:focus::placeholder,
.spg-form input[type="email"]:focus::placeholder,
.spg-form input[type="tel"]:focus::placeholder {
  color: #323BAE;
}

/* Radios & checkboxes use brand color */
.spg-form input[type="radio"],
.spg-form input[type="checkbox"] {
  accent-color: #323BAE;
}

/* Focus effect - invert */
.spg-form input[type="number"]:focus,
.spg-form input[type="email"]:focus,
.spg-form input[type="tel"]:focus {
  outline: none;
  background: #fff;
  color: #323BAE;
  border-color: #2A319B;
  box-shadow: 0 0 0 2px rgba(50, 59, 174, 0.18);
}
/* Add spacing between form groups */
.spg-form .spg-form-group {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Align radio/checkboxes and their labels nicely */
.spg-form .spg-form-group--inline {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

/* Remove bottom margin for last form group */
.spg-form .spg-form-group:last-child {
  margin-bottom: 0;
}

/* Preset Chips */
.spg-chip {
  background:  #323BAE; /* Default orange */
  border: 1px solid  #323BAE;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  color: #fff; /* White text */
  font-weight: 500;
  transition: all 0.2s ease;
}

.spg-chip:hover {
  background: #fff; /* Invert on hover */
  color: #323BAE;
  border-color:  #323BAE;
  transform: translateY(-2px);
}

.spg-chip.selected {
  background: #fff;
  color:  #323BAE;
  border-color:  #323BAE;
}

/* Payment Methods Section */
.spg-payment-methods {
  background:white; /* Background updated */
  padding: 20px;
  border-radius: 12px;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #323BAE;
}

.spg-payment-option label {
  margin-bottom: 0;
  font-weight: 500;
  color: #323BAE;
  cursor: pointer;
}

/* Button */
.spg-btn {
  background: #323BAE;
  color: #fff;
  border: none;
  padding: 15px 0;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 320px;
  margin: 18px auto 0 auto;
  display: block;
  letter-spacing: 0.01em;
}

.spg-btn:hover {
  background: #fff;
  color: #323BAE;
  border: 1.5px solid #323BAE;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Card & CashApp containers */
#spg-card-container,
#spg-cashapp-container,
#spg-applepay-container,
#spg-googlepay-container {
  border: 1px solid #323BAE;
  border-radius: 12px;
  padding: 20px;
  min-height: 60px;
  background: #fff;     /* White background */
  color: #323BAE;       /* Brand text */
}

/* Messages */
.spg-message {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  display: none;
  font-size: 15px;
  text-align: center;
}

.spg-success {
  background: #e6f7ed;
  color: #1e7e34;
  border: 1px solid #b5dfc8;
}

.spg-error {
  background: #fdecea;
  color: #ec4e4e;
  border: 1px solid #f5c6cb;
}

/* === Accepted Payment Logos (Professional + Clean) === */
.spg-accepted-logos {
  margin: 6px 0 18px;
}

/* Inline SVG logos row (used above Payment Method heading) */
.spg-inline-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}
.spg-logo-svg {
  width: 84px;
  height: 40px;
  border: 1px solid #e6e8f0;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.spg-logo-svg svg {
  width: 72px;
  height: 28px;
}

/* Compact brand badges (used for the small icons like in the screenshot) */
.spg-logo-badge {
  display: inline-block;
  width: 30px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid #e6e8f0;
  background: #fff;
  position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

/* Smaller inside the headline logos row */
.spg-inline-logos .spg-logo-badge {
  width: 28px;
  height: 16px;
}

/* VISA */
.spg-logo-badge.visa {
  border-color: #dfe3f5;
}
.spg-logo-badge.visa::before {
  content: "VISA";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: #1A1F71;
}

/* Mastercard (two overlapping circles) */
.spg-logo-badge.mc::before,
.spg-logo-badge.mc::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: .95;
}
.spg-logo-badge.mc::before { left: 8px; background: #EB001B; }
.spg-logo-badge.mc::after  { right: 8px; background: #F79E1B; }

/* American Express */
.spg-logo-badge.amex {
  background: #2E77BC;
  border-color: #2E77BC;
}
.spg-logo-badge.amex::before {
  content: "AMEX";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: #fff;
  letter-spacing: .2px;
}

/* UnionPay (simple wordmark) */
.spg-logo-badge.unionpay::before {
  content: "UP";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: #D81E06;
}

/* Card field network badges row (right aligned under the card input) */
.spg-card-networks {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.spg-card-details #spg-card-container {
  padding-right: 76px; /* leave space in case Square renders brand hints on the right */
}
.spg-logos-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  justify-content: center;
}
.spg-logo {
  width: 84px;
  height: 40px;
  border: 1px solid #e6e8f0;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #5b6275;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.spg-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.spg-logo span {
  position: relative;
  z-index: 2;
}

/* Brand treatments (clean wordmark-style badges) */
.spg-logo-visa {
  border-color: #dfe3f5;
}
.spg-logo-visa span {
  color: #1A1F71; /* Visa blue */
}

.spg-logo-mastercard {
  border-color: #ffd7cc;
}
.spg-logo-mastercard::before,
.spg-logo-mastercard::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0.85;
}
.spg-logo-mastercard::before {
  left: 22px;
  background: #EB001B; /* red */
}
.spg-logo-mastercard::after {
  right: 22px;
  background: #F79E1B; /* orange */
}
.spg-logo-mastercard span {
  color: #111;
}

.spg-logo-amex {
  background: #2E77BC;
  border-color: #2E77BC;
}
.spg-logo-amex span {
  color: #fff;
}

.spg-logo-discover {
  border-color: #ffe1cf;
}
.spg-logo-discover span {
  color: #FF6000;
}

.spg-logo-jcb {
  border-color: #d6e4ff;
}
.spg-logo-jcb span {
  color: #0a4bff;
}

.spg-logo-diners {
  border-color: #d8e4ef;
}
.spg-logo-diners span {
  color: #0079BE;
}

.spg-logo-unionpay {
  border-color: #ffd6dd;
}
.spg-logo-unionpay span {
  color: #D81E06; /* red accent */
}

.spg-logo-paypal {
  background: #ffffff;
  border-color: #d6def3;
}
.spg-logo-paypal span {
  color: #003087; /* PayPal blue */
}

.spg-logo-applepay {
  background: #111;
  border-color: #111;
}
.spg-logo-applepay span {
  color: #fff;
}

.spg-logo-googlepay {
  background: #fff;
  border-color: #e6e8f0;
}
.spg-logo-googlepay span {
  color: #1f1f1f;
}

.spg-logo-afterpay {
  background: #B1E4CC;
  border-color: #B1E4CC;
}
.spg-logo-afterpay span {
  color: #111;
}

/* Cash App badge */
.spg-logo-cashapp {
  background: #00C244;
  border-color: #00C244;
}
.spg-logo-cashapp span {
  color: #fff;
}

/* === Thank You Page Styles === */
.spg-thankyou {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent;
}
.spg-thankyou-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid #e6e8f0;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.spg-thankyou-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6f7ed;
  color: #1e7e34;
  font-size: 30px;
  border: 1px solid #b5dfc8;
}
.spg-thankyou h2 {
  margin: 10px 0 6px;
  font-size: 22px;
  color: #111;
}
.spg-thankyou p {
  color: #5b6275;
  margin: 0 0 10px;
}
.spg-thankyou-ref {
  background: #f7f8ff;
  border: 1px solid #e0e4ff;
  border-radius: 10px;
  padding: 10px 12px;
  display: inline-block;
  color: #323BAE;
  font-weight: 600;
}
.spg-thankyou-btn {
  margin-top: 12px;
  width: auto;
  min-width: 180px;
}

/* === Payment Method Tiles (compact card layout with logo + radio + name) === */
.spg-payment-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}
@media (max-width: 420px) {
  .spg-payment-tiles {
    grid-template-columns: 1fr;
  }
}
.spg-payment-option {
  position: relative;
}
.spg-payment-option input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.spg-tile-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1f1f1f;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all .15s ease;
  position: relative;
  padding-right: 32px; /* room for chevron */
}
.spg-tile-label::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #b8bccb; /* caret down */
  transform: translateY(-50%);
  pointer-events: none;
}
.spg-tile-label:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.spg-payment-option input[type="radio"]:focus + .spg-tile-label {
  box-shadow: 0 0 0 3px rgba(50, 59, 174, 0.25);
}
.spg-payment-option input[type="radio"]:checked + .spg-tile-label {
  border-color: #323BAE;
  box-shadow: 0 0 0 2px rgba(50, 59, 174, 0.2);
}
.spg-payment-option input[type="radio"]:checked + .spg-tile-label .spg-brand-text {
  color: #323BAE;
}
.spg-brand-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #111;
  flex: 0 0 20px;
  border: 1px solid #e6e8f0;
  background: #fff;
}
.spg-brand-text {
  font-weight: 600;
  color: #323BAE;
}

/* Brand skins (compact, subtle) */
.spg-brand-card .spg-brand-icon {
  background: #323BAE;
  color: #fff;
  border-color: #323BAE;
  position: relative;
}
.spg-brand-card .spg-brand-icon::after {
  content: "";
  width: 12px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 2px;
  display: block;
}

.spg-brand-cashapp .spg-brand-icon {
  background: #00C244; /* Cash App green */
  border-color: #00C244;
  color: #fff;
}
.spg-brand-cashapp .spg-brand-icon::after {
  content: "$";
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.spg-brand-googlepay .spg-brand-icon {
  background: #fff; /* white badge like GPay */
  border-color: #dcdfe7;
  color: #1f1f1f;
}
.spg-brand-googlepay .spg-brand-icon::after {
  content: "G";
  color: #1f1f1f;
  font-weight: 800;
  line-height: 1;
}

.spg-brand-applepay .spg-brand-icon {
  background: #111; /* Apple black */
  border-color: #111;
  color: #fff;
}
.spg-brand-applepay .spg-brand-icon::after {
  content: "A";
  color: #fff;
  font-weight: 800;
  line-height: 1;
}


/* === Design refresh & card logos placement overrides (2025-09-08) === */
:root {
  --spg-primary: #323BAE;
  --spg-primary-600: #2A319B;
  --spg-border: #dcdfe7;
  --spg-text: #1f1f1f;
  --spg-muted: #9aa0b2;
}

/* Field color refresh aligned to brand (white bg, brand text/border) */
.spg-form input[type="number"],
.spg-form input[type="email"],
.spg-form input[type="tel"] {
  background: #fff !important;
  color: var(--spg-primary) !important;
  border-color: var(--spg-primary) !important;
}

.spg-form input[type="number"]::placeholder,
.spg-form input[type="email"]::placeholder,
.spg-form input[type="tel"]::placeholder {
  color: var(--spg-primary) !important;
}

.spg-form input[type="number"]:focus,
.spg-form input[type="email"]:focus,
.spg-form input[type="tel"]:focus {
  background: #fff !important;
  color: var(--spg-primary) !important;
  border-color: var(--spg-primary) !important;
  box-shadow: 0 0 0 2px rgba(50, 59, 174, 0.2) !important;
}

/* Card container boxed layout so logos can sit inside the box (bottom-right) */
.spg-card-details .spg-card-box {
  position: relative;
  border: 1px solid var(--spg-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px 16px 46px 16px; /* bottom padding for logos */
}

/* Enforce white background + brand border/text for inline payment containers */
.spg-card-details #spg-card-container,
.spg-cashapp-details #spg-cashapp-container,
.spg-applepay-details #spg-applepay-container,
.spg-googlepay-details #spg-googlepay-container {
  border: 1px solid var(--spg-primary);
  padding: 16px;
  background: #fff;
  color: var(--spg-primary);
}

/* Place the logos INSIDE the card box, bottom-right under MM/YY and CVC */
.spg-card-details .spg-card-box .spg-card-networks {
  position: absolute;
  right: 12px;
  bottom: 10px;
  margin-top: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* Keep right padding in case Square renders network hints on the right */
.spg-card-details #spg-card-container {
  padding-right: 76px;
}

/* Button refinement */
.spg-btn {
  background: var(--spg-primary) !important;
  color: #fff !important;
}
.spg-btn:hover {
  background: #fff !important;
  color: var(--spg-primary) !important;
  border: 1px solid var(--spg-primary) !important;
}
