.modern-payment-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f5f8fb;
  color: #17233c;
}

.modern-payment-page,
.modern-payment-page * {
  box-sizing: border-box;
}

.modern-payment-page > .row,
.modern-payment-page > .row > .col,
.modern-payment-page > .row > .col > .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.payment-checkout {
  min-height: 100vh;
  padding: 32px;
}

.payment-checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.72fr);
  gap: 28px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.payment-summary-panel,
.payment-form-card {
  border: 1px solid rgba(23, 35, 60, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

.payment-summary-panel {
  overflow: hidden;
}

.payment-hero {
  position: relative;
  min-height: 360px;
  background: linear-gradient(135deg, rgba(23, 35, 60, 0.48), rgba(220, 53, 6, 0.18)), url("../../luvion/img/sunset-g233e1c9fe_1920.jpg");
  background-position: center;
  background-size: cover;
}

.payment-hero-logo {
  position: absolute;
  left: 24px;
  top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.payment-hero-logo img {
  max-width: 58px;
  max-height: 58px;
  object-fit: contain;
}

.payment-summary-body {
  padding: 28px;
  min-width: 0;
}

.payment-kicker {
  margin: 0 0 8px;
  color: #136f63;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.payment-summary-body h1 {
  margin: 0;
  color: #17233c;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.payment-summary-body p {
  margin: 12px 0 0;
  color: #5f6f82;
  font-size: 15px;
  line-height: 1.6;
}

.payment-summary-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.payment-summary-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid #e6edf3;
  border-radius: 8px;
  background: #f8fbfd;
}

.payment-summary-item span {
  color: #6a7788;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-summary-item strong {
  min-width: 0;
  color: #17233c;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: right;
}

.payment-trust-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: #5f6f82;
  font-size: 13px;
  line-height: 1.5;
}

.payment-trust-note span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-trust-note i {
  flex: 0 0 auto;
  color: #136f63;
  font-size: 20px;
}

.payment-form-card {
  padding: 28px;
}

.payment-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.payment-form-header > div {
  min-width: 0;
}

.payment-form-header h2 {
  margin: 0;
  color: #17233c;
  font-size: 24px;
  font-weight: 800;
}

.payment-form-header p {
  margin: 4px 0 0;
  color: #5f6f82;
  font-size: 14px;
}

.payment-business-mark {
  flex: 0 0 auto;
  width: 68px;
  height: 54px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #e6edf3;
  background: #ffffff;
  object-fit: contain;
}

.modern-payment-form .form-row {
  margin-bottom: 22px;
}

.payment-method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-method-options button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #17233c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.payment-method-options button.active {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #135f33;
}

.payment-method-options button:focus {
  outline: 2px solid rgba(34, 197, 94, 0.22);
  outline-offset: 2px;
}

.payment-method-options .material-icons {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.pesapal-payment-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .72);
}

.pesapal-payment-backdrop.active {
  display: flex;
}

.pesapal-payment-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, 100%);
  height: min(900px, calc(100dvh - 36px));
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .35);
}

.pesapal-payment-modal header,
.pesapal-payment-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e6edf3;
  background: #fff;
}

.pesapal-payment-modal header {
  background: linear-gradient(90deg, #fff 0%, #f0fdf4 100%);
}

.pesapal-payment-modal header strong,
.pesapal-payment-modal header span {
  display: block;
  letter-spacing: 0;
}

.pesapal-payment-modal header strong {
  color: #17233c;
  font-size: 16px;
  font-weight: 900;
}

.pesapal-payment-modal header span,
.pesapal-payment-modal footer p {
  margin: 0;
  color: #5f6f82;
  font-size: 12px;
  line-height: 1.4;
}

.pesapal-payment-modal header button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #17233c;
}

.pesapal-payment-modal iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pesapal-payment-modal footer {
  border-top: 1px solid #e6edf3;
  border-bottom: 0;
  justify-content: flex-start;
}

