/* ==========================================================================
   Payment page (payment.html) — builds on order.css
   ========================================================================== */

.notice-panel {
  padding-top: clamp(40px, 8vw, 90px);
}

.notice-panel[hidden] { display: none; }

.notice-card {
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  text-align: center;
}

.notice-card h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  outline: none;
}

.notice-card p {
  color: var(--ink-soft);
}

.rejected-note {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-left: 3px solid #9a3b2a;
  border-radius: 4px;
  background: #f8ece8;
  font-size: 0.92rem;
  color: #6f2d1e;
}

.rejected-note[hidden] { display: none; }

/* Payment method tiles */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.method-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.method-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--field-bg);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.method-card .icon {
  width: 22px;
  height: 22px;
  color: var(--olive);
}

.method-card strong {
  font-weight: 600;
  color: var(--brown);
}

.method-option:hover .method-card {
  border-color: var(--olive);
}

.method-option input:checked + .method-card {
  border-color: var(--olive);
  background: var(--white);
  box-shadow: 0 0 0 1px var(--olive);
}

.method-option input:focus-visible + .method-card {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.method-details {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--white);
}

.method-details[hidden],
.methods-missing[hidden] { display: none; }

.account-info {
  flex: 1;
  min-width: 0;
}

.account-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
}

.account-info dt {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.account-info dd {
  margin: 0;
  font-weight: 600;
  color: var(--brown);
  overflow-wrap: anywhere;
}

.account-number {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.account-instructions {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: pre-line;
}

.account-qr {
  flex: none;
  width: 140px;
  margin: 0;
  text-align: center;
}

.account-qr img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.account-qr figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .method-details { flex-direction: column; }
  .account-qr { align-self: center; }
}

.methods-missing p {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--sage);
  border-radius: 4px;
  background: var(--tint);
  font-size: 0.9rem;
}

/* Receipt upload */
.upload-box {
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
}

.field.has-error .upload-box {
  border-color: #9a3b2a;
}

.upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  border-radius: 14px;
}

.upload-empty[hidden],
.upload-preview[hidden] { display: none; }

.upload-empty:hover,
.upload-empty:focus-within {
  background: var(--tint);
}

.upload-empty .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  color: var(--olive);
}

.upload-empty strong {
  color: var(--brown);
}

.upload-empty span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.upload-preview {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.upload-preview img {
  flex: none;
  width: 110px;
  height: 110px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.upload-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.upload-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brown);
}

.upload-meta > span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.upload-actions label {
  cursor: pointer;
}

.upload-actions label:focus-within {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.verify-note {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--tint);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.verify-note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--olive);
}

/* Summary card */
.pay-facts,
.pay-totals {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.pay-facts dt,
.pay-totals dt {
  color: var(--ink-soft);
}

.pay-facts dd,
.pay-totals dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: var(--brown);
}

.pay-totals {
  padding-top: 10px;
}

.pay-totals dd strong {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
}

/* Confirmation */
.status-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: -8px 0 22px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brown);
}

.pill-pending {
  background: #f3e6c8;
  color: #7a5a1e;
}

.pill-ok {
  background: var(--olive);
  color: var(--white);
}

.done-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  width: 100%;
  max-width: 520px;
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  font-size: 0.9rem;
}

.done-summary dt {
  color: var(--ink-soft);
}

.done-summary dd {
  margin: 0;
  font-weight: 500;
  color: var(--brown);
}

@media (max-width: 480px) {
  .done-summary { grid-template-columns: 1fr; gap: 0; }
  .done-summary dd { margin-bottom: 8px; }
}

@media print {
  .order-header, .confirmation-actions, .btn-link { display: none !important; }
}
