/* ============================================================
   Winchester Quilt Block Trail — Gift Certificate System
   style.css — Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&family=Dancing+Script:wght@500;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: #f5f0e8;
  color: #3a3028;
  min-height: 100vh;
}

/* ── Page Wrapper ── */
.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ── Header ── */
.site-header {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-bottom: 2px solid #c8a96e;
  margin-bottom: 2.5rem;
}

.site-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #2c4a2e;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.site-header h2 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #8b6914;
  font-weight: 400;
}

/* ── Preview Image ── */
.cert-preview {
  margin-bottom: 2.5rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
}

.cert-preview img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Form Container ── */
.form-container {
  max-width: 720px;
  margin: 0 auto;
}

.gc-form h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #2c4a2e;
  margin-bottom: 0.5rem;
}

.form-intro {
  color: #6b5c45;
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* ── Fieldsets ── */
fieldset {
  border: 1.5px solid #c8a96e;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #fffdf7;
}

legend {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #2c4a2e;
  font-weight: 700;
  padding: 0 0.5rem;
}

/* ── Form Groups ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a4635;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d4b896;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  color: #3a3028;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2c4a2e;
  box-shadow: 0 0 0 3px rgba(44,74,46,0.12);
}

.required { color: #b5451b; font-weight: 400; }

/* ── Captcha ── */
.captcha-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.captcha-question {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0ece2;
  border: 1.5px solid #c8a96e;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c4a2e;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.captcha-group input[type="number"] {
  width: 90px;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid #d4b896;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #3a3028;
  background: #fff;
  text-align: center;
  -moz-appearance: textfield;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.captcha-group input[type="number"]::-webkit-inner-spin-button,
.captcha-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.captcha-group input[type="number"]:focus {
  outline: none;
  border-color: #2c4a2e;
  box-shadow: 0 0 0 3px rgba(44,74,46,0.12);
}

.captcha-label {
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a4635;
  margin-bottom: 0.5rem;
  display: block;
}

/* ── Submit Button ── */
.btn-submit {
  display: block;
  width: 100%;
  padding: 1rem;
  background: #2c4a2e;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 3px 12px rgba(44,74,46,0.25);
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: #1e3320;
  box-shadow: 0 5px 18px rgba(44,74,46,0.35);
}

.btn-submit:active { transform: translateY(1px); }

/* ── Errors ── */
.error-box {
  background: #fff3f0;
  border: 1.5px solid #e0a090;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #8b2c1a;
}

.error-box ul { padding-left: 1.25rem; margin-top: 0.4rem; }
.error-box li { margin-bottom: 0.25rem; font-size: 0.92rem; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  margin-top: 3rem;
  border-top: 1px solid #d4c4a0;
  font-size: 0.82rem;
  color: #8a7560;
  line-height: 1.8;
}

/* ============================================================
   CERTIFICATE PAGE  (process.php)
   ============================================================ */

/* ── Certificate Wrapper ── */
.cert-section {
  max-width: 900px;
  margin: 0 auto 2rem;
}

.cert-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: #2c4a2e;
  margin-bottom: 0.4rem;
  text-align: center;
}

.cert-section .cert-sub {
  text-align: center;
  color: #6b5c45;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

/* Printable certificate container — position:relative so overlay works */
.cert-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  line-height: 0; /* removes inline-block gap under image */
}

.cert-container img.cert-bg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.18);
}

/* ── Overlay Text ── */
/* Overlay for certificate ID (positions calibrated to 1024×682 px gc1.png) */
.cert-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

/* Certificate ID — larger bold text at the bottom centre */
.cert-id {
  position: absolute;
  bottom: 3.5%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Lato', sans-serif;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: bold;
  color: #6b5c45;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ── Success Banner ── */
.success-banner {
  background: #eef5ee;
  border: 1.5px solid #7aab7e;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  color: #1e4d22;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.success-banner strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }

/* ── Action Buttons ── */
.action-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: #2c4a2e;
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(44,74,46,0.22);
}

.btn-print:hover { background: #1e3320; box-shadow: 0 5px 16px rgba(44,74,46,0.32); }

.btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: #2c4a2e;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid #2c4a2e;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-new:hover { background: #eef5ee; }

/* ── Payment Section ── */
.payment-section {
  max-width: 640px;
  margin: 0 auto 2rem;
  background: #fffdf7;
  border: 2px solid #c8a96e;
  border-radius: 12px;
  padding: 2rem 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

.payment-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #2c4a2e;
  margin-bottom: 0.5rem;
}

.payment-section p {
  color: #5a4635;
  font-size: 0.97rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Payment icon */
.payment-icon {
  margin: 0 auto 1.25rem;
  width: 72px;
  height: 72px;
  background: #2c4a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-icon svg {
  width: 40px;
  height: 40px;
  fill: #fff;
}

.btn-pay {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #c8a96e 0%, #a07c3a 100%);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(160,124,58,0.40);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  letter-spacing: 0.02em;
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(160,124,58,0.50);
  filter: brightness(1.06);
}

.btn-pay:active { transform: translateY(0); }

.payment-note {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  color: #9a8870;
}

/* ── ID Display ── */
.cert-id-display {
  text-align: center;
  font-size: 0.82rem;
  color: #7a6650;
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
}

.cert-id-display strong {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  color: #2c4a2e;
  letter-spacing: 0.12em;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  @page {
    size: landscape;
    margin: 0.4in;
  }

  html, body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .site-header,
  .no-print,
  .action-row,
  .payment-section,
  .success-banner,
  .cert-id-display,
  footer {
    display: none !important;
  }

  .page-wrapper { padding: 0; margin: 0; max-width: none; }

  .cert-section {
    max-width: none;
    margin: 0;
  }

  .cert-section h2,
  .cert-section .cert-sub { display: none; }

  .cert-container {
    max-width: none;
    width: 100%;
    box-shadow: none;
  }

  .cert-container img.cert-bg {
    box-shadow: none;
    border-radius: 0;
  }

  .cert-id {
    font-size: 14pt !important;
    font-weight: bold !important;
  }
}
