/* Events page. Loaded only by templates/events.html.twig, on top of
   custom.css -- uses its :root variables (--cardinal, --gold, --surface,
   --border, --radius, --radius-lg, --text, --text-secondary). */

.events-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* One event post */
.event-post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.event-post-hero {
  display: block;
  width: 100%;
  height: auto;
}

.event-post-body {
  padding: 1.75rem 2rem 2rem;
}

.event-post-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 1.25rem;
}

/* Blocks */
.event-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
}

.event-paragraph {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 1.1rem;
}
.event-paragraph a,
.event-list a,
.event-card-body a,
.event-announcement-body a {
  color: var(--cardinal);
  text-decoration: underline;
}

.event-figure {
  margin: 0 0 1.25rem;
  text-align: center;
}
.event-figure a { display: inline-block; }
.event-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.event-button-row { margin: 0.5rem 0 1.25rem; }

.event-list {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.event-list li { margin-bottom: 0.4rem; }

.event-divider {
  border: 0;
  border-top: 3px solid var(--gold);
  margin: 1.75rem 0;
}

/* Event block: date badge, name, location, details */
.event-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.25rem;
}
.event-card-date {
  display: inline-block;
  background: var(--cardinal-deep);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.event-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.35rem;
}
.event-card-location {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 0 0.6rem;
}
.event-card-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Announcement block */
.event-announcement {
  background: var(--gold-pale);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.25rem;
}
.event-announcement-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.4rem;
}
.event-announcement-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Ticket cart */
.event-cart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.5rem;
  margin: 1.75rem 0 0.5rem;
  background: var(--bg);
}

.event-cart-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.event-cart-intro {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 0.9rem;
}
.event-cart-intro a {
  color: var(--cardinal);
  text-decoration: underline;
}

.event-cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Two columns, two rows per item:
     name            [- n +]
     desc / unit     line total                                     */
.event-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  row-gap: 0.15rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.event-cart-item:last-child { border-bottom: 0; }

.event-cart-item-name {
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.event-cart-item-meta {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.event-cart-line {
  justify-self: end;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cardinal);
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}

/* Quantity stepper */
.event-cart-qty {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.event-qty-btn {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.event-qty-btn:hover { background: var(--gold-pale); }
.event-qty-input {
  width: 2.75rem;
  height: 2.1rem;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.event-qty-input::-webkit-outer-spin-button,
.event-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.event-cart-item.is-selected .event-cart-qty { border-color: var(--cardinal); }

/* Totals */
.event-cart-totals {
  border-top: 2px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 1rem;
}
.event-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.96rem;
  color: var(--text-secondary);
}
.event-cart-row span:last-child { font-variant-numeric: tabular-nums; }

.event-cart-row--total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.event-cart-fee {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0.7rem 0 0;
  cursor: pointer;
}
.event-cart-fee input {
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
}
.event-cart-fee-amount { font-weight: 600; }

/* Reuses .btn-paypal from custom.css (the payments page's PayPal blue), so
   both checkouts on the site carry the same treatment. That rule is
   inline-flex, hence the explicit centring once it goes full width. */
.event-cart-checkout {
  width: 100%;
  justify-content: center;
  margin-top: 1.1rem;
}
.event-cart-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.event-cart-paypal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.7rem 0 0;
}
/* Height-constrained with auto width so the mark sits correctly whether the
   asset is the monogram or the full wordmark. */
.event-cart-paypal-logo {
  height: 18px;
  width: auto;
  display: block;
}

.event-cart-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin: 0.45rem 0 0;
}

/* While the browser is waiting on PayPal. Disabled already dims the button,
   so this only has to stop it looking like a dead control. */
.event-cart-checkout.is-busy {
  opacity: 0.8;
  cursor: progress;
}

.event-cart-error {
  margin: 0.7rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  background: #fdecea;
  border: 1px solid #f5c2bc;
  color: #8a1c13;
  font-size: 0.85rem;
  text-align: center;
}
.event-cart-error[hidden] { display: none; }

/* ---- Order confirmation page (/events/complete) ---- */

.event-receipt {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem 1.5rem 1.5rem;
}

.event-receipt-lead {
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
}

/* The order number is the thing somebody reads out at the check-in table,
   so it gets the emphasis rather than the totals. */
.event-receipt-ref {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1.5rem;
}
.event-receipt-ref-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.event-receipt-ref-code {
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.event-receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}
.event-receipt-table th,
.event-receipt-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.event-receipt-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.event-receipt-table .is-num { text-align: right; }
.event-receipt-table tfoot td {
  border-bottom: none;
  border-top: 2px solid var(--text-primary);
  font-weight: 700;
}

.event-receipt-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.event-receipt-back { margin: 0; }

@media (max-width: 480px) {
  .event-cart { padding: 1.15rem 1rem 1.25rem; }
  .event-cart-item {
    grid-template-columns: 1fr auto;
    row-gap: 0.35rem;
  }
}

/* Nothing published */
.events-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}
.events-empty p { margin: 0; }

/* Button to the calendar, below everything */
.events-calendar-cta {
  margin-top: 2.5rem;
  text-align: center;
}

@media (max-width: 600px) {
  .events-wrap { padding: 2rem 1.25rem 4rem; }
  .event-post-body { padding: 1.4rem 1.25rem 1.6rem; }
}

/* Sandbox-only diagnostic on the order page. Deliberately plain and
   unmissable -- it should look like debug output, not site copy. */
.event-receipt-debug {
  margin: 0 0 1.25rem;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  background: #fff8e1;
  border: 1px solid #e8d08a;
  color: #6b5200;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-word;
}
