.tierbook-events-carousel {
  margin: 2em 0;
  max-width: 100%;
}

.tierbook-events-carousel__title {
  margin: 0 0 1em;
  font-size: 1.5em;
}

.tierbook-events-carousel__viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.tierbook-events-carousel__track {
  display: flex;
  gap: 1.25em;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0.25em 0.25em 1em;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.tierbook-events-carousel__track::-webkit-scrollbar {
  height: 6px;
}

.tierbook-events-carousel__track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.tierbook-events-carousel__slide {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: start;
}

.tierbook-events-carousel__card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tierbook-events-carousel__media {
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
  overflow: hidden;
}

.tierbook-events-carousel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tierbook-events-carousel__media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5b5b5;
}

.tierbook-events-carousel__body {
  padding: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.tierbook-events-carousel__date {
  font-size: 0.8125em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.tierbook-events-carousel__name {
  margin: 0;
  font-size: 1.0625em;
  line-height: 1.35;
}

.tierbook-events-carousel__location {
  font-size: 0.875em;
  color: #6b6b6b;
}

.tierbook-events-carousel__nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #d7d7d7;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.tierbook-events-carousel__nav:hover {
  background: #f5f5f5;
}

.tierbook-events-carousel__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.tierbook-events-carousel-empty {
  color: #6b6b6b;
}

@media (max-width: 480px) {
  .tierbook-events-carousel__slide {
    width: 240px;
  }
}

/* ==========================================================================
 * Events showcase: layouts (carousel / grid / list), card styles (classic /
 * overlay / minimal), filters, and a button that is always legible.
 * --tbe-accent is the button color; --tbe-on-accent (black or white) is computed
 * server-side from it for contrast, so text can never end up dark-on-dark.
 * ========================================================================== */

.tierbook-events {
  --tbe-accent: #1b3d6d;
  --tbe-on-accent: #fff;
  --tbe-cols: 3;

  margin: 2em 0;
  max-width: 100%;
}

.tierbook-events [hidden] {
  display: none !important;
}

/* The call-to-action. Doubled class + :link/:visited + !important on color so theme
 * `a`, `a:visited` and `a:hover` rules can never turn its text dark on the accent. */
.tierbook-events .tierbook-events__cta,
.tierbook-events .tierbook-events__cta:link,
.tierbook-events .tierbook-events__cta:visited {
  display: inline-block;
  margin-top: auto;
  padding: 0.8em 1.1em;
  border: 0;
  border-radius: 6px;
  background: var(--tbe-accent);
  color: var(--tbe-on-accent) !important;
  font-size: 0.875em;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.tierbook-events .tierbook-events__cta:hover,
.tierbook-events .tierbook-events__cta:focus,
.tierbook-events .tierbook-events__cta:active {
  background: color-mix(in srgb, var(--tbe-accent) 82%, #000);
  color: var(--tbe-on-accent) !important;
  text-decoration: none;
}

.tierbook-events .tierbook-events__cta:focus-visible {
  outline: 2px solid var(--tbe-accent);
  outline-offset: 2px;
}

.tierbook-events-carousel__name {
  color: inherit;
}

/* ---------- Date badge (minimal cards + list rows) ---------- */

.tierbook-events__datebadge {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.6em;
  height: 3.6em;
  border-radius: 8px;
  background: var(--tbe-accent);
  color: var(--tbe-on-accent);
  line-height: 1;
}

.tierbook-events__datebadge-month {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tierbook-events__datebadge-day {
  margin-top: 0.15em;
  font-size: 1.35em;
  font-weight: 700;
}

/* ---------- Grid layout ---------- */

.tierbook-events__grid {
  display: grid;
  grid-template-columns: repeat(var(--tbe-cols), minmax(0, 1fr));
  gap: 1.25em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tierbook-events__item {
  margin: 0;
}

.tierbook-events__grid .tierbook-events-carousel__card {
  height: 100%;
}

@media (max-width: 900px) {
  .tierbook-events__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tierbook-events__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Card style: overlay (text over the image) ---------- */

.tierbook-events--style-overlay .tierbook-events-carousel__card {
  position: relative;
  min-height: 340px;
  border: 0;
  background: #14213d;
  color: #fff;
}

.tierbook-events--style-overlay .tierbook-events-carousel__media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background: #14213d;
}

.tierbook-events--style-overlay .tierbook-events-carousel__media-placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.tierbook-events--style-overlay .tierbook-events-carousel__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 16, 32, 0.96) 0%,
    rgba(10, 16, 32, 0.84) 42%,
    rgba(10, 16, 32, 0.4) 68%,
    rgba(10, 16, 32, 0) 88%
  );
  pointer-events: none;
}

.tierbook-events--style-overlay .tierbook-events-carousel__body {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.tierbook-events--style-overlay .tierbook-events-carousel__date,
.tierbook-events--style-overlay .tierbook-events-carousel__location {
  color: rgba(255, 255, 255, 0.86);
}

.tierbook-events--style-overlay .tierbook-events-carousel__name {
  color: #fff;
}

.tierbook-events--style-overlay .tierbook-events__cta {
  margin-top: 0.75em;
}

/* ---------- Card style: minimal (date badge, no image) ---------- */

.tierbook-events--style-minimal .tierbook-events-carousel__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1em;
  align-items: start;
}

.tierbook-events--style-minimal .tierbook-events__datebadge {
  grid-row: 1 / span 3;
}

.tierbook-events--style-minimal .tierbook-events__cta {
  grid-column: 1 / -1;
  margin-top: 0.9em;
}

/* ---------- List layout ---------- */

.tierbook-events__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tierbook-events__row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin: 0 0 0.75em;
  padding: 0.9em 1.1em;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tierbook-events__row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.tierbook-events__row-name {
  margin: 0 0 0.25em;
  color: inherit;
  font-size: 1.0625em;
  line-height: 1.3;
}

.tierbook-events__row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15em 1em;
  color: #5b6472;
  font-size: 0.875em;
}

.tierbook-events__row-date {
  font-weight: 600;
}

.tierbook-events__row-action {
  flex: 0 0 auto;
}

.tierbook-events__row-action .tierbook-events__cta {
  margin-top: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .tierbook-events__row {
    flex-wrap: wrap;
  }

  .tierbook-events__row-action {
    flex: 1 1 100%;
  }

  .tierbook-events__row-action .tierbook-events__cta {
    display: block;
  }
}

/* ---------- Filters ---------- */

.tierbook-events__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em 1em;
  align-items: flex-end;
  margin: 0 0 1.25em;
  padding: 1em;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #f6f7f9;
  color: #1f2937;
}

