/* ------------------------------------------------
   EVENTS PANEL
--------------------------------------------------- */

.events-page .panel {
  margin-top: 1.5rem;
}

/* ------------------------------------------------
   EVENT GRID — 3 ACROSS
--------------------------------------------------- */

.section-events .events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1099px) {
  .section-events .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .section-events .events-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------
   EVENT CARD
--------------------------------------------------- */

.event-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* === EVENT CARD THUMBNAIL FIX === */
.event-card-image {
  width: 100%;
  max-height: 70px;
  height: auto;
  object-fit: contain;
}

.event-card:hover,
.js .event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.15);
}

.event-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------
   EVENT CARD HEADER — DATE | SEPARATOR | TITLE
--------------------------------------------------- */

.event-card-meta {
  display: flex;
  align-items: center;
}

/* DATE */
.event-card-date {
  text-align: center;
  min-width: 56px;
  padding: 0.35rem 0.5rem;
  margin-right: 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.event-card-month,
.event-card-day {
  display: block;
  font-weight: 700;
  color: #c62828; /* red */
}

.event-card-month {
  font-size: 1.02rem;
  letter-spacing: 0.06em;
}

.event-card-day {
  font-size: 2.1rem;
  line-height: 1;
}

/* SEPARATOR */
.event-card-separator {
  width: 1px;
  height: 42px;
  background: #000;
  margin-right: 1rem;
}

/* TITLE / LOCATION */
.event-card-details {
  flex: 1;
}

.event-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #000;
}

.event-card-location {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: #555;
}

/* DESCRIPTION */
.event-card-description {
  margin-top: 0.75rem;
  color: #333;
}

/* Bottom-right actions */
.event-card-actions {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
  width: 100%;
}

/* Store button (shown when event has a presale store) */
.event-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #ffc107;
  color: #031633;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,.12);
}

.event-store-btn:hover {
  filter: brightness(1.02);
}

.event-store-btn:focus-visible {
  outline: 2px solid rgba(3, 22, 51, 0.55);
  outline-offset: 2px;
}

/* See Details link */
.event-see-details {
  display: inline-block;
  margin-top: 0;
  font-weight: 600;
  color: #031633;
  text-decoration: underline;
}

/* ------------------------------------------------
   CPR FORM PANEL
--------------------------------------------------- */

.section-cpr-request .panel {
  margin-top: 1rem;
  padding: 2rem 2rem 2.5rem;
}

.cpr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cpr-header i {
  font-size: 2rem;
  color: #ff1111; /* red CPR heart */
}

/* Form Layout */
.form-row {
  display: flex;
  gap: 1rem;
}

.form-group {
  flex: 1;
}

/* Inputs */
form input,
form select,
form textarea {
  width: 100%;
  padding: 10px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  color: #000;
  background: #fff;
}

textarea {
  height: auto;
  min-height: 140px;
}

button[type="submit"] {
  width: 100%;
  margin-top: 1rem;
  padding: 12px;
  background: #ffc107;
  color: #031633;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
}

/* ==================================================
   CPR REQUEST SECTION — FULL, NATIVE FORM STYLES
================================================== */

.events-page .section-cpr-request {
  margin-top: 3rem;
}

/* Panel */
.events-page .section-cpr-request .panel {
  padding: 2rem 2rem 2.5rem;
}

/* -----------------------------------------------
   HEADER
------------------------------------------------ */

.events-page .section-cpr-request .cpr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.events-page .section-cpr-request .cpr-logo {
  max-height: 60px;
}

/* Intro text */
.events-page .section-cpr-request .events-page-intro {
  max-width: 800px;
  margin-bottom: 1.5rem;
  color: #333;
}

/* -----------------------------------------------
   FORM LAYOUT
------------------------------------------------ */

.events-page .section-cpr-request form {
  margin-top: 1.25rem;
}

.events-page .section-cpr-request .form-row {
  display: flex;
  gap: 1rem;
}

@media (max-width: 640px) {
  .events-page .section-cpr-request .form-row {
    flex-direction: column;
  }
}

