.stripe-embed-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

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

.stripe-embed-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 36, 50, 0.72);
}

.stripe-embed-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  background: #f9f8f6;
  border-radius: 1.15rem;
  box-shadow: 0 28px 80px rgba(10, 37, 64, 0.4);
  padding: 0 0 0.75rem;
}

.stripe-embed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #123547;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-radius: 1.15rem 1.15rem 0 0;
}

.stripe-embed-head img {
  height: 52px;
  width: auto;
  max-width: min(240px, 62vw);
  object-fit: contain;
}

.stripe-embed-kicker {
  margin: 0;
  padding: 0.7rem 1.15rem 0.15rem;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #008578;
}

.stripe-embed-close {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.stripe-embed-close:hover {
  background: #e65145;
}

body.stripe-embed-open {
  overflow: hidden;
}

#stripe-embed-mount {
  min-height: 420px;
  margin: 0.35rem 0.55rem 0;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #fff;
}

/* —— Wybór metody płatności —— */
.stripe-embed-modal,
.stripe-embed-modal *,
.stripe-embed-modal *::before,
.stripe-embed-modal *::after {
  box-sizing: border-box;
}

.stripe-embed-panel {
  width: min(560px, 100%);
}

.pay-chooser {
  padding: 1rem 1.15rem 0.6rem;
  color: #0a2540;
  font-family: Inter, system-ui, sans-serif;
}

.pay-chooser[hidden],
.pay-stripe-view[hidden],
.pay-email[hidden],
.pay-error[hidden] {
  display: none !important;
}

.pay-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0a2540;
}

.pay-amount {
  margin: 0.2rem 0 0.9rem;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
}

.pay-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid #0a2540;
  border-radius: 0.85rem;
  background: #fff;
  color: #0a2540;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pay-option:hover:not(:disabled) {
  background: #eef4fa;
}

.pay-option:disabled,
.pay-bank:disabled {
  cursor: wait;
  opacity: 0.7;
}

.pay-option-name {
  font-weight: 800;
  font-size: 1.05rem;
}

.pay-option-note {
  grid-column: 1;
  color: #64748b;
  font-size: 0.82rem;
}

.pay-option-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 1.6rem;
  line-height: 1;
}

.pay-p24 {
  margin-top: 1.1rem;
}

.pay-p24-title {
  margin: 0 0 0.6rem;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.pay-email {
  display: block;
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.pay-email input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  font: inherit;
  font-size: 16px; /* bez automatycznego powiększania na telefonie */
}

.pay-banks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.pay-bank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 74px;
  padding: 0.45rem 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  color: #0a2540;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}

.pay-bank:hover:not(:disabled) {
  border-color: #0a2540;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.12);
}

.pay-bank img {
  width: 100%;
  max-width: 92px;
  height: 34px;
  object-fit: contain;
}

.pay-bank span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pay-bank-other {
  background: #f1f5f9;
}

.pay-bank.is-loading {
  outline: 2px solid #d62828;
}

.pay-loading {
  grid-column: 1 / -1;
  margin: 0.4rem 0;
  color: #64748b;
  font-size: 0.88rem;
}

.pay-error {
  margin: 0.55rem 0 0;
  color: #d62828;
  font-size: 0.86rem;
  font-weight: 600;
}

.pay-p24-note {
  margin: 0.7rem 0 0;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.4;
}

.pay-back {
  margin: 0.65rem 1rem 0;
  padding: 0;
  border: 0;
  background: none;
  color: #0a2540;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 600px) {
  .stripe-embed-modal {
    padding: 0;
    place-items: stretch;
  }

  .stripe-embed-panel {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .stripe-embed-head {
    border-radius: 0;
    padding: 0.6rem 0.9rem;
  }

  .stripe-embed-head img {
    height: 42px;
  }

  .pay-chooser {
    padding: 0.85rem 0.85rem 1rem;
  }

  .pay-banks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
