/* The [hidden] attribute loses the specificity tie against any class rule
   that sets display (e.g. display: flex below), and Chrome doesn't apply it
   reliably to <svg> root elements at all — force it so toggling .hidden via
   JS always actually hides the element. */
[hidden] {
  display: none !important;
}

.checkout-page {
  max-width: 480px;
  margin: 48px auto;
  padding: 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  font-family: system-ui, sans-serif;
  color: #1c1c1e;
}

.checkout-unavailable {
  text-align: center;
  color: #1c1c1e;
}

.checkout-back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
  margin-bottom: 16px;
}

.checkout-back-link:hover {
  text-decoration: underline;
}

.checkout-logo {
  max-height: 60px;
  max-width: 160px;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.checkout-site-label {
  font-size: 13px;
  color: #6e6e73;
  margin: 0 0 24px;
}

.checkout-page h1 {
  font-size: 20px;
  margin: 0 0 8px;
}

.checkout-product-description {
  font-size: 14px;
  color: #444;
  margin: 0 0 24px;
}

.checkout-pricing {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  font-size: 14px;
}

.checkout-pricing li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e5;
}

.checkout-discount-line {
  color: #1e7b34;
}

.checkout-total-line {
  font-weight: 700;
  border-bottom: none;
}

.checkout-quantity-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.checkout-quantity-form label {
  font-size: 13px;
  font-weight: 600;
}

.checkout-quantity-form input[type="number"] {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid #d0d0d5;
  border-radius: 4px;
  font-size: 14px;
}

.checkout-quantity-form button,
.checkout-page button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: #1c1c1e;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.checkout-buyer-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.checkout-buyer-info label {
  font-size: 13px;
  font-weight: 600;
}

.checkout-buyer-info input {
  padding: 8px 10px;
  border: 1px solid #d0d0d5;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.checkout-required {
  color: #c0392b;
}

.checkout-error {
  margin: 0;
  font-size: 13px;
  color: #c0392b;
}

.checkout-consent {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6e6e73;
  text-align: center;
}

.checkout-consent a {
  color: #6e6e73;
  text-decoration: underline;
}

.checkout-consent a:hover {
  color: #0066cc;
}

@media (max-width: 540px) {
  .checkout-page {
    max-width: none;
    margin: 0;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .checkout-quantity-form {
    flex-wrap: wrap;
  }

  .checkout-buyer-info input,
  .checkout-quantity-form input[type="number"] {
    font-size: 16px;
  }
}

.checkout-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #6e6e73;
}

.checkout-footer a {
  color: #6e6e73;
  text-decoration: none;
  transition: color 0.2s ease;
}

.checkout-footer a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.checkout-footer .separator {
  color: #d0d0d5;
  user-select: none;
}

.checkout-status {
  margin: 16px 0 8px;
  padding: 28px 20px 20px;
  border-radius: 8px;
  background: #f7f7f9;
  border: 1px solid #e0e0e5;
  text-align: center;
}

.checkout-status-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
}

.checkout-status-icon svg {
  display: none;
  width: 100%;
  height: 100%;
}

.checkout-status-icon svg.is-active {
  display: block;
}

.checkout-status-spinner {
  animation: checkout-status-spin 0.9s linear infinite;
}

.checkout-status-spinner circle {
  stroke: #6e6e73;
  stroke-linecap: round;
  stroke-dasharray: 90 150;
}

@keyframes checkout-status-spin {
  100% { transform: rotate(360deg); }
}

#checkout-status-icon-success .checkout-status-icon-ring {
  stroke: #1e7b34;
  stroke-width: 3;
}

#checkout-status-icon-success .checkout-status-icon-mark {
  stroke: #1e7b34;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#checkout-status-icon-failed .checkout-status-icon-ring {
  stroke: #c0392b;
  stroke-width: 3;
}

#checkout-status-icon-failed .checkout-status-icon-mark {
  stroke: #c0392b;
  stroke-width: 4;
  stroke-linecap: round;
}

.checkout-status-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #1c1c1e;
}

.checkout-status-detail {
  margin: 0;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.checkout-status-summary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e0e0e5;
  text-align: left;
  font-size: 13px;
}

.checkout-status-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  color: #444;
}

.checkout-status-return {
  margin-top: 16px;
}

.checkout-status-return-link {
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  text-decoration: none;
}

.checkout-status-return-link:hover {
  text-decoration: underline;
}

.checkout-status-summary-row span:first-child {
  color: #6e6e73;
}

.checkout-status-summary-row span:last-child {
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
