/*
 * T4P Shared Design System
 * Used by: event-calendar-pro + t4p-club-directory
 * Both plugins enqueue handle 't4p-shared-styles' — WordPress loads once.
 *
 * Design tokens from Figma file jGQaZJDoFWCFVU7g1iS894
 */

/* ============================================================
   UTILITIES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */

:root {
  /* --- Colors --- */
  --t4p-accent: #FF00FF;
  --t4p-accent-dark: #CC00CC;
  --t4p-accent-hover: rgba(255, 0, 255, 0.55);
  --t4p-secondary: #9900FF;
  --t4p-alternate: rgba(100, 0, 194, 0.8);

  --t4p-bg-container: rgba(26, 26, 26, 0.9);
  --t4p-bg-dark: rgba(26, 26, 26, 0.8);
  --t4p-bg-medium: rgba(255, 255, 255, 0.08);
  --t4p-bg-card: rgba(255, 255, 255, 0.1);
  /* Figma: glass card */
  --t4p-bg-glass: rgba(255, 255, 255, 0.1);
  /* Figma: glass panel */
  --t4p-bg-input: #2c2c2c;
  /* Figma: input background */

  --t4p-border-subtle: rgba(255, 255, 255, 0.12);
  --t4p-border-glass: rgba(255, 255, 255, 0.2);
  /* Figma: glass border */
  --t4p-border-input: #757575;
  /* Figma: input border */
  --t4p-border-card: rgba(255, 255, 255, 0.2);
  /* Figma: card border */
  --t4p-border-panel: rgba(255, 255, 255, 0.2);

  --t4p-text-primary: #f7f7f7;
  --t4p-text-muted: #999;
  --t4p-text-faint: #888;

  --t4p-success: #4CAF50;
  --t4p-facebook: #1877f2;
  --t4p-twitter: #1da1f2;
  --t4p-bluesky: #00bfff;

  /* --- Spacing (4px grid) --- */
  --t4p-space-1: 0.25rem;
  /* 4px */
  --t4p-space-2: 0.5rem;
  /* 8px */
  --t4p-space-3: 0.75rem;
  /* 12px */
  --t4p-space-4: 1rem;
  /* 16px */
  --t4p-space-6: 1.5rem;
  /* 24px */
  --t4p-space-8: 2rem;
  /* 32px */
  --t4p-space-12: 3rem;
  /* 48px */
  --t4p-space-16: 4rem;
  /* 64px */

  /* --- Border radius --- */
  --t4p-radius-sm: 4px;
  --t4p-radius: 6px;
  --t4p-radius-md: 8px;
  --t4p-radius-lg: 12px;
  --t4p-radius-pill: 50px;

  /* --- Typography --- */
  --t4p-font-body: -apple-system, BlinkMacSystemFont, 'Open Sans', 'Roboto', sans-serif;
  --t4p-font-heading: 'Poppins', 'Roboto', sans-serif;
  --t4p-font-icon: 'Font Awesome 6 Free';

  --t4p-text-xs: 0.75rem;
  /* 12px */
  --t4p-text-sm: 0.875rem;
  /* 14px */
  --t4p-text-base: 1rem;
  /* 16px */
  --t4p-text-lg: 1.125rem;
  /* 18px */
  --t4p-text-xl: 1.25rem;
  /* 20px */

  /* --- Shadows --- */
  --t4p-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --t4p-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --t4p-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* --- Transitions --- */
  --t4p-transition: 150ms ease-in-out;
  --t4p-transition-slow: 200ms ease-in-out;
}


/* ============================================================
   FILTER SIDEBAR
   ============================================================ */

/* ============================================================
   FILTER SIDEBAR
   Figma node 2037:2267
   ============================================================ */

.t4p-filter-sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  gap: 16px;
  width: 250px;
  flex: 0 0 250px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  position: sticky;
  top: var(--t4p-space-8);
  align-self: flex-start;
}

/* Chevron — hidden on desktop, shown only on mobile */
/* Specificity must beat FA's multi-class selector (.fa, .fa-solid etc) */
.t4p-filter-header .t4p-filter-chevron {
  display: none;
}

/* --- Header --- */

.t4p-filter-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 0 16px;
  gap: 10px;
  border-bottom: 1px solid #FF00FF;
  align-self: stretch;
  cursor: default;
}

.t4p-filter-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 27px;
  color: #ffffff;
  margin: 0;
}

/* --- Form --- */