.tierbook-events__field {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 0.3em;
  min-width: 0;
}

.tierbook-events__field--search {
  flex: 2 1 240px;
}

.tierbook-events__label {
  color: #4b5563;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tierbook-events__filters input[type="search"],
.tierbook-events__filters select {
  width: 100%;
  min-height: 2.6em;
  padding: 0.5em 0.75em;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 0.9375em;
}

.tierbook-events__filters input:focus-visible,
.tierbook-events__filters select:focus-visible {
  outline: 2px solid var(--tbe-accent);
  outline-offset: 1px;
}

.tierbook-events .tierbook-events__clear {
  padding: 0.55em 0.9em;
  border: 1px solid #c9ced6;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 0.875em;
  font-weight: 600;
  cursor: pointer;
}

.tierbook-events .tierbook-events__clear:hover {
  background: #eef0f3;
  color: #1f2937;
}

.tierbook-events__count {
  flex: 1 0 100%;
  margin: 0;
  color: #4b5563;
  font-size: 0.875em;
}

.tierbook-events__none {
  padding: 1.5em;
  border: 1px dashed #c9ced6;
  border-radius: 10px;
  text-align: center;
  color: #4b5563;
}

/* Equal-height cards: the body stretches so the button always sits at the bottom edge. */
.tierbook-events .tierbook-events-carousel__body {
  flex: 1 1 auto;
}

/* Carousel arrows: theme button styles (borders, colors, radius) must not leak in. */
.tierbook-events .tierbook-events-carousel__nav {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  background: #fff;
  color: #333;
  box-shadow: none;
}

.tierbook-events .tierbook-events-carousel__nav:hover:not(:disabled),
.tierbook-events .tierbook-events-carousel__nav:focus-visible:not(:disabled) {
  border-color: var(--tbe-accent);
  background: var(--tbe-accent);
  color: var(--tbe-on-accent);
}

.tierbook-events .tierbook-events-carousel__nav svg {
  stroke: currentcolor;
}