.events-page .section-cpr-request .form-group {
  flex: 1;
  margin-bottom: 1rem;
}

/* Labels */
.events-page .section-cpr-request label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
}

/* -----------------------------------------------
   INPUTS — TRUE NATIVE HEIGHT
------------------------------------------------ */

/*
  IMPORTANT:
  - No height
  - No vertical padding
  - No min-height
  - Normal line-height
*/

.events-page .section-cpr-request input,
.events-page .section-cpr-request select,
.events-page .section-cpr-request textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  line-height: normal;

  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0;
  padding-bottom: 0;

  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #000;

  min-height: unset;
  box-sizing: border-box;
}

/* Textarea gets natural vertical space */
.events-page .section-cpr-request textarea {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  min-height: 6rem;
  resize: vertical;
}

/* -----------------------------------------------
   FOCUS STATES (SUBTLE, ACCESSIBLE)
------------------------------------------------ */

.events-page .section-cpr-request input:focus,
.events-page .section-cpr-request select:focus,
.events-page .section-cpr-request textarea:focus {
  outline: none;
  border-color: #031633;
  box-shadow: 0 0 0 2px rgba(3, 22, 51, 0.15);
}

/* -----------------------------------------------
   SUBMIT BUTTON
------------------------------------------------ */

.events-page .section-cpr-request button[type="submit"] {
  margin-top: 1rem;
  min-height: 42px;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  background: #ffc107;
  color: #031633;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.events-page .section-cpr-request button[type="submit"]:hover {
  background: #e0a800;
}

/* -----------------------------------------------
   PRIVACY DISCLAIMER
------------------------------------------------ */

.events-page .section-cpr-request .privacy-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #f64545;
}

/* ==================================================
   CPR REQUEST — SMALLER PANEL, SAME FIELDS
================================================== */

/* Make the CPR panel narrower + tighter */
.section-cpr-request .panel {
  max-width: 900px;          /* was 1100px */
  padding: 1.5rem 1.75rem;   /* smaller background box */
}

/* Reduce vertical breathing room between fields */
.section-cpr-request .form-row {
  gap: 0.75rem;
}

.section-cpr-request .form-group {
  margin-bottom: 0.65rem;
}

/* Keep labels EXACT same size (explicitly) */
.section-cpr-request label {
  font-size: inherit;
}

/* Keep inputs native — no size overrides */
.section-cpr-request input,
.section-cpr-request select,
.section-cpr-request textarea {
  font-size: inherit;
}

/* Slightly tighter textarea without changing font */
.section-cpr-request textarea {
  min-height: 5rem;
}

/* Button: visually lighter, not smaller text */
.section-cpr-request button[type="submit"] {
  min-height: 42px;
  padding: 0 1rem;
}

/* Privacy text closer to form */
.section-cpr-request .privacy-disclaimer {
  margin-top: 0.5rem;
}

/* ==================================================
   EVENT MODAL — FIXED + GUARANTEED VISIBLE
   (keep this at the very bottom)
================================================== */

.event-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.event-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* The modal box */
.event-modal {
  background: #ffffff;
  color: #000000;
  width: 90%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 14px;
  position: relative;
  box-sizing: border-box;

  transform: translateY(10px);
  opacity: 0.98;
  transition: transform 220ms ease, opacity 220ms ease;
}

.event-modal-backdrop.open .event-modal {
  transform: translateY(0);
  opacity: 1;
}

/* Close button */
.event-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #000;
}

/* Inner layout */
.event-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Image */
.event-modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Text blocks */
.event-modal-date {
  font-weight: 700;
  color: #c62828;
  margin-bottom: 0.25rem;
}

.event-modal-title {
  margin: 0;
  font-size: 1.5rem;
  color: #031633;
}

.event-modal-location {
  margin: 0.25rem 0 0.75rem;
  color: #555;
}

.event-modal-description {
  color: #222;
  line-height: 1.45;
}

.event-modal-store-link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #ffc107;
  color: #031633;
  text-decoration: none;
  font-weight: 700;
  width: 100%;
}

.event-modal-store-link:hover {
  filter: brightness(1.05);
}