.t4p-filter-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  width: 100%;
}

/* --- Field groups --- */

.t4p-filter-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  width: 100%;
}

.t4p-filter-field label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 140%;
  color: #b3b3b3;
  align-self: stretch;
}

/* --- Inputs --- */

.t4p-filter-field input {
  display: block;
  padding: 6px 16px 6px 8px;
  height: 28px;
  background: #2c2c2c;
  border: 1px solid #757575;
  border-radius: 8px;
  color: #b3b3b3;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 100%;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--t4p-transition);
}

.t4p-filter-field input:focus {
  outline: none;
  border-color: var(--t4p-accent);
  color: #ffffff;
}

/* --- Selects --- */

.t4p-filter-field select {
  display: block;
  padding: 6px 2rem 6px 8px;
  height: 28px;
  background: #2c2c2c;
  border: 1px solid #757575;
  border-radius: 8px;
  color: #b3b3b3;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 100%;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b3b3b3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color var(--t4p-transition);
}

.t4p-filter-field select:focus {
  outline: none;
  border-color: var(--t4p-accent);
  color: #ffffff;
}

.t4p-filter-field select option {
  background: #2c2c2c;
  color: #f7f7f7;
}

/* --- CTA row --- */

.t4p-filter-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  align-self: stretch;
  width: 100%;
}

.t4p-filter-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  height: 42px;
  box-sizing: border-box;
  background: #FF00FF;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  transition: opacity var(--t4p-transition);
  white-space: nowrap;
}

.t4p-filter-btn .ecp-btn-icon {
  display: none;
}

.t4p-filter-btn:hover {
  opacity: 0.85;
}

.t4p-clear-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  gap: 20px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #FF00FF;
  border-radius: 12px;
  background: transparent;
  color: #FF00FF;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t4p-transition), color var(--t4p-transition);
}

.t4p-clear-btn .ecp-btn-icon {
  display: none;
}

.t4p-clear-btn:hover {
  background: rgba(255, 0, 255, 0.1);
  color: var(--t4p-accent);
}

/* --- Active filters --- */

.t4p-active-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
}

.t4p-active-filters__label {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
}

.t4p-active-filters__tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
}

.t4p-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 0, 255, 0.4);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: #f5f5f5;
  white-space: nowrap;
}

.t4p-filter-tag__remove {
  color: #f5f5f5;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.t4p-filter-tag__remove:hover {
  color: #ffffff;
}


/* ============================================================
   LIST CONTROLS BAR
   ============================================================ */

.t4p-list-controls {
  display: flex;
  align-items: center;
  gap: var(--t4p-space-4);
  margin-bottom: var(--t4p-space-4);
  flex-wrap: wrap;
}

.t4p-results-count {
  color: var(--t4p-text-faint);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
}

.t4p-results-count strong {
  color: var(--t4p-text-primary);
}

.t4p-sort-selector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.t4p-sort-selector label {
  font-size: 0.78rem;
  color: var(--t4p-text-faint);
}

.t4p-sort-select {
  width: auto;
  padding: 0.35rem 1.8rem 0.35rem 0.5rem;
  font-size: 0.82rem;
}


/* ============================================================
   CARDS — Grid Layout
   ============================================================ */

.t4p-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
}

.t4p-card {
  background: var(--t4p-bg-card);
  /* Figma: rgba(255,255,255,0.1) */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--t4p-border-glass);
  /* Figma: rgba(255,255,255,0.2) */
  border-radius: var(--t4p-radius-lg);
  /* Figma: 12px */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform var(--t4p-transition), border-color var(--t4p-transition);
}

.t4p-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 255, 0.6);
}

/* --- Club card image area: padded logo on dark bg --- */
.t4p-card-img-link {
  display: block;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
}

.t4p-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--t4p-space-8);
  /* Figma: 32px padding on club logo */
  box-sizing: border-box;
  transition: transform 0.3s;
}

.t4p-card:hover .t4p-card-img {
  transform: scale(1.04);
}

/* --- Event card image wrap: flex column, badges on top, image fills rest --- */
.t4p-card-img-wrap {
  display: flex;
  flex-direction: column;
  height: 350px;
  min-height: 300px;
  max-height: 350px;
  overflow: hidden;
  border-radius: var(--t4p-radius-md) var(--t4p-radius-md) 0 0;
  flex-shrink: 0;
}

/* Badges row: full width, sits above image — Figma: p-[4px], rounded top corners */
.t4p-single-meta-header {
  display: flex;
  align-items: baseline;
  width: 100%;
}

