:root {
  color-scheme: light;
  --ink: #18201f;
  --muted: #66716f;
  --line: #d8dfdd;
  --panel: #ffffff;
  --surface: #edf2f1;
  --brand: #123d38;
  --brand-soft: #e3eeeb;
  --accent: #d94b3d;
  --danger: #c9372c;
  --focus: #168777;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 28px 16px;
}

.checkout {
  width: min(100%, 500px);
}

.checkout__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 13px 16px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px 8px 0 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.merchant,
.subtitle {
  margin: 0;
}

.merchant {
  font-size: 16px;
  font-weight: 800;
}

.subtitle {
  margin-top: 2px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
}

.language {
  margin-left: auto;
}

.language select {
  width: 68px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.language option {
  color: var(--ink);
}

.payment-summary,
.payment-panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

.payment-summary {
  border-top: 0;
}

.payment-summary__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.payment-summary__meta strong {
  display: block;
  margin-top: 3px;
  font-weight: 700;
}

.invoice__date {
  color: var(--muted);
  text-align: right;
}

.payment-summary__amount {
  padding: 22px 18px 24px;
  text-align: center;
}

.payment-summary__amount strong {
  display: block;
  margin-top: 5px;
  color: var(--brand);
  font-size: 30px;
  line-height: 1.1;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.payment-panel {
  margin-top: 16px;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 32, 31, .07);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #293432;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd4d2;
  border-radius: 7px;
  background: #fbfcfc;
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
}

input:focus,
select:focus {
  outline: 3px solid rgba(22, 135, 119, .14);
  border-color: var(--focus);
}

.hidden-control {
  display: none;
}

.fixed-gateway {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #cbd4d2;
  border-radius: 7px;
  background: var(--brand-soft);
  color: #35413f;
  font-size: 13px;
  font-weight: 600;
}

.fixed-gateway strong {
  color: var(--brand);
  font-size: 15px;
}

input.input-error {
  border-color: var(--danger);
  background: #fff1ef;
  color: #9f251d;
  outline: 3px solid rgba(201, 55, 44, .13);
}

.gateway-restrictions {
  padding: 15px;
  border: 1px solid #cedbd7;
  border-radius: 7px;
  background: #f4f8f7;
  color: #36413f;
}

.gateway-restrictions__title {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.gateway-restrictions__summary {
  display: grid;
  gap: 7px;
  margin: 0 0 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid #cedbd7;
}

.gateway-restrictions__summary div {
  display: grid;
  grid-template-columns: minmax(120px, .9fr) 1.1fr;
  gap: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.gateway-restrictions__summary dt {
  color: var(--muted);
  font-weight: 600;
}

.gateway-restrictions__summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.gateway-restrictions__subtitle {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.gateway-restrictions__group + .gateway-restrictions__group {
  margin-top: 11px;
}

.gateway-restrictions__group h3 {
  margin: 0 0 3px;
  color: var(--brand);
  font-size: 12px;
}

.gateway-restrictions__group p,
.gateway-restrictions__empty,
.gateway-restrictions__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

button:hover:not(:disabled) {
  background: #c93d31;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.message {
  min-height: 20px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.message--error {
  color: #a9261e;
  font-weight: 700;
}

@media (max-width: 520px) {
  .page-shell {
    padding: 0;
  }

  .checkout {
    width: 100%;
  }

  .checkout__header,
  .payment-panel {
    border-radius: 0;
  }

  .payment-panel {
    margin-top: 12px;
    border-left: 0;
    border-right: 0;
  }

  .payment-summary {
    border-left: 0;
    border-right: 0;
  }

  .gateway-restrictions__summary div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
