:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #777b85;
  --border: #dfe1e6;
  --input: #ffffff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141518;
  --card: #202126;
  --text: #f5f5f7;
  --muted: #a1a3ad;
  --border: #3a3c44;
  --input: #292b31;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.checkout {
  width: min(100% - 32px, 460px);
  margin: 0 auto;
  padding: 72px 0 40px;
}

#checkout-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

#checkout-content[hidden] {
  display: none;
}

h1 {
  margin: 0 0 28px;
  font-size: 21px;
  font-weight: 600;
}

h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
}

#order-price {
  margin: 0 0 32px;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
}

label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

input {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
}

input:focus {
  border-color: #6778e8;
  box-shadow: 0 0 0 3px rgb(103 120 232 / 12%);
}

#checkout-status {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

#payment-container:empty {
  display: none;
}

@media (max-width: 480px) {
  .checkout {
    padding-top: 24px;
  }

  #checkout-content {
    padding: 24px 20px;
  }
}

/* Карточка товара */
.checkout-product {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.checkout-product img {
  width: 88px;
  height: 116px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
}

.checkout-product__info {
  flex: 1;
  min-width: 0;
}

.checkout-product h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
}

#product-details {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.checkout-product #order-price {
  margin: 14px 0 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.5px;
}

@media (max-width: 480px) {
  .checkout-product {
    gap: 14px;
  }

  .checkout-product img {
    width: 74px;
    height: 100px;
  }
}