.t4p-single-meta-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.t4p-single-meta-header .t4p-card-badges {
  flex: 1 0 0;
  justify-content: flex-end;
  padding: 0 0 0 8px;
  align-items: baseline;
}

.t4p-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 4px;
  flex-shrink: 0;
  width: 100%;
  border-radius: var(--t4p-radius-md) var(--t4p-radius-md) 0 0;
}

/* Badge — Figma node 2063:1844 */
.t4p-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #ff00ff88;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  border-radius: 8px;
  line-height: 1;
  white-space: nowrap;
}

/* Image fills remaining space below badges */
.t4p-card-img-wrap a {
  display: block;
  flex: 1 0 0;
  min-height: 1px;
  position: relative;
  overflow: hidden;
}

.t4p-card-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.t4p-card:hover .t4p-card-img-wrap img {
  transform: scale(1.04);
}

/* --- Club card image wrap: padded logo container, no full-bleed --- */
.t4p-card-img-wrap--logo {
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.t4p-card-img-wrap--logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  flex: unset;
  position: static;
}

.t4p-card-img-wrap--logo img {
  position: static;
  inset: unset;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.t4p-card--club:hover .t4p-card-img-wrap--logo img {
  transform: scale(1.04);
}

/* --- Tags: SEO only, hidden visually --- */
.t4p-card-tags {
  display: none;
}

/* --- Date badge overlaid on image --- */
.t4p-card-date-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--t4p-radius-sm);
  padding: 4px 8px;
  text-align: center;
  line-height: 1.2;
  z-index: 2;
}

.t4p-date-month {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--t4p-accent);
  font-weight: 600;
}

.t4p-date-day {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* --- Card body (below image) --- */

/* Card body: flex column, no padding, no background — children handle their own spacing */
.t4p-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  margin: 0;
}

/* Title container: flex row, 60px tall, px 16px py 8px, gap 16px — Figma */
.t4p-card-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 16px;
  gap: 16px;
  height: 60px;
  background: rgba(0, 0, 0, 0.2);
  flex: none;
  align-self: stretch;
  margin: 0;
}

/* Title text: Open Sans Bold 16px, line-height 22px, flex-grow 1 */
.t4p-card-title a {
  flex: 1 0 0;
  font-family: 'Open Sans', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  color: #ffffff;
  text-decoration: none;
  transition: color var(--t4p-transition);
}

.t4p-card-title a:hover {
  color: var(--t4p-accent);
}

/* Arrow: Font Awesome angle-right */
.t4p-card-title::after {
  content: '\f105';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  color: var(--t4p-accent);
  flex-shrink: 0;
  display: block;
}

/* Metadata container: flex column, padding 8px 16px, gap 8px — Figma */
.t4p-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 16px;
  gap: 8px;
  flex: none;
  align-self: stretch;
}

/* Each meta row: flex row, gap 10px, no padding — Figma */
.t4p-meta-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex: none;
  flex-wrap: wrap;
}

.t4p-meta-row strong {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  color: #ffffff;
}

.t4p-meta-row em,
.t4p-meta-details em {
  display: block;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 19px;
  color: #b3b3b3;
}

/* Icon wrapper: flex column, padding 4px — Figma (calendar: 22x23, location: 20x24) */
.t4p-meta-icon {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 4px;
  flex: none;
}

.t4p-meta-icon i {
  color: var(--t4p-accent);
  /* Figma: #FF00FF */
  font-size: 14px;
  display: block;
}

/* Meta text: Open Sans Regular 14px, line-height 19px, white — Figma */
.t4p-meta-row>p,
.t4p-meta-row>strong,
.t4p-meta-row>span {
  font-family: 'Open Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 19px;
  color: #ffffff;
  flex: none;
}

.t4p-meta-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
}

.t4p-meta-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  color: #ffffff;
  display: block;
}

.t4p-meta-subtitle {
  color: #b3b3b3;
  font-size: 13px;
}

.t4p-meta-country {
  color: #b3b3b3;
  font-size: 13px;
}

.t4p-meta-club {
  font-size: 12px;
  color: #b3b3b3;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Promoter row --- */
.t4p-card-promoter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--t4p-space-2);
  font-size: 13px;
  color: #b3b3b3;
}

