/* Inline Square payment panel — matches the CarX 2026 theme palette. */

.carx-sq-panel {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  overflow-y: auto;
  padding: 24px 16px;
  background: rgba(15, 27, 51, .72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.carx-sq-inner {
  width: 100%;
  max-width: 460px;
  margin: 40px auto;
  padding: 30px 28px 26px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.carx-sq-inner { position: relative; }

/* Customers must always have a visible way out of a payment screen. */
.carx-sq-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #F1F4F8;
  color: #4A5567;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.carx-sq-close:hover { background: #E2E7EF; color: #1A1F2B; }

.carx-sq-back {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 0;
  background: none;
  color: #7A8598;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: underline;
}
.carx-sq-back:hover { color: #1A1F2B; }

.carx-sq-title {
  margin: 0 0 6px;
  padding-right: 40px;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1A1F2B;
}

.carx-sq-sub {
  margin: 0 0 22px;
  font-size: .87rem;
  line-height: 1.55;
  color: #7A8598;
}

/* ---- Wallets ---- */

.carx-sq-wallets { margin-bottom: 20px; }

.carx-sq-wallet {
  margin-bottom: 10px;
  min-height: 48px;
}

/* Square renders the Apple Pay button into this element. */
#carx-sq-applepay {
  -apple-pay-button-style: black;
  -apple-pay-button-type: plain;
  height: 48px;
  border-radius: 10px;
  cursor: pointer;
}

.carx-sq-or {
  position: relative;
  text-align: center;
  margin: 18px 0 4px;
}
.carx-sq-or::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid #E2E7EF;
}
.carx-sq-or span {
  position: relative;
  padding: 0 12px;
  background: #fff;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7A8598;
}

/* ---- Card fields ---- */

.carx-sq-card {
  min-height: 90px;
  margin-bottom: 16px;
}

/* ---- Feedback ---- */

.carx-sq-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #FDECEC;
  border: 1px solid #F5C2C2;
  color: #9F2E2E;
  font-size: .88rem;
  line-height: 1.5;
}

/* ---- Pay button ---- */

.carx-sq-pay {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  background: #E87722;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.carx-sq-pay:hover:not(:disabled) { background: #C25F13; transform: translateY(-1px); }
.carx-sq-pay:disabled { opacity: .6; cursor: default; }

.carx-sq-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: .78rem;
  color: #7A8598;
}

@media (max-width: 520px) {
  .carx-sq-inner { margin: 12px auto; padding: 24px 20px 22px; }
}
