.esim-checkout-body {
  margin: 0;
  min-height: 100vh;
  background: #f4f7fb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.esim-checkout-page,
.esim-payment-page {
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
}

.esim-checkout-card,
.esim-payment-card {
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgb(15 23 42 / 8%);
}

.esim-checkout-header,
.esim-payment-header {
  padding: 24px;
  text-align: center;
  background: #1d4ed8;
  color: #fff;
}

.esim-checkout-header h1 {
  margin: 0 0 8px;
  font-size: 26px;
}

.esim-checkout-header p {
  margin: 0;
  opacity: 0.9;
}

.esim-payment-header strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.esim-checkout-form,
.esim-payment-content {
  padding: 24px;
}

.esim-form-group {
  margin-bottom: 18px;
}

.esim-form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 650;
}

.esim-form-group input {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  font-size: 16px;
}

.esim-form-group input:focus {
  outline: 3px solid rgb(37 99 235 / 15%);
  border-color: #2563eb;
}

.esim-checkout-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  line-height: 1.5;
}

.esim-checkout-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.esim-checkout-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.esim-checkout-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #fee2e2;
  color: #991b1b;
}

.esim-payment-qr {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto 22px;
}

.esim-payment-details {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 10px 16px;
  margin: 0;
  padding: 18px;
  border-radius: 12px;
  background: #f8fafc;
}

.esim-payment-details dt {
  color: #64748b;
}

.esim-payment-details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.esim-payment-countdown {
  margin-top: 18px;
  text-align: center;
  font-weight: 700;
}

.esim-payment-status {
  margin-top: 12px;
  padding: 13px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
}

.esim-payment-status[data-state="pending"] {
  background: #fef3c7;
  color: #92400e;
}

.esim-payment-status[data-state="paid"] {
  background: #dcfce7;
  color: #166534;
}

.esim-payment-status[data-state="expired"],
.esim-payment-status[data-state="error"] {
  background: #fee2e2;
  color: #991b1b;
}

.esim-payment-note {
  margin: 16px 0 0;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

.esim-checkout-card {
  max-width: 620px;
}

.esim-order-summary {
  margin: 24px 24px 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.esim-order-summary-title {
  padding: 15px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 17px;
  font-weight: 750;
}

.esim-order-product {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
}

.esim-order-product-image {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #f8fafc;
}

.esim-order-product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esim-order-product-info {
  flex: 1;
  min-width: 0;
}

.esim-order-product-name {
  color: #0f172a;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
}

.esim-order-product-sku {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
}

.esim-order-product-desc {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.esim-order-unit-price {
  margin-top: 10px;
  color: #475569;
  font-size: 14px;
}

.esim-order-unit-price strong {
  color: #0f172a;
}

.esim-order-quantity-row,
.esim-order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-top: 1px solid #e2e8f0;
}

.esim-order-row-label,
.esim-order-total-label {
  color: #0f172a;
  font-weight: 700;
}

.esim-order-row-note,
.esim-order-total-note {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.esim-checkout-qty {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
}

.esim-checkout-qty-button {
  width: 42px;
  height: 42px;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 22px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.esim-checkout-qty-button:hover:not(:disabled) {
  background: #e2e8f0;
}

.esim-checkout-qty-button:disabled,
.esim-checkout-qty-button.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.esim-checkout-qty-input {
  width: 58px;
  height: 42px;
  box-sizing: border-box;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  outline: none;
  background: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  appearance: textfield;
}

.esim-checkout-qty-input::-webkit-inner-spin-button,
.esim-checkout-qty-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.esim-order-total-row {
  background: #eff6ff;
}

.esim-order-total-price {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-size: 23px;
  font-weight: 800;
  white-space: nowrap;
}

.esim-customer-section-title {
  margin-bottom: 18px;
  color: #0f172a;
  font-size: 19px;
  font-weight: 750;
}

.esim-form-help {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.esim-form-group label span {
  color: #dc2626;
}

.esim-checkout-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
}

.esim-checkout-submit strong {
  padding-left: 15px;
  border-left: 1px solid rgb(255 255 255 / 30%);
  white-space: nowrap;
}

.esim-checkout-security {
  margin-top: 14px;
  color: #64748b;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 575.98px) {
  .esim-checkout-page {
    padding: 14px 10px;
  }

  .esim-checkout-card {
    border-radius: 14px;
  }

  .esim-order-summary {
    margin: 16px 14px 0;
  }

  .esim-checkout-form {
    padding: 20px 14px;
  }

  .esim-order-product {
    gap: 12px;
    padding: 15px;
  }

  .esim-order-product-image {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }

  .esim-order-quantity-row,
  .esim-order-total-row {
    padding: 15px;
  }

  .esim-order-total-price {
    font-size: 20px;
  }

  .esim-checkout-submit {
    font-size: 14px;
  }
}