.t4p-promoter-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--t4p-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --- Read more link --- */
.t4p-card-read-more {
  color: var(--t4p-accent);
  font-size: 13px;
  text-decoration: none;
  margin-top: var(--t4p-space-2);
  transition: color var(--t4p-transition);
}

.t4p-card-read-more:hover {
  color: var(--t4p-accent-dark);
}


.t4p-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--t4p-accent);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: var(--t4p-radius-lg);
  /* Figma: 12px */
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--t4p-transition);
  align-self: flex-start;
  margin-top: var(--t4p-space-2);
}

.t4p-card-btn:hover {
  background: var(--t4p-accent-dark);
  color: #fff;
}

/* ============================================================
   SINGLE PAGE — Panel Blocks
   (used on both single-event and single-club pages)
   ============================================================ */

.t4p-panel {
  background: var(--t4p-bg-medium);
  border: 1px solid var(--t4p-border-panel);
  border-radius: var(--t4p-radius-md);
  padding: var(--t4p-space-8);
  overflow: hidden;
  box-shadow: var(--t4p-shadow-sm);
  margin-bottom: var(--t4p-space-4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.t4p-panel--compact {
  padding: var(--t4p-space-6) var(--t4p-space-8) var(--t4p-space-8);
}

.t4p-panel h3 {
  font-size: var(--t4p-text-lg);
  font-weight: 600;
  color: #fff;
  margin: 0 0 var(--t4p-space-4) 0;
  padding-bottom: var(--t4p-space-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.t4p-panel p,
.t4p-panel li {
  color: #fff;
  line-height: 1.625;
}

/* Single page two-column layout */

.t4p-single-layout {
  display: flex;
  gap: var(--t4p-space-6);
  align-items: flex-start;
}

.t4p-single-image-col {
  flex: 0 0 45%;
  max-width: 45%;
  border-radius: var(--t4p-radius-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(100, 0, 194, 0.3);
}

.t4p-single-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  padding: var(--t4p-space-4);
  box-sizing: border-box;
}

.t4p-single-boxes {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--t4p-space-4);
}

/* Back link */

.t4p-back-link {
  margin: 0 0 var(--t4p-space-4);
}

.t4p-back-link a {
  color: var(--t4p-alternate);
  text-decoration: none;
  font-size: 0.83rem;
  transition: color var(--t4p-transition);
  background-color: rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: var(--t4p-radius-pill);
}

.t4p-back-link a:hover {
  color: var(--t4p-secondary);
}

/* Single event wrapper */

.t4p-single-event {
  display: flex;
  flex-direction: column;
  gap: var(--t4p-space-4);
}

/* Badges row at top of single event */
.t4p-single-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  background: none;
  border-radius: 0;
}

/* Meta panel: reuse card-meta rows */
.t4p-single-meta-panel .t4p-card-meta {
  display: flex;
  flex-direction: column;
  gap: var(--t4p-space-4);
  margin: 0;
}

.t4p-single-meta-panel .t4p-meta-row {
  display: flex;
  align-items: flex-start;
  gap: var(--t4p-space-3);
}

.t4p-single-meta-panel .t4p-meta-icon {
  color: var(--t4p-accent);
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  padding-top: 2px;
}

.t4p-single-meta-panel .t4p-meta-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t4p-single-meta-panel .t4p-meta-title {
  color: var(--t4p-text-primary);
  font-weight: 600;
}

.t4p-single-meta-panel .t4p-meta-label {
  color: var(--t4p-text-faint);
  font-size: 0.875rem;
}

/* Tags inside meta panel */
.t4p-single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--t4p-space-4);
  padding-top: var(--t4p-space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Description panel */
.t4p-single-description h3 {
  margin-top: 0;
}

.t4p-single-cta {
  margin-top: var(--t4p-space-6);
}

/* Organizer panel */
.t4p-organizer-name {
  color: var(--t4p-text-primary);
  font-size: var(--t4p-text-base);
  font-weight: 600;
  margin: 0 0 var(--t4p-space-3);
}

.t4p-organizer-bio {
  color: var(--t4p-text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--t4p-space-4);
}

/* Copy email button: looks like text */
.t4p-copy-email {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

/* Contact grid inside panel */

.t4p-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--t4p-space-4) var(--t4p-space-8);
}

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

/* Suppress empty <p> tags injected by wpautop inside meta blocks */
.t4p-card-meta p:empty,
.t4p-meta-row p:empty {
  display: none;
}

.t4p-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t4p-text-base);
  color: #fff;
}

