/* LILA_GAME_PAYMENT_MODAL_V1 */

.payment-modal[hidden] {
  display: none !important;
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 1450;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.payment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 24, 21, .68);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.payment-modal-card {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  max-height: min(92svh, 850px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(75, 58, 45, .18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 9%, rgba(239, 194, 137, .20), transparent 15rem),
    #f4efe8;
  box-shadow: 0 42px 120px rgba(19, 14, 11, .34);
  color: #292622;
}

.payment-modal-close {
  position: absolute;
  top: 16px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(49, 42, 36, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .38);
  color: #292622;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.payment-modal-card h2 {
  max-width: 540px;
  margin: 0;
  padding-right: 32px;
  font-family: var(--font-title, "Oranienbaum", serif);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.payment-modal-intro {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(41, 38, 34, .76);
  font-size: 15px;
  line-height: 1.58;
}

.payment-benefits {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.payment-benefits li {
  position: relative;
  padding-left: 20px;
  color: rgba(41, 38, 34, .82);
  font-size: 14px;
  line-height: 1.48;
}

.payment-benefits li::before {
  content: "✶";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(128, 89, 52, .72);
}

.payment-price-card {
  display: grid;
  gap: 0;
  margin-top: 23px;
  padding: 16px 18px;
  border: 1px solid rgba(75, 58, 45, .14);
  border-radius: 15px;
  background: rgba(255, 255, 255, .30);
}

.checkout-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .92rem;
}

.checkout-price-row strong {
  font-size: 1rem;
}

.checkout-price-row--discount {
  margin-top: .65rem;
  color: #8a5a21;
}

.checkout-price-row--total {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(75, 58, 45, .12);
  font-weight: 700;
}

.checkout-price-row--total strong {
  font-size: 1.28rem;
}

.checkout-promo-field {
  display: grid;
  gap: .45rem;
  margin-top: 18px;
}

.checkout-promo-field > span {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7c6a5c;
}

.checkout-promo-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid rgba(75, 58, 45, .20);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
}

.checkout-promo-field input {
  min-width: 0;
  border: 0;
  padding: .85rem .95rem;
  background: transparent;
  font: inherit;
  text-transform: uppercase;
  outline: none;
}

.checkout-promo-field button {
  border: 0;
  border-left: 1px solid rgba(75, 58, 45, .14);
  padding: 0 1rem;
  background: #eadbc4;
  color: #3e3026;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.checkout-promo-field button:disabled {
  opacity: .55;
  cursor: wait;
}

.checkout-message {
  min-height: 1.3rem;
  margin: .6rem 0 0;
  font-size: .84rem;
  line-height: 1.4;
  color: #72583f;
}

.checkout-message[data-state="success"],
.payment-provider-note[data-state="success"] {
  color: #41764d;
}

.checkout-message[data-state="error"] {
  color: #9b3c35;
}

.checkout-message[data-state="warning"] {
  color: #8a5a21;
}

.payment-provider-note {
  margin: 13px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(139, 102, 64, .08);
  color: rgba(61, 49, 39, .72);
  font-size: 12.5px;
  line-height: 1.48;
}

.payment-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  white-space: nowrap;
}

.payment-submit:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.payment-return {
  display: block;
  margin: 14px auto 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: rgba(41, 38, 34, .68);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .payment-modal {
    align-items: end;
    padding: 0;
  }

  .payment-modal-card {
    width: 100%;
    max-height: 94svh;
    padding: 28px 18px 22px;
    border-radius: 22px 22px 0 0;
  }

  .payment-modal-close {
    position: sticky;
    top: 0;
    z-index: 4;
    float: right;
    margin: -10px -2px -34px 12px;
    background: rgba(244, 239, 232, .98);
  }

  .payment-modal-card h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .checkout-promo-field > div {
    grid-template-columns: 1fr;
  }

  .checkout-promo-field button {
    min-height: 42px;
    border-left: 0;
    border-top: 1px solid rgba(75, 58, 45, .14);
  }

  .payment-submit {
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -10px 20px rgba(244, 239, 232, .94);
  }
}
