/* ===========================================================
   Dimitri's Catering - Payment Site styles
   =========================================================== */

:root {
  --green: #21402f;
  --green-dark: #182f22;
  --gold: #c19a4b;
  --gold-dark: #a8823a;
  --cream: #f6f1e7;
  --card-bg: #ffffff;
  --ink: #2c2c28;
  --muted: #76746a;
  --line: #e4ddcd;
  --error: #b3402f;
  --success: #2f7d4f;
  --shadow: 0 18px 48px rgba(33, 64, 47, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  background-image: radial-gradient(circle at 50% 0%, #fbf8f1 0%, var(--cream) 60%);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 18px 48px;
  -webkit-font-smoothing: antialiased;
}

/* ---- Brand header ---------------------------------------- */
.brand {
  text-align: center;
  margin-bottom: 26px;
}
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--green);
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(33, 64, 47, 0.28);
}
.brand h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.3px;
  line-height: 1.1;
}
.brand .tagline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: var(--gold-dark);
  margin-top: 6px;
}

/* ---- Card ------------------------------------------------- */
.card {
  background: var(--card-bg);
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
}
.card-band {
  height: 6px;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
}
.card-body { padding: 30px 30px 26px; }

/* ---- Generic elements ------------------------------------ */
h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 4px;
}
.sub { color: var(--muted); font-size: 14px; line-height: 1.5; }

.divider { height: 1px; background: var(--line); margin: 22px 0; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---- Amount input ---------------------------------------- */
.amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.amount-wrap .currency {
  position: absolute;
  left: 14px;
  font-size: 19px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}
input.amount {
  width: 100%;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  padding: 13px 14px 13px 32px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fcfbf7;
  transition: border-color 0.15s ease;
}
input.amount:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}

/* ---- Fee breakdown --------------------------------------- */
.breakdown {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfbf7;
  padding: 10px 14px;
}
.breakdown .bd-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--muted);
  padding: 5px 0;
}
.breakdown .bd-row.bd-total {
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--green);
}

/* ---- Note from the caterer ------------------------------- */
.note-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f3eede;
  border: 1px solid #e6d9b6;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
}
.note-box .note-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.note-box #message-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #5c5230;
  white-space: pre-wrap;
}

/* ---- Square card field ----------------------------------- */
#card-container {
  margin-top: 4px;
  min-height: 52px;
}
.sq-loading {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0;
}

/* ---- Button ---------------------------------------------- */
.pay-btn {
  width: 100%;
  margin-top: 22px;
  padding: 15px 18px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fdf8ec;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.pay-btn:hover:not(:disabled) { background: var(--green-dark); }
.pay-btn:active:not(:disabled) { transform: translateY(1px); }
.pay-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- Status messages ------------------------------------- */
.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  display: none;
}
.msg.error {
  display: block;
  background: #fbeae7;
  color: var(--error);
  border: 1px solid #f0c9c2;
}
.msg.success {
  display: block;
  background: #e8f3ec;
  color: var(--success);
  border: 1px solid #c4e2cf;
}
.msg.info {
  display: block;
  background: #f3eede;
  color: var(--gold-dark);
  border: 1px solid #e6d9b6;
}

/* ---- Footer / security note ------------------------------ */
.secure-note {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.page-footer {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---- States ---------------------------------------------- */
.hidden { display: none !important; }

.center-state {
  text-align: center;
  padding: 12px 0 6px;
}
.center-state .big {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 23px;
  color: var(--green);
  margin-bottom: 6px;
}

/* success check */
.check {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin: 0 auto 14px;
}
.receipt-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
}

/* spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(253, 248, 236, 0.4);
  border-top-color: #fdf8ec;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Admin page ------------------------------------------ */
.admin-card { max-width: 480px; }
.form-row { margin-bottom: 16px; }
input.text-field, select.text-field, textarea.text-field {
  width: 100%;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fcfbf7;
}
input.text-field:focus, select.text-field:focus, textarea.text-field:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
textarea.text-field {
  resize: vertical;
  min-height: 74px;
  line-height: 1.5;
}
.result-box {
  margin-top: 18px;
  padding: 14px;
  background: #f3eede;
  border: 1px solid #e6d9b6;
  border-radius: 9px;
  font-size: 13px;
  word-break: break-all;
}
.result-box .link-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  margin: 8px 0;
}
.copy-btn {
  background: var(--gold);
  color: #2c2418;
  border: none;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.copy-btn:hover { background: var(--gold-dark); }
.env-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: 2px;
}
.env-badge.sandbox { background: #f3eede; color: var(--gold-dark); }
.env-badge.production { background: #e8f3ec; color: var(--success); }