.t4p-contact-item i {
  color: var(--t4p-accent);
  font-size: var(--t4p-text-base);
  flex-shrink: 0;
}

.t4p-strip-link {
  color: #fff;
  text-decoration: none;
  transition: color var(--t4p-transition);
}

.t4p-strip-link:hover {
  color: var(--t4p-accent);
}


/* ============================================================
   ACTIVE FILTER TAGS
   ============================================================ */

.t4p-active-filters {
  margin-top: var(--t4p-space-4);
  padding-top: var(--t4p-space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.t4p-active-filters__title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
  margin-bottom: var(--t4p-space-2);
}

.t4p-active-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.t4p-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--t4p-space-1);
  background: rgba(255, 0, 255, 0.25);
  border: 1px solid rgba(255, 0, 255, 0.6);
  border-radius: var(--t4p-radius);
  padding: var(--t4p-space-1) var(--t4p-space-2);
  font-size: var(--t4p-text-xs);
  font-weight: 500;
  color: #fff;
  line-height: 1.3;
}

.t4p-filter-tag__label {
  opacity: 0.8;
}

.t4p-filter-tag__value {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t4p-filter-tag__remove {
  color: inherit;
  text-decoration: none;
  font-size: 1.2em;
  line-height: 1;
  padding: 0 0.1rem;
  opacity: 0.7;
  transition: opacity var(--t4p-transition);
}

.t4p-filter-tag__remove:hover {
  opacity: 1;
  color: inherit;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.t4p-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--t4p-space-2);
  border: none;
  border-radius: var(--t4p-radius);
  padding: var(--t4p-space-2) var(--t4p-space-4);
  font-size: var(--t4p-text-sm);
  font-weight: 500;
  font-family: var(--t4p-font-heading);
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--t4p-transition);
}

.t4p-btn--primary {
  background-color: var(--t4p-accent);
  color: #fff;
}

.t4p-btn--primary:hover {
  opacity: 0.85;
  color: #fff;
}

.t4p-btn--outline {
  background: transparent;
  border: 1px solid #757575;
  color: #757575;
}

.t4p-btn--outline:hover {
  background: #757575;
  color: #fff;
}


/* ============================================================
   SOCIAL SHARING BUTTONS
   ============================================================ */

.t4p-social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--t4p-space-2);
}

.t4p-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--t4p-space-2) var(--t4p-space-4);
  border-radius: var(--t4p-radius);
  font-size: var(--t4p-text-sm);
  font-weight: 600;
  font-family: var(--t4p-font-heading);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity var(--t4p-transition), transform var(--t4p-transition);
  line-height: 1.4;
}

.t4p-social-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.t4p-social-facebook {
  background: var(--t4p-facebook);
  color: #fff;
}

.t4p-social-twitter {
  background: var(--t4p-twitter);
  color: #fff;
}

.t4p-social-bluesky {
  background: var(--t4p-bluesky);
  color: #fff;
}

.t4p-copy-link {
  background: transparent;
  border-color: #757575;
  color: #757575;
}

.t4p-copy-link.copied {
  background: rgba(0, 200, 100, 0.2);
  border-color: rgba(0, 200, 100, 0.5);
  color: #4ade80;
}


/* ============================================================
   PAGINATION
   ============================================================ */

.t4p-pagination {
  margin-top: var(--t4p-space-8);
  width: 100%;
}

.t4p-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.t4p-pagination ul.page-numbers li {
  display: contents;
}

/* All page-number elements: base style */
.t4p-pagination ul.page-numbers li a.page-numbers,
.t4p-pagination ul.page-numbers li span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--t4p-font-body, 'Inter', sans-serif);
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  border: 1px solid transparent;
  background: #2c2c2c;
  color: #b3b3b3;
  flex-shrink: 0;
}

/* Current page */
.t4p-pagination ul.page-numbers li span.page-numbers.current {
  background: rgba(255, 0, 255, 0.2);
  border-color: #ff00ff;
  color: #ff00ff;
  font-weight: 400;
}

/* Hover on regular page links */
.t4p-pagination ul.page-numbers li a.page-numbers:hover {
  background: rgba(255, 0, 255, 0.12);
  border-color: #ff00ff;
  color: #ff00ff;
}

/* Previous — left edge */
.t4p-pagination ul.page-numbers li a.page-numbers.prev {
  background: transparent;
  border-color: #ff00ff;
  color: #ff00ff;
  margin-right: auto;
}