.pesapal-payment-modal footer a {
  color: #173f8a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pesapal-payment-modal footer a:hover,
.pesapal-payment-modal footer a:focus {
  color: #0f2f68;
}

.payment-card-confirm-modal.jBox-Modal .jBox-container {
  border-radius: 8px;
  overflow: hidden;
}

.payment-card-confirm-modal .jBox-title {
  border-bottom: 1px solid #e6edf3;
  color: #17233c;
  font-weight: 800;
  padding: 22px 24px;
}

.payment-card-confirm-title {
  color: #17233c;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.payment-card-confirm-modal .jBox-content {
  color: #1f2937;
  padding: 18px 20px;
}

.payment-card-confirm-modal .jBox-footer {
  background: #fff;
  border-top: 1px solid #e6edf3;
  padding: 14px 18px;
}

.payment-card-confirm-breakdown {
  color: #17233c;
  margin-bottom: 40px;
  text-align: left;
}

.payment-card-confirm-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.payment-card-confirm-list > div {
  display: grid;
  grid-template-columns: minmax(125px, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #e6edf3;
}

.payment-card-confirm-list dt,
.payment-card-confirm-list dd {
  margin: 0;
  color: #17233c;
  font-size: 14px;
  line-height: 1.35;
}

.payment-card-confirm-list dt {
  font-weight: 700;
}

.payment-card-confirm-list dd {
  font-weight: 500;
  overflow-wrap: anywhere;
  text-align: right;
}

.payment-card-confirm-heading {
  padding: 14px 0 4px;
  color: #17233c;
  font-size: 14px;
  font-weight: 900;
}

.payment-card-confirm-list.is-breakdown > div {
  padding: 8px 0;
}

.payment-card-confirm-list.is-breakdown dt,
.payment-card-confirm-list.is-breakdown dd {
  font-weight: 500;
}

.payment-card-confirm-list .is-total dt,
.payment-card-confirm-list .is-total dd {
  font-size: 15px;
  font-weight: 900;
}

.payment-card-confirm-note {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #e6edf3;
  color: #334155;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.payment-card-confirm-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.payment-card-confirm-actions .btn {
  align-items: center;
  border-radius: 28px;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  height: 48px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  min-width: 150px;
  padding: 0 20px;
  text-transform: none;
}

.payment-card-confirm-actions .btn i {
  font-size: 20px;
  line-height: 1;
  margin: 0;
}

.payment-card-confirm-cancel {
  background: #fff !important;
  border: 1px solid #d8e5ef;
  box-shadow: none;
  color: #17233c !important;
}

.payment-card-confirm-submit {
  background: linear-gradient(90deg, #ec0c78, #ff5f05) !important;
  border: 0;
  box-shadow: 0 10px 24px rgba(236, 12, 120, 0.2);
  color: #fff !important;
}

.modern-payment-form label.checkout-label {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
  margin: 0 0 10px;
  color: #17233c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  width: 100%;
}

.modern-payment-form label.checkout-label i {
  flex: 0 0 auto;
  color: #136f63;
  font-size: 18px;
  line-height: 1;
}

.modern-payment-form input[type="text"],
.modern-payment-form input[type="email"],
.modern-payment-form input[type="number"],
.modern-payment-form input[type="tel"] {
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #ffffff;
  color: #17233c;
  font-size: 15px;
  font-weight: 600;
}

.modern-payment-form input:focus {
  border-color: #136f63 !important;
  box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.12) !important;
}

.modern-payment-form input.error,
.modern-payment-form input.invalid {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1) !important;
}

.modern-payment-form div.error,
.modern-payment-form label.error,
.modern-payment-form .errorTxt6,
.modern-payment-form .helper-text[data-error].active {
  display: block;
  margin-top: 6px;
  color: #d93025 !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.modern-payment-form .form-row:has(input.error) .checkout-label,
.modern-payment-form .form-row:has(input.invalid) .checkout-label {
  color: #b42318;
}

.modern-payment-form .form-row:has(input.error) .checkout-label i,
.modern-payment-form .form-row:has(input.invalid) .checkout-label i {
  color: #d93025;
}

.modern-payment-form input[readonly] {
  background: #f8fbfd;
}

.field-note,
.modern-payment-form .helper-text {
  display: block;
  margin-top: 8px;
  color: #6a7788;
  font-size: 12px;
  line-height: 1.4;
  min-height: 0;
  position: static;
  text-align: left;
  width: 100%;
}

.modern-payment-form .helper-text:after {
  content: none !important;
  display: none !important;
}

.modern-payment-form input.valid ~ .helper-text,
.modern-payment-form input:focus.valid ~ .helper-text {
  color: #6a7788 !important;
}

.quantity-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}

.quantity-control .btn-floating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #136f63;
}

.policy-row {
  margin: 18px 0;
}

.policy-row label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #39475b;
  font-size: 14px;
  line-height: 1.45;
}

.policy-row [type="checkbox"] + span:not(.lever) {
  padding-left: 30px;
}

.policy-row a {
  color: #136f63;
  font-weight: 800;
}

.checkout-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 28px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
}

.checkout-submit i {
  font-size: 21px;
}

.payment-secondary-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 800;
}

.payment-secondary-actions a {
  color: #5f6f82;
  text-decoration: none;
}

.payment-secondary-actions a:hover {
  color: #136f63;
}

@media (max-width: 980px) {
  .payment-checkout-shell {
    grid-template-columns: 1fr;
  }

  .payment-hero {
    min-height: 240px;
  }
}

@media (max-width: 575px) {
  .modern-payment-page > .row,
  .modern-payment-page > .row > .col,
  .modern-payment-page > .row > .col > .container {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden;
  }

  .payment-checkout {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
    padding: 16px;
  }

  .payment-checkout-shell,
  .payment-summary-panel,
  .payment-form-card {
    display: block;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    overflow: hidden;
  }

  .payment-summary-panel {
    margin-bottom: 30px;
  }

  .payment-summary-body,
  .payment-form-card {
    width: 100%;
    max-width: 100%;
    padding: 20px;
  }

  .payment-summary-body h1 {
    font-size: 28px;
    overflow-wrap: anywhere;
  }

  .payment-summary-body p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .payment-summary-item {
    display: block;
  }

  .payment-summary-item strong {
    display: block;
    margin-top: 5px;
    text-align: left;
  }

  .payment-form-header {
    align-items: flex-start;
    display: block;
  }

  .payment-business-mark {
    display: none;
    width: 46px;
    height: 46px;
  }

  .payment-method-options {
    grid-template-columns: 1fr;
  }

  .pesapal-payment-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .pesapal-payment-modal {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .pesapal-payment-modal footer {
    align-items: center;
    flex-direction: row;
  }

  .pesapal-payment-modal footer a {
    width: auto;
  }
}