.t4p-pagination ul.page-numbers li a.page-numbers.prev:hover {
  background: rgba(255, 0, 255, 0.12);
}

/* Next — right edge */
.t4p-pagination ul.page-numbers li a.page-numbers.next {
  background: transparent;
  border-color: #ff00ff;
  color: #ff00ff;
  margin-left: auto;
}

.t4p-pagination ul.page-numbers li a.page-numbers.next:hover {
  background: rgba(255, 0, 255, 0.12);
}

/* Mobile: hide page numbers, show only prev/next */
@media (max-width: 767px) {

  .t4p-pagination ul.page-numbers li a.page-numbers:not(.prev):not(.next),
  .t4p-pagination ul.page-numbers li span.page-numbers:not(.dots) {
    display: none;
  }

  .t4p-pagination ul.page-numbers li span.page-numbers.dots {
    display: none;
  }

  .t4p-pagination ul.page-numbers li a.page-numbers.prev,
  .t4p-pagination ul.page-numbers li a.page-numbers.next {
    flex: 1;
    justify-content: center;
    margin: 0;
  }
}


/* ============================================================
   NO RESULTS
   ============================================================ */

.t4p-no-results {
  text-align: center;
  padding: var(--t4p-space-12) var(--t4p-space-4);
  color: #aaa;
}

.t4p-no-results-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: var(--t4p-space-4);
  filter: grayscale(1) opacity(0.4);
}

.t4p-no-results-title {
  font-family: var(--t4p-font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--t4p-accent);
  margin: 0 0 var(--t4p-space-4);
  padding-bottom: var(--t4p-space-3);
  border-bottom: 1px solid var(--t4p-border-subtle);
}

.t4p-no-results-desc {
  font-size: 0.9rem;
  margin: 0 0 var(--t4p-space-6);
}


/* ============================================================
   MOBILE ACCORDION (filter sidebar)
   ============================================================ */

@media (max-width: 767px) {
  .t4p-filter-sidebar {
    position: static;
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box;
    gap: 0;
  }

  /* Header: bare row — no background, no border, no blur */
  .t4p-filter-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    cursor: pointer;
    width: 100%;
    gap: 0;
  }

  .t4p-filter-title {
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 0;
    line-height: 1.2;
  }

  /* Remove the CSS pseudo-element chevron — FA icon used instead */
  .t4p-filter-header::after {
    content: none;
  }

  /* FA chevron icon — show on mobile */
  .t4p-filter-header .t4p-filter-chevron {
    display: inline;
    color: var(--t4p-accent);
    font-size: 16px;
    transition: transform var(--t4p-transition);
    flex-shrink: 0;
  }

  .t4p-filter-header.t4p-collapsed .t4p-filter-chevron {
    transform: rotate(-180deg);
  }

  /* Form slides in/out */
  .t4p-filter-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--t4p-transition-slow), opacity var(--t4p-transition-slow);
  }

  .t4p-filter-form.t4p-filter-expanded {
    max-height: 9999px;
    opacity: 1;
    overflow: visible;
    padding-top: var(--t4p-space-4);
  }

  /* Fix input/select overflow on mobile */
  .t4p-filter-form .t4p-filter-input,
  .t4p-filter-form .t4p-filter-select {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  .t4p-single-layout {
    flex-direction: column;
  }

  .t4p-single-image-col {
    flex: none;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 540px) {
  .t4p-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* ============================================================
   SINGLE PAGE TITLE ROW + BACK CHEVRON
   ============================================================ */

/* Title row — gradient banner with chevron + title (Figma 2102:1509 desktop, 2102:1521 mobile) */
.t4p-title-row {
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(255, 0, 140, 0.5) 0%, rgba(100, 0, 194, 0.5) 100%);
  border-radius: 8px;
  overflow: hidden;
}

.t4p-back-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 8px 16px;
  align-self: stretch;
  background: var(--t4p-alternate);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s ease;
  font-size: 1rem;
  border-right: 1px solid #ffffff66;
}

.t4p-back-chevron:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-decoration: none;
}

/* Title fills remaining space */
.t4p-title-row .wp-block-post-title {
  flex: 1 0 0;
  min-width: 1px;
  margin: 0 !important;
  padding: 8px 16px !important;
  font-size: 2rem !important;
  color: #ffffff !important;
  line-height: normal !important;
}

@media (max-width: 600px) {
  .t4p-title-row .wp-block-post-title {
    font-size: 1.5rem !important;
  }
}