/**
 * WP Eventbrite Sync — Public Styles
 * Responsive styles for both list and calendar views.
 */

/* ── Design Tokens ────────────────────────────────────────────────────────── */

.wpes-events-list,
.wpes-calendar-wrap {
    --wpes-primary:        #6366f1;   /* Indigo */
    --wpes-primary-light:  #e0e7ff;
    --wpes-primary-dark:   #4f46e5;
    --wpes-accent:         #f59e0b;   /* Amber */
    --wpes-surface:        #ffffff;
    --wpes-surface-alt:    #f8f9fc;
    --wpes-border:         #e5e7eb;
    --wpes-text:           #1f2937;
    --wpes-text-muted:     #6b7280;
    --wpes-radius:         12px;
    --wpes-radius-sm:      6px;
    --wpes-shadow:         0 2px 8px rgba(0,0,0,.08);
    --wpes-shadow-hover:   0 8px 28px rgba(99,102,241,.18);
    --wpes-transition:     all 0.22s cubic-bezier(.4,0,.2,1);

    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--wpes-text);
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIST VIEW  — Laughs Comedy Club-inspired horizontal row layout
═══════════════════════════════════════════════════════════════════════════ */

.wpes-events-list {
    scroll-margin-top: 100px;
}

/* ── No events state ──────────────────────────────────────────────────────── */

.wpes-no-events {
    padding: 48px 24px;
    text-align: center;
    color: var(--wpes-text-muted);
    background: var(--wpes-surface-alt);
    border: 1px dashed var(--wpes-border);
    border-radius: var(--wpes-radius);
}

/* ── Top Navigation Block (topnav="true") ─────────────────────────────────── */

.wpes-listings-nav {
    display: block;
    width: 100%;
    margin: 0 auto 28px;
    padding: 0 4px;
    box-sizing: border-box;
}

.wpes-listings-nav__bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}

/* ── 1. Month Navigation Pills (Linear, Left) ─────────────────────────────── */
.wpes-listings-nav__months {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.wpes-listings-nav__months::-webkit-scrollbar {
    display: none;
}

.wpes-listings-nav__list {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 8px;
    margin: 0;
    padding: 2px 0;
    list-style: none;
}

.wpes-listings-nav__item {
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.wpes-listings-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 15px;
    height: 38px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: #374151;
    background: #ffffff;
    border: 1px solid var(--wpes-border, #e5e7eb);
    border-radius: 9999px;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.wpes-listings-nav__link:hover,
.wpes-listings-nav__link:focus-visible {
    color: #ffffff;
    background: #1894e5;
    border-color: #1894e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(24, 148, 229, 0.35);
    outline: none;
}

.wpes-listings-nav__link.is-active {
    color: #ffffff;
    background: #1894e5;
    border-color: #1894e5;
    box-shadow: 0 2px 8px rgba(24, 148, 229, 0.3);
}

/* ── Right Controls Container (Search + View Switch) ───────────────────────── */
.wpes-listings-nav__controls {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── 2. Event Search Accordion (Expandable on Click, No Background on Icon) ── */
.wpes-search-accordion {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 38px;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Large Search Icon Button - Strictly NO Background */
.wpes-search-toggle-btn,
button.wpes-search-toggle-btn,
.wpes-search-accordion button.wpes-search-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    color: #4b5563 !important;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.15s ease;
    outline: none !important;
}

/* Visited, focus, active, and expanded states: maintain dark color #4b5563 (prevent theme from turning icon white) */
.wpes-search-toggle-btn:visited,
.wpes-search-toggle-btn:focus,
.wpes-search-toggle-btn:focus-visible,
.wpes-search-toggle-btn:active,
button.wpes-search-toggle-btn:visited,
button.wpes-search-toggle-btn:focus,
button.wpes-search-toggle-btn:focus-visible,
button.wpes-search-toggle-btn:active,
.wpes-search-accordion.is-expanded .wpes-search-toggle-btn,
.wpes-search-accordion.is-expanded button.wpes-search-toggle-btn {
    color: #4b5563 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Hover: Keep hover color as is (#1894e5) */
.wpes-search-toggle-btn:hover,
button.wpes-search-toggle-btn:hover,
.wpes-search-accordion .wpes-search-toggle-btn:hover,
.wpes-search-accordion.is-expanded .wpes-search-toggle-btn:hover,
.wpes-search-accordion.is-expanded button.wpes-search-toggle-btn:hover {
    color: #1894e5 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.wpes-search-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor !important;
    stroke-width: 2.2;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: block;
}

/* Collapsible Accordion Input Wrap - Hidden when collapsed to save space */
.wpes-search-input-wrap {
    display: inline-flex;
    align-items: center;
    max-width: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9999px;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                margin 0.3s ease,
                padding 0.3s ease,
                background 0.2s ease,
                border-color 0.2s ease;
    box-sizing: border-box;
}

/* Expandable when search icon is clicked (is-expanded class) */
.wpes-search-accordion.is-expanded .wpes-search-input-wrap {
    max-width: 220px;
    width: 220px;
    opacity: 1;
    pointer-events: auto;
    margin-left: 6px;
    padding: 0 8px 0 12px;
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--wpes-border, #e5e7eb);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.wpes-search-accordion.is-expanded .wpes-search-input-wrap:focus-within {
    border-color: #1894e5;
    box-shadow: 0 0 0 3px rgba(24, 148, 229, 0.18), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.wpes-search-input {
    width: 100%;
    padding: 6px 0;
    font-size: 0.875rem;
    line-height: 1.4;
    border: none !important;
    background: transparent !important;
    color: #1f2937;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit;
    box-sizing: border-box;
}

.wpes-search-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.wpes-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 6px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.wpes-search-clear:hover {
    background: #d1d5db;
    color: #111827;
}

/* ── Search Results Bar ─────────────────────────────────────────── */
.wpes-search-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 16px;
    margin: 0 0 24px 0;
    color: #166534;
    font-size: 0.9375rem;
    font-weight: 500;
    box-sizing: border-box;
}

.wpes-search-results-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wpes-search-clear-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #15803d;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline !important;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.wpes-search-clear-link:hover {
    color: #14532d;
    text-decoration: none !important;
}

/* ── Empty Search Results State ───────────────────────────────────── */
.wpes-no-events.wpes-search-no-results {
    text-align: center;
    padding: 48px 24px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    margin: 24px 0;
    box-sizing: border-box;
}

.wpes-search-no-results__title {
    font-size: 1.125rem;
    color: #374151;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.wpes-search-no-results__action {
    margin: 0;
}

.wpes-btn-clear-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: #1894e5;
    color: #ffffff !important;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color 0.15s ease, transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wpes-btn-clear-search:hover {
    background: #1272b2;
    transform: translateY(-1px);
}

.wpes-events-list.is-searching,
.wpes-events-grid.is-searching,
.wpes-calendar-wrap.is-searching,
.wpes-carousel-wrap.is-searching {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ── 3. List/Calendar Switch on Right Side (Icons Only, No Labels) ────────── */
.wpes-view-switch {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid var(--wpes-border, #e5e7eb);
    border-radius: 9999px;
    padding: 2px;
    gap: 2px;
    height: 38px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.wpes-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 9999px;
    text-decoration: none !important;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.wpes-view-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
    width: 18px;
    height: 18px;
}

.wpes-view-btn:hover:not(.is-active) {
    color: #111827;
    background: rgba(255, 255, 255, 0.7);
}

.wpes-view-btn.is-active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ── 4. Empty Search Results Notice ────────────────────────────────────────── */
.wpes-search-no-results {
    width: 100%;
    margin: 24px 0;
    padding: 24px 16px;
    text-align: center;
    background: #f9fafb;
    border: 1px dashed var(--wpes-border, #d1d5db);
    border-radius: 8px;
    color: var(--wpes-text-muted, #6b7280);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.wpes-search-no-results p {
    margin: 0;
}

.wpes-search-term {
    font-weight: 600;
    color: #1f2937;
}

/* ── Responsive Rules (≤ 680px) ────────────────────────────────────────────── */
@media (max-width: 680px) {
    .wpes-listings-nav {
        margin-bottom: 20px;
    }

    .wpes-listings-nav__bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .wpes-listings-nav__controls {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        order: 1;
    }

    .wpes-search-accordion.is-expanded {
        flex: 1;
    }

    .wpes-search-accordion.is-expanded .wpes-search-input-wrap {
        max-width: 100%;
        width: 100%;
        flex: 1;
    }

    .wpes-search-input {
        width: 100%;
    }

    .wpes-listings-nav__months {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        order: 2;
    }

    .wpes-listings-nav__list {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .wpes-listings-nav__link {
        font-size: 0.8rem;
        padding: 5px 12px;
        height: 32px;
    }
}

/* ── Month separator ──────────────────────────────────────────────────────── */

.wpes-month-group {
    margin-bottom: 36px;
    scroll-margin-top: 100px;
}

.wpes-month-separator {
    margin: 0 0 12px;
    padding: 8px 0;
    font-size: 150%;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000000;
    text-align: center;
    border-bottom: 2px solid var(--wpes-border);
}

.wpes-month-separator time {
    display: inline-block;
}

/* ── Row list ─────────────────────────────────────────────────────────────── */

.wpes-list-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Single row ───────────────────────────────────────────────────────────── */

.wpes-list-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--wpes-border);
    transition: background 0.15s ease;
}

.wpes-list-row:last-child {
    border-bottom: none;
}

/* ── Event wrapper ────────────────────────────────────────────────────────── */

.wpes-list-event-wrapper {
    flex: 1;
    min-width: 0;
}

.wpes-list-event {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Image with ticket button ─────────────────────────────────────────────── */

.wpes-list-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--wpes-radius-sm);
    background: var(--wpes-surface-alt);
    margin-bottom: 10px;
}

.wpes-list-image-link {
    display: block;
    line-height: 0;
}

.wpes-list-image {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wpes-list-row:hover .wpes-list-image {
    transform: scale(1.02);
}

/* "Get Tickets" / "View Details" button below the image */
.wpes-list-ticket-btn {
    display: block;
    width: 90%;
    margin: 10px auto 14px;
    padding: 15px;
    background: #ea4812;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 35px;
    letter-spacing: 0.04em;
    transition: background 0.2s ease, transform 0.15s ease;
    line-height: 1;
}

.wpes-list-ticket-btn:hover,
.wpes-list-ticket-btn:focus {
    background: #d83b06;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ── Video embed in list view (beneath description block) ─────────────────── */

.wpes-list-video-wrap {
    width: 95%;
    margin: 20px auto 8px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wpes-list-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio fallback */
    height: 0;
    overflow: hidden;
    background: #000;
}

@supports (aspect-ratio: 16 / 9) {
    .wpes-list-video-embed {
        aspect-ratio: 16 / 9;
        height: auto;
        padding-bottom: 0;
    }
}

.wpes-list-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Event details ────────────────────────────────────────────────────────── */

.wpes-list-event-details {
    padding: 0 4px;
    text-align: center;
}

.wpes-list-event-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.wpes-list-event-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.wpes-list-event-title-link {
    color: var(--wpes-text);
    text-decoration: none;
	font-size:140%;
}

.wpes-list-event-title-link:hover {
    color: var(--wpes-primary);
    text-decoration: underline;
}

.wpes-list-event-date {
    font-size: 1.5rem;         /* H2 scale */
    font-weight: 700;
    line-height: 1.25;
    color: var(--wpes-text);
    display: block;
    margin-bottom: 4px;
}

.wpes-list-event-date time {
    font-style: normal;
	font-size:80%;
}

.wpes-list-event-date-sep {
    color: var(--wpes-text-muted);
    font-weight: 400;
}

.wpes-list-event-venue {
    margin: 0;
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wpes-list-venue-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wpes-text);
	display:none;
}

.wpes-list-venue-address {
    font-size: 12px;
    color: var(--wpes-text-muted);
	display:none;
}

.wpes-list-event-description {
    margin-top: 10px;
    margin-bottom: 20px;
}

.wpes-list-event-description p {
    margin: 0;
    font-size: 100%;
	font-weight:bold;
    color: var(--wpes-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {

    .wpes-list-event-title {
        font-size: 15px;
    }
}


/* ── Pagination ───────────────────────────────────────────────────────────── */

/* ── Pagination ─────────────────────────────────────── */

.wpes-pagination {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    padding: 28px 0 8px;
    margin-top: 8px;
    border-top: 2px solid var(--wpes-border);
}

/* Numbered pages strip */
.wpes-page-numbers {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px;
}

/* Each page item — span keeps themes from applying list-item display */
.wpes-page-numbers > span {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

/* Individual page number buttons — ~50% larger (32 → 48px) */
.wpes-page-num {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 48px;
    height: 48px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    color: var(--wpes-text);
    border: 1px solid var(--wpes-border);
    background: transparent;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wpes-page-num:hover {
    background: var(--wpes-surface-alt);
    border-color: var(--wpes-text-muted);
    color: var(--wpes-text);
    text-decoration: none;
}

.wpes-page-num--current {
    background: #ea4812 !important;
    border-color: #ea4812 !important;
    color: #fff !important;
    cursor: default;
    pointer-events: none;
}

.wpes-page-ellipsis {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px;
    height: 48px;
    font-size: 19px;
    color: var(--wpes-text-muted);
    line-height: 1;
}

/* Prev / Next — same height as page numbers, ~50% larger */
.wpes-page-btn {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-shrink: 0;
    align-items: center !important;
    gap: 7px;
    height: 48px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-decoration: none;
    color: #fff;
    border: 1px solid var(--wpes-border);
    border-radius: 6px;
    background: #ea4812;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wpes-page-btn:hover,
.wpes-page-btn:focus {
    background: #d83b06;
    border-color: #ea4812;
    color: #fff !important;
    text-decoration: none;
}

/* SVG arrows — sized relative to button text (~50% larger: 7→11px, 11→17px) */
.wpes-page-btn svg {
    display: block !important;
    width: 11px !important;
    height: 17px !important;
    fill: currentColor;
    flex-shrink: 0;
    overflow: visible;
}

/* Disabled button state */
.wpes-page-btn--disabled,
.wpes-page-btn[aria-disabled="true"] {
    opacity: 0.35 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    border-color: var(--wpes-border) !important;
    color: var(--wpes-text-muted) !important;
    background: transparent !important;
}

@media (max-width: 600px) {
    .wpes-pagination {
        gap: 5px;
    }
    .wpes-page-btn {
        padding: 0 12px;
        font-size: 13px;
        height: 40px;
    }
    .wpes-page-num {
        min-width: 38px;
        height: 40px;
        font-size: 15px;
    }
    .wpes-page-ellipsis {
        height: 40px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .wpes-page-btn {
        padding: 0 8px;
        font-size: 11px;
    }
    .wpes-page-num {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .wpes-page-ellipsis {
        width: 20px;
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALENDAR VIEW
═══════════════════════════════════════════════════════════════════════════ */

.wpes-calendar-wrap {
    position: relative;
    user-select: none;
    scroll-margin-top: 100px;
}

/* ── Calendar Header ──────────────────────────────────────────────────────── */

.wpes-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wpes-cal-month-label {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--wpes-text);
}

.wpes-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--wpes-border);
    color: var(--wpes-text);
    text-decoration: none;
    transition: var(--wpes-transition);
    background: var(--wpes-surface);
}

.wpes-cal-nav:hover {
    background: var(--wpes-primary-light);
    color: var(--wpes-primary-dark);
    border-color: var(--wpes-primary);
    text-decoration: none;
}

.wpes-cal-nav svg {
    width: 18px;
    height: 18px;
}

/* ── Day-of-week Row ──────────────────────────────────────────────────────── */

.wpes-cal-dow-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin: 0 0 4px 0;
    padding: 0;
    box-sizing: border-box;
}

.wpes-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--wpes-text-muted);
    padding: 6px 0;
    margin: 0;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Calendar Grid ────────────────────────────────────────────────────────── */

.wpes-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Calendar Cell ────────────────────────────────────────────────────────── */

.wpes-cal-cell {
    min-height: 90px;
    background: var(--wpes-surface);
    border: 1px solid var(--wpes-border);
    border-radius: var(--wpes-radius-sm);
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpes-cal-cell.wpes-cal-cell--has-thumb {
    min-height: 125px;
    padding: 5px;
}

.wpes-cal-cell.wpes-cal-empty {
    background: var(--wpes-surface-alt);
    border-color: transparent;
}

.wpes-cal-cell.wpes-cal-today {
    border-color: var(--wpes-primary);
    box-shadow: inset 0 0 0 1px var(--wpes-primary);
}

/* ── Past Date Cells & 30% Dark Image Overlay ────────────────────────────── */

.wpes-cal-cell.wpes-cal-past {
    background-color: var(--wpes-surface-alt, #f9fafb);
    border-color: var(--wpes-border, #e5e7eb);
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-day-num {
    color: #9ca3af;
}

.wpes-cal-cell--has-thumb.wpes-cal-past .wpes-cal-day-num {
    background: rgba(255, 255, 255, 0.88);
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

/* 30% transparent black overlay specifically over the event image for past dates */
.wpes-cal-cell.wpes-cal-past .wpes-cal-thumb-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.30);
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    transition: background-color 0.2s ease;
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-thumb-link:hover::after,
.wpes-cal-cell.wpes-cal-past:hover .wpes-cal-thumb-link::after {
    background: rgba(0, 0, 0, 0.15);
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-thumb {
    filter: brightness(0.95);
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-chip {
    background: #e5e7eb;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-chip:hover {
    background: #d1d5db;
    color: #111827;
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-chip-more {
    color: #6b7280;
}

.wpes-cal-chip--static {
    cursor: default !important;
    text-decoration: none !important;
    pointer-events: auto;
}

.wpes-cal-thumb-link--static {
    cursor: default !important;
    pointer-events: auto;
}

.wpes-cal-cell.wpes-cal-past .wpes-cal-thumb-link--static:hover .wpes-cal-thumb {
    transform: none;
}

.wpes-cal-cell.wpes-cal-cell--dimmed {
    opacity: 0.25;
}

.wpes-cal-cell.wpes-cal-has-events {
    cursor: default;
}

/* ── Cell Top & Thumbnail Image ───────────────────────────────────────────── */

.wpes-cal-cell-top {
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.wpes-cal-cell--has-thumb .wpes-cal-cell-top {
    height: 64px;
    margin-bottom: 2px;
    border-radius: 4px;
    overflow: hidden;
}

.wpes-cal-thumb-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: var(--wpes-surface-alt);
    text-decoration: none !important;
    transition: box-shadow 0.25s ease;
}

.wpes-cal-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.wpes-cal-thumb-link:hover .wpes-cal-thumb,
.wpes-cal-thumb-link.is-chip-hovered .wpes-cal-thumb {
    transform: scale(1.08);
    filter: brightness(1.04);
}

.wpes-cal-thumb-link:hover,
.wpes-cal-thumb-link.is-chip-hovered {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

/* ── Day Number ───────────────────────────────────────────────────────────── */

.wpes-cal-day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--wpes-text);
    line-height: 1;
    flex-shrink: 0;
}

.wpes-cal-cell--has-thumb .wpes-cal-day-num {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #111827;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    line-height: 1.3;
}

.wpes-cal-cell:not(.wpes-cal-cell--has-thumb).wpes-cal-today .wpes-cal-day-num {
    background: var(--wpes-primary);
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpes-cal-cell--has-thumb.wpes-cal-today .wpes-cal-day-num {
    background: var(--wpes-primary);
    color: #fff;
    box-shadow: 0 1px 4px rgba(99, 102, 241, 0.4);
}

/* ── Event Chips ──────────────────────────────────────────────────────────── */

.wpes-cal-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.wpes-cal-chip,
a.wpes-cal-chip {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 2px 6px;
    background: var(--wpes-primary-light);
    color: var(--wpes-primary-dark) !important;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
    line-height: 1.6;
    text-decoration: none !important;
    box-sizing: border-box;
}

a.wpes-cal-chip:visited {
    color: var(--wpes-primary-dark) !important;
}

.wpes-cal-chip:hover,
.wpes-cal-chip:focus-visible,
a.wpes-cal-chip:hover,
a.wpes-cal-chip:focus-visible {
    background: var(--wpes-primary);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
    outline: none;
}

.wpes-cal-chip-more {
    background: transparent;
    color: var(--wpes-text-muted);
    font-weight: 500;
}

.wpes-cal-chip-more:hover {
    background: var(--wpes-surface-alt);
    color: var(--wpes-text);
}

/* ── Responsive Calendar ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .wpes-cal-cell {
        min-height: 52px;
        padding: 4px;
        gap: 2px;
    }

    .wpes-cal-cell.wpes-cal-cell--has-thumb {
        min-height: 80px;
        padding: 3px;
    }

    .wpes-cal-cell--has-thumb .wpes-cal-cell-top {
        height: 42px;
        margin-bottom: 2px;
    }

    .wpes-cal-cell--has-thumb .wpes-cal-day-num {
        font-size: 9px;
        padding: 1px 3px;
        top: 2px;
        left: 2px;
    }

    .wpes-cal-day-num {
        font-size: 10px;
    }

    .wpes-cal-chip {
        font-size: 9px;
        padding: 1px 4px;
        line-height: 1.4;
    }

    .wpes-cal-chip-more {
        font-size: 8.5px;
    }
}

@media (max-width: 480px) {
    .wpes-cal-dow {
        font-size: 9px;
        letter-spacing: 0;
        padding: 2px 0;
    }

    .wpes-cal-grid,
    .wpes-cal-dow-row {
        gap: 2px;
    }

    .wpes-cal-cell {
        min-height: 44px;
        padding: 2px;
        border-radius: 3px;
    }

    .wpes-cal-cell.wpes-cal-cell--has-thumb {
        min-height: 68px;
        padding: 2px;
    }

    .wpes-cal-cell--has-thumb .wpes-cal-cell-top {
        height: 32px;
        margin-bottom: 1px;
    }

    .wpes-cal-cell--has-thumb .wpes-cal-day-num {
        font-size: 8px;
        padding: 0 2px;
        top: 1px;
        left: 1px;
    }

    .wpes-cal-day-num {
        font-size: 9px;
    }

    .wpes-cal-chip {
        font-size: 8px;
        padding: 1px 2px;
        border-radius: 2px;
        line-height: 1.3;
    }

    .wpes-cal-chip-more {
        font-size: 7.5px;
    }

    .wpes-cal-month-label {
        font-size: 17px;
    }

    .wpes-cal-nav {
        width: 32px;
        height: 32px;
    }

    .wpes-cal-nav svg {
        width: 15px;
        height: 15px;
    }
}

/* ── Popover ──────────────────────────────────────────────────────────────── */

.wpes-cal-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 9999;
    background: var(--wpes-surface);
    border: 1px solid var(--wpes-border);
    border-radius: var(--wpes-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    width: min(480px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.wpes-cal-popover:not([hidden]) {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    display: block;
}

.wpes-cal-popover[hidden] {
    display: none;
}

.wpes-popover-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wpes-text-muted);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 1;
}

.wpes-popover-close:hover {
    background: var(--wpes-surface-alt);
    color: var(--wpes-text);
}

.wpes-popover-close svg {
    width: 18px;
    height: 18px;
}

.wpes-popover-content {
    padding: 24px;
}

/* Popover inner content injected by JS */
.wpes-popover-event-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-right: 28px;
    color: var(--wpes-text);
}

.wpes-popover-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpes-popover-meta li {
    font-size: 13px;
    color: var(--wpes-text-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wpes-popover-meta svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.wpes-popover-excerpt {
    font-size: 14px;
    color: var(--wpes-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

.wpes-popover-thumb {
    width: 100%;
    border-radius: var(--wpes-radius-sm);
    margin-bottom: 16px;
    object-fit: cover;
    max-height: 160px;
}

.wpes-popover-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Backdrop ─────────────────────────────────────────────────────────────── */

.wpes-cal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.wpes-cal-backdrop:not([hidden]) {
    display: block;
}

.wpes-cal-backdrop[hidden] {
    display: none;
}

/* ── Calendar Hover Larger Image Reveal ───────────────────────────────────── */

.wpes-cal-image-reveal {
    position: fixed;
    z-index: 10000;
    width: 300px;
    max-width: calc(100vw - 24px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.2s;
    border-radius: 12px;
    overflow: hidden;
    background: var(--wpes-surface, #ffffff);
    box-shadow: 0 18px 40px -6px rgba(0, 0, 0, 0.25),
                0 8px 18px -2px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.08);
}

.wpes-cal-image-reveal.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.wpes-cal-image-reveal__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--wpes-surface, #ffffff);
}

.wpes-cal-image-reveal__img-wrap {
    position: relative;
    width: 100%;
    height: 168px;
    background: #111827;
    overflow: hidden;
}

.wpes-cal-image-reveal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wpes-cal-image-reveal__info {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--wpes-surface, #ffffff);
    border-top: 1px solid var(--wpes-border, #e5e7eb);
}

.wpes-cal-image-reveal__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--wpes-text, #111827);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpes-cal-image-reveal__meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--wpes-primary, #6366f1);
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.3;
}

@media (hover: none) {
    .wpes-cal-image-reveal {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE EVENT VIEW
═══════════════════════════════════════════════════════════════════════════ */

/* Force white body background on single event pages regardless of theme. */
body.wpes-single-event-page {
    background-color: #ffffff !important;
}

/* ── Outer wrapper ────────────────────────────────────────────────────────── */

.wpes-single-wrap {
    --wpes-primary:        #6366f1;
    --wpes-primary-light:  #e0e7ff;
    --wpes-primary-dark:   #4f46e5;
    --wpes-accent:         #f59e0b;
    --wpes-surface:        #ffffff;
    --wpes-surface-alt:    #f8f9fc;
    --wpes-border:         #e5e7eb;
    --wpes-text:           #1f2937;
    --wpes-text-muted:     #6b7280;
    --wpes-radius:         12px;
    --wpes-radius-sm:      6px;
    --wpes-shadow:         0 2px 8px rgba(0,0,0,.08);
    --wpes-transition:     all 0.22s cubic-bezier(.4,0,.2,1);

    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--wpes-text);
    background-color: #ffffff;
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
}

.wpes-single-wrap *,
.wpes-single-wrap *::before,
.wpes-single-wrap *::after {
    box-sizing: inherit;
}

/* ── Hero image ───────────────────────────────────────────────────────────── */

.wpes-single-hero {
    position: relative;
    width: 100%;
    background: var(--wpes-surface-alt);
    padding: 15px;
    box-sizing: border-box;
    border-radius: var(--wpes-radius);
}

.wpes-single-hero img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: calc(var(--wpes-radius) - 4px);
}

.wpes-single-hero-overlay {
    display: none;
}

/* ── Inner content container ──────────────────────────────────────────────── */

.wpes-single-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 64px;
    background-color: #ffffff;
}

/* ── Breadcrumb / Top Back Button ─────────────────────────────────────────── */

.wpes-single-breadcrumb {
    padding: 24px 0 12px;
}

.wpes-single-breadcrumb a:not(.wpes-page-btn) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpes-primary);
    text-decoration: none;
    transition: var(--wpes-transition);
}

.wpes-single-breadcrumb a:not(.wpes-page-btn):hover {
    color: var(--wpes-primary-dark);
    text-decoration: underline;
}

.wpes-single-breadcrumb .wpes-page-btn {
    text-decoration: none !important;
}

.wpes-single-breadcrumb .wpes-page-btn:hover,
.wpes-single-breadcrumb .wpes-page-btn:focus {
    text-decoration: none !important;
    color: #fff !important;
}

/* ── Two-column grid ──────────────────────────────────────────────────────── */

.wpes-single-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
    margin-top: 28px;
}

.wpes-single-details {
    grid-column: 1;
    grid-row: 1;
}

.wpes-ticket-aside {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.wpes-single-media {
    grid-column: 1;
    grid-row: 2;
    margin-top: 32px;
}

@media (max-width: 860px) {
    .wpes-single-layout {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* Ticket aside: cancel sticky so it is static beneath description on mobile */
    .wpes-ticket-aside {
        position: static !important;
        width: 100%;
        margin-top: 8px;
    }

    .wpes-single-media {
        margin-top: 16px;
        width: 100%;
    }

    /* Reduce inner padding on small screens */
    .wpes-single-inner {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 40px;
    }

    /* Prevent video/map iframes from overflowing on narrow screens */
    .wpes-single-video-wrap,
    .wpes-single-map-wrap {
        width: 100%;
        overflow: hidden;
    }

    .wpes-video-embed {
        height: 220px;
    }

    .wpes-single-map {
        height: 220px;
    }
}

/* ── Left column: details ─────────────────────────────────────────────────── */

.wpes-single-title {
    margin: 0;
    padding: 24px 24px 20px;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 400;
    line-height: 1.2;
    color: var(--wpes-text);
    text-align: center;
}

.wpes-single-excerpt {
    margin: 0 0 24px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--wpes-text);
}

/* ── Meta bar ─────────────────────────────────────────────────────────────── */

.wpes-single-meta {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: none; /* Hidden — date/location info shown via other means */
}

.wpes-smeta-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--wpes-border);
}

.wpes-smeta-item:last-child {
    border-bottom: none;
}

.wpes-smeta-icon-wrap {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--wpes-primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpes-primary-dark);
    margin-top: 2px;
}

.wpes-smeta-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.wpes-smeta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wpes-smeta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--wpes-text-muted);
}

.wpes-smeta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--wpes-text);
    line-height: 1.4;
}

.wpes-smeta-time {
    font-weight: 400;
    font-size: 14px;
    color: var(--wpes-text-muted);
}

.wpes-smeta-address {
    font-size: 13px;
    color: var(--wpes-text-muted);
    font-style: normal;
    line-height: 1.5;
}

/* ── Map embed ────────────────────────────────────────────────────────────── */

/* ── Map section heading ──────────────────────────────────────────────────── */

.wpes-map-heading {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wpes-text);
    letter-spacing: 0.01em;
}

.wpes-single-map-wrap {
    margin-bottom: 32px;
    border-radius: var(--wpes-radius);
    overflow: hidden;
    border: 1px solid var(--wpes-border);
    box-shadow: var(--wpes-shadow);
}

.wpes-single-map {
    display: block;
    width: 100%;
    height: 280px;
    border: none;
    background: var(--wpes-surface-alt);
}

/* ── Video embed ───────────────────────────────────────────────────── */

.wpes-single-video-wrap {
    margin-bottom: 32px;
    border-radius: var(--wpes-radius);
    overflow: hidden;
    border: 1px solid var(--wpes-border);
    box-shadow: var(--wpes-shadow);
}

/* Video embed — fixed 280px height to match the map embed above. */
.wpes-video-embed {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #000;
}

.wpes-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}



.wpes-directions-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wpes-primary);
    text-decoration: none;
    background: var(--wpes-surface);
    border-top: 1px solid var(--wpes-border);
    width: 100%;
    transition: var(--wpes-transition);
}

.wpes-directions-link:hover {
    background: var(--wpes-primary-light);
    color: var(--wpes-primary-dark);
    text-decoration: none;
}

/* ── Event description ────────────────────────────────────────────────────── */

.wpes-single-description {
    font-size: 16px;
    line-height: 1.75;
    color: var(--wpes-text);
}

.wpes-single-description p {
    margin: 0 0 1.25em;
}

.wpes-single-description h2,
.wpes-single-description h3,
.wpes-single-description h4 {
    margin: 1.5em 0 0.5em;
    font-weight: 700;
    color: var(--wpes-text);
}

.wpes-single-description ul,
.wpes-single-description ol {
    padding-left: 1.5em;
    margin: 0 0 1.25em;
}

.wpes-single-description li {
    margin-bottom: 0.4em;
}

.wpes-single-description a {
    color: var(--wpes-primary);
}

.wpes-single-description a:hover {
    color: var(--wpes-primary-dark);
}

/* ── Description collapsible container (mobile view) ─────────────────────── */

.wpes-desc-preview {
    display: none;
}

.wpes-desc-full {
    display: block;
}

.wpes-read-more-btn {
    display: none !important;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--wpes-primary, #6366f1);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
    vertical-align: baseline;
    line-height: inherit;
}

.wpes-read-more-btn:hover,
.wpes-read-more-btn:focus {
    color: var(--wpes-primary-dark, #4f46e5);
    text-decoration: underline;
}

.wpes-read-more-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wpes-read-more-expand {
    margin-left: 6px;
}

.wpes-read-less-btn {
    margin-top: 14px;
    margin-bottom: 8px;
}

@keyframes wpes-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    /* Mobile: collapsed state by default */
    .wpes-collapsible-desc:not(.is-expanded) .wpes-desc-preview {
        display: block;
    }

    .wpes-collapsible-desc:not(.is-expanded) .wpes-desc-full {
        display: none;
    }

    .wpes-collapsible-desc:not(.is-expanded) .wpes-read-more-expand {
        display: inline-flex !important;
    }

    /* Mobile: expanded state */
    .wpes-collapsible-desc.is-expanded .wpes-desc-preview {
        display: none;
    }

    .wpes-collapsible-desc.is-expanded .wpes-desc-full {
        display: block;
        animation: wpes-fade-in 0.22s ease-out;
    }

    .wpes-collapsible-desc.is-expanded .wpes-read-less-btn {
        display: inline-flex !important;
    }
}

/* ── Ticket aside (right column) ──────────────────────────────────────────── */

@media (min-width: 861px) {
    .wpes-ticket-aside {
        position: sticky;
        top: 24px;
    }
}

.wpes-ticket-card {
    background: var(--wpes-surface);
    border: 1px solid var(--wpes-border);
    border-radius: var(--wpes-radius);
    box-shadow: var(--wpes-shadow);
    overflow: hidden;
}

.wpes-ticket-heading {
    margin: 0;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 700;
    color: var(--wpes-text);
    background: var(--wpes-surface-alt);
    border-bottom: 1px solid var(--wpes-border);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

/* ── Ticket widget (Eventbrite iframe container) ──────────────────────────── */

.wpes-ticket-widget {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Eventbrite creates an iframe inside this — remove its border */
.wpes-ticket-widget iframe {
    border: none !important;
    width: 100% !important;
    min-width: 100% !important;
    min-height: 500px;
}

/* ── Modal checkout button ────────────────────────────────────────────────── */

.wpes-ticket-modal-wrap {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wpes-ticket-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 20px;
    border: none;
    border-radius: var(--wpes-radius);
    background: var(--wpes-primary);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(234, 72, 18, 0.25);
    transition: var(--wpes-transition);
}

.wpes-ticket-modal-btn:hover {
    background: var(--wpes-primary-dark);
    box-shadow: 0 4px 10px rgba(234, 72, 18, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.wpes-ticket-modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(234, 72, 18, 0.25);
}

.wpes-ticket-modal-btn:focus-visible {
    outline: 2px solid var(--wpes-primary);
    outline-offset: 2px;
}

.wpes-ticket-modal-btn .wpes-ticket-btn-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.wpes-ticket-modal-btn * {
    pointer-events: none;
}

.wpes-ticket-modal-btn.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.wpes-ticket-modal-note {
    margin: 0;
    font-size: 12px;
    color: var(--wpes-text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ── Checkout Modal Overlay (Full-screen) ─────────────────────────────────── */

.wpes-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483640;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wpes-checkout-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    z-index: 2147483641;
}

.wpes-checkout-spinner-wrap {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2147483642;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border-radius: var(--wpes-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
}

.wpes-checkout-close-btn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 2147483648;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
}

.wpes-checkout-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.08);
}

.wpes-checkout-close-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wpes-checkout-close-btn svg {
    pointer-events: none;
}

.wpes-checkout-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    z-index: 2147483645;
    background: transparent !important;
}

/* ── Loading state ────────────────────────────────────────────────────────── */

.wpes-ticket-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 32px 20px;
    font-size: 13px;
    color: var(--wpes-text-muted);
    flex: 1;
}

.wpes-ticket-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--wpes-primary-light);
    border-top-color: var(--wpes-primary);
    border-radius: 50%;
    animation: wpes-spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ── Fallback / solo ticket button (lozenge pill) ────────────────────────── */

.wpes-ticket-fallback-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin: 14px 20px;
    border-radius: 9999px;
    background: var(--wpes-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: var(--wpes-transition);
    white-space: nowrap;
}

.wpes-ticket-fallback-btn:hover {
    background: var(--wpes-primary-dark);
    color: #fff;
    text-decoration: none;
}

/* "Purchase on Eventbrite" button: compact and centered. Roughly 30% of the card
   width (about 70% narrower than the old full-width bar) but never narrower than
   its own text, so it stays legible in the narrow sidebar card. */
.wpes-ticket-card .wpes-ticket-fallback-btn {
    display: flex;
    justify-content: center;
    width: fit-content;
    min-width: 30%;
    max-width: calc(100% - 40px);
    padding: 8px 18px;
    margin: 20px auto;
    font-size: 12px;
    border-radius: var(--wpes-radius);
    text-align: center;
}

/* The fallback link starts hidden (HTML `hidden` attribute) and is revealed by
   public-single.js only if the checkout widget fails to load. Without this rule
   the display:flex above overrides the browser's default [hidden] { display:none }. */
.wpes-ticket-card .wpes-ticket-fallback-btn[hidden] {
    display: none;
}

.wpes-ticket-btn-solo {
    margin: 14px 20px;
}

.wpes-ticket-unavailable {
    padding: 24px 20px;
    font-size: 13px;
    color: var(--wpes-text-muted);
    margin: 0;
    text-align: center;
}

/* ── Single Event Pagination ──────────────────────────────────────────────── */

.wpes-single-pagination {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--wpes-border);
}

.wpes-single-pagination__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.wpes-single-pagination .wpes-page-btn {
    text-decoration: none !important;
}

.wpes-single-pagination .wpes-page-btn:hover,
.wpes-single-pagination .wpes-page-btn:focus {
    color: #fff !important;
    text-decoration: none !important;
}

@media (max-width: 600px) {
    .wpes-single-pagination {
        margin-top: 36px;
        padding-top: 24px;
    }
    .wpes-single-pagination__inner {
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .wpes-single-pagination {
        margin-top: 28px;
        padding-top: 20px;
    }
    .wpes-single-pagination__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .wpes-single-pagination__inner .wpes-page-prev {
        grid-column: 1;
        justify-content: center;
    }
    .wpes-single-pagination__inner .wpes-page-next {
        grid-column: 2;
        justify-content: center;
    }
    .wpes-single-pagination__inner .wpes-single-all-events-btn {
        grid-column: 1 / -1;
        justify-content: center;
        order: 3;
    }
}

/* ── Eventbrite Events Archive Page (/events/) ────────────────────────────── */

body.wpes-archive-page {
    background: #ffffff !important;
}

.wpes-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    box-sizing: border-box;
    font-family: inherit;
    color: #1a1a1a;
}

.wpes-archive-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f1;
	text-align:center;
}

.wpes-archive-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

.wpes-archive-wrap .wpes-list-event-details,
body.wpes-archive-page .wpes-list-event-details {
    text-align: center;
}

.wpes-archive-wrap .wpes-month-separator,
body.wpes-archive-page .wpes-month-separator,
.wpes-archive-wrap h3.wpes-month-separator,
body.wpes-archive-page h3.wpes-month-separator {
    font-size: 150%;
    color: #000000;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CAROUSEL VIEW  — Interactive touch/swipe responsive card slider
   [eventbrite_events view="carousel"]
═══════════════════════════════════════════════════════════════════════════ */

.wpes-carousel-wrap {
    --wpes-carousel-columns: 3;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 36px;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--wpes-text, #1f2937);
}

/* ── Viewport & Track ─────────────────────────────────────────────────────── */

.wpes-carousel-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: var(--wpes-radius, 12px);
    outline: none;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.wpes-carousel-viewport.is-dragging {
    cursor: grabbing;
}

.wpes-carousel-viewport:focus-visible {
    outline: 2px solid var(--wpes-primary, #1894e5);
    outline-offset: 4px;
}

.wpes-carousel-track {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 12px 0 18px;
    list-style: none;
    will-change: transform;
    box-sizing: border-box;
}

/* ── Individual Slides ────────────────────────────────────────────────────── */

.wpes-carousel-slide {
    flex: 0 0 calc(100% / var(--wpes-carousel-columns, 3));
    max-width: calc(100% / var(--wpes-carousel-columns, 3));
    padding: 0 10px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.wpes-carousel-slide[aria-hidden="true"] {
    opacity: 0.6;
}

/* ── Card Styling ─────────────────────────────────────────────────────────── */

.wpes-carousel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 430px;
    background: #ffffff;
    border: 1px solid var(--wpes-border, #e5e7eb);
    border-radius: var(--wpes-radius, 12px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
    box-sizing: border-box;
}

.wpes-carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

/* ── Thumbnail Wrap & Date Badge ─────────────────────────────────────────── */

.wpes-carousel-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.wpes-carousel-image-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.wpes-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpes-carousel-card:hover .wpes-carousel-image {
    transform: scale(1.05);
}

.wpes-carousel-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.wpes-carousel-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 5px 9px;
    min-width: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    pointer-events: none;
    z-index: 2;
}

.wpes-carousel-date-month {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #dc2626;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.wpes-carousel-date-day {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

/* Multi-Date Shows Date Overlay Badge (displays both start date and end date) */
.wpes-carousel-date-badge--multi {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    min-width: auto;
}

.wpes-carousel-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wpes-carousel-date-range-sep {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
    margin: 0 1px;
}

/* ── Card Content Body ───────────────────────────────────────────────────── */

.wpes-carousel-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
    text-align: left;
}

.wpes-carousel-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpes-carousel-title-link {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.wpes-carousel-title-link:hover {
    color: var(--wpes-primary, #1894e5);
}

.wpes-carousel-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #4b5563;
}

.wpes-carousel-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wpes-carousel-meta-row svg {
    flex-shrink: 0;
    color: #6b7280;
}

.wpes-carousel-meta-date time {
    font-weight: 500;
    color: #374151;
}

.wpes-carousel-meta-time {
    color: #6b7280;
    margin-left: 2px;
}

.wpes-carousel-meta-venue span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpes-carousel-card-excerpt {
    font-size: 13.5px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Card Action Footer & Button ─────────────────────────────────────────── */

.wpes-carousel-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.wpes-carousel-card--no-desc {
    min-height: auto;
}

.wpes-carousel-card-footer--solo {
    margin-top: 0;
    padding: 14px 18px 16px;
    border-top: none;
}

.wpes-list-event--no-desc {
    margin-bottom: 0;
}

.wpes-carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background-color: #ea4812;
    color: #ffffff !important;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(234, 72, 18, 0.25);
    text-align: center;
    box-sizing: border-box;
}

.wpes-carousel-btn:hover {
    background-color: #d83b06;
    box-shadow: 0 4px 12px rgba(234, 72, 18, 0.35);
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* ── Navigation Arrows ───────────────────────────────────────────────────── */

.wpes-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #1f2937;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}

.wpes-carousel-prev {
    left: -22px;
}

.wpes-carousel-next {
    right: -22px;
}

.wpes-carousel-nav:hover:not(:disabled):not(.is-disabled) {
    background: #1894e5;
    color: #ffffff;
    border-color: #1894e5;
    box-shadow: 0 6px 20px rgba(24, 148, 229, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.wpes-carousel-nav:disabled,
.wpes-carousel-nav.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.wpes-carousel-nav svg {
    width: 22px;
    height: 22px;
}

/* ── Pagination Dots ─────────────────────────────────────────────────────── */

.wpes-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
}

.wpes-carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 5px;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.25, 1, 0.5, 1);
    outline: none;
}

.wpes-carousel-dot:hover:not(.is-active) {
    background: #94a3b8;
}

.wpes-carousel-dot.is-active {
    width: 28px;
    background: #1894e5;
    border-radius: 5px;
}

/* ── Responsive Adaptations ──────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .wpes-carousel-slide {
        padding: 0 8px;
    }
    .wpes-carousel-prev {
        left: -14px;
    }
    .wpes-carousel-next {
        right: -14px;
    }
}

@media (max-width: 640px) {
    .wpes-carousel-wrap {
        padding: 0;
    }
    .wpes-carousel-slide {
        padding: 0 4px;
    }
    .wpes-carousel-card {
        min-height: auto;
    }
    .wpes-carousel-card-body {
        padding: 15px 16px 16px;
    }
    .wpes-carousel-card-title {
        font-size: 16.5px;
    }
    .wpes-carousel-nav {
        width: 36px;
        height: 36px;
    }
    .wpes-carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    .wpes-carousel-prev {
        left: 6px;
    }
    .wpes-carousel-next {
        right: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpes-carousel-track,
    .wpes-carousel-card,
    .wpes-carousel-image,
    .wpes-carousel-dot,
    .wpes-carousel-nav {
        transition: none !important;
    }
}

/* ==========================================================================
   Grid View Layout [eventbrite_events view="grid"]
   ========================================================================== */

.wpes-events-grid {
    position: relative;
    width: 100%;
    margin: 0 auto;
    scroll-margin-top: 100px;
    box-sizing: border-box;
}

.wpes-grid-list {
    display: grid;
    grid-template-columns: repeat(var(--wpes-grid-columns, 3), minmax(0, 1fr));
    gap: 24px;
    list-style: none !important;
    margin: 0 0 36px 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.wpes-grid-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 0 !important;
}

.wpes-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 430px;
    background: #ffffff;
    border: 1px solid var(--wpes-border, #e5e7eb);
    border-radius: var(--wpes-radius, 12px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
    box-sizing: border-box;
}

.wpes-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

/* ── Grid Thumbnail & Date Badge ─────────────────────────────────────────── */

.wpes-grid-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.wpes-grid-image-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.wpes-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpes-grid-card:hover .wpes-grid-image {
    transform: scale(1.05);
}

.wpes-grid-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.wpes-grid-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 5px 9px;
    min-width: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    pointer-events: none;
    z-index: 2;
}

.wpes-grid-date-month {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #dc2626;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.wpes-grid-date-day {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}

.wpes-grid-date-badge--multi {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    min-width: auto;
}

.wpes-grid-date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wpes-grid-date-range-sep {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
    margin: 0 1px;
}

/* ── Grid Card Body ──────────────────────────────────────────────────────── */

.wpes-grid-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
    text-align: left;
}

.wpes-grid-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #4b5563;
}

.wpes-grid-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.wpes-grid-meta-row svg {
    flex-shrink: 0;
    color: #6b7280;
}

.wpes-grid-meta-date time {
    font-weight: 600;
    color: #dc2626;
}

.wpes-grid-meta-venue span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #4b5563;
}

.wpes-grid-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpes-grid-title-link {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.wpes-grid-title-link:hover {
    color: var(--wpes-primary, #1894e5);
}

.wpes-grid-card-excerpt {
    font-size: 13.5px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Grid Card Action Footer & Button ────────────────────────────────────── */

.wpes-grid-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.wpes-grid-card--no-desc {
    min-height: auto;
}

.wpes-grid-card-footer--solo {
    margin-top: 0;
    padding: 14px 18px 16px;
    border-top: none;
}

.wpes-grid-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background-color: #ea4812;
    color: #ffffff !important;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(234, 72, 18, 0.25);
    text-align: center;
    box-sizing: border-box;
}

.wpes-grid-btn:hover {
    background-color: #d83b06;
    box-shadow: 0 4px 12px rgba(234, 72, 18, 0.35);
    transform: translateY(-1px);
    color: #ffffff !important;
}

/* ── Responsive Adaptations for Grid View ────────────────────────────────── */

@media (max-width: 1024px) {
    .wpes-grid-list {
        grid-template-columns: repeat(min(var(--wpes-grid-columns, 3), 2), minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .wpes-grid-list {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .wpes-grid-card {
        min-height: auto;
    }
    .wpes-grid-card-body {
        padding: 15px 16px 16px;
    }
    .wpes-grid-card-title {
        font-size: 16.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpes-grid-card,
    .wpes-grid-image,
    .wpes-grid-btn {
        transition: none !important;
    }
}




/* ═══════════════════════════════════════════════════════════════════════════
   EVENTBRITE CHECKOUT PANEL ON THE EVENTS CALENDAR (TEC) EVENT PAGES
   Same ticket card as the plugin's own single page, placed inline after the
   TEC event content. The design tokens normally come from .wpes-single-wrap,
   so they are redefined here for TEC pages.
═══════════════════════════════════════════════════════════════════════════ */
.wpes-tec-checkout {
    --wpes-primary:        #6366f1;
    --wpes-primary-light:  #e0e7ff;
    --wpes-primary-dark:   #4f46e5;
    --wpes-accent:         #f59e0b;
    --wpes-surface:        #ffffff;
    --wpes-surface-alt:    #f8f9fc;
    --wpes-border:         #e5e7eb;
    --wpes-text:           #1f2937;
    --wpes-text-muted:     #6b7280;
    --wpes-radius:         12px;
    --wpes-radius-sm:      6px;
    --wpes-shadow:         0 2px 8px rgba(0,0,0,.08);
    --wpes-transition:     all 0.22s cubic-bezier(.4,0,.2,1);

    clear: both;
    box-sizing: border-box;
    width: 100%;
    max-width: 640px;
    margin: 32px auto;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--wpes-text);
}

.wpes-tec-checkout *,
.wpes-tec-checkout *::before,
.wpes-tec-checkout *::after {
    box-sizing: inherit;
}

/* The aside is a grid/sticky column on the plugin's own page; here it is a plain block. */
.wpes-tec-checkout .wpes-ticket-aside {
    position: static;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIST VIEW — OPT-IN HORIZONTAL LAYOUT  ([eventbrite_events layout="horizontal"])
   Desktop (900px and up): image on the left; title, date, description (max 50
   words) and the ticket button on the right. Below 900px it falls back to the
   stacked arrangement: image, then title/description, then the button.
   Everything is scoped to .wpes-events-list--horizontal, so the default
   (stacked) layout is unaffected.
═══════════════════════════════════════════════════════════════════════════ */

/* The description is word-limited in PHP, so remove the 2-line clamp. */
.wpes-events-list--horizontal .wpes-list-event-description p {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    font-weight: 400;
}

@media (min-width: 900px) {
    .wpes-events-list--horizontal .wpes-list-event {
        flex-direction: row;
        align-items: flex-start;
        gap: 28px;
    }

    .wpes-events-list--horizontal .wpes-list-image-wrap {
        flex: 0 0 42%;
        max-width: 480px;
        margin-bottom: 0;
        align-self: flex-start;
    }

    .wpes-events-list--horizontal .wpes-list-event-details {
        flex: 1 1 0;
        min-width: 0;
        padding: 0;
        text-align: left;
    }

    .wpes-events-list--horizontal .wpes-list-event-description {
        margin-top: 12px;
        margin-bottom: 18px;
    }

    .wpes-events-list--horizontal .wpes-list-ticket-btn--inline {
        display: inline-block;
        width: auto;
        min-width: 200px;
        margin: 4px 0 0;
        padding: 14px 32px;
    }

    .wpes-events-list--horizontal .wpes-list-video-wrap {
        width: 100%;
        margin: 20px 0 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE EVENT — "EMBEDDED WIDGET — FULL WIDTH" CHECKOUT METHOD
   (Settings > Display & Link Settings > Single Event Checkout Method)
   No sidebar: the date/venue bar comes first, then the checkout widget spans
   the full page width ABOVE the summary and description (the template renders
   it inside the details column, right after the meta bar), then the video/map
   block.
═══════════════════════════════════════════════════════════════════════════ */
.wpes-single-layout--fullwidth {
    grid-template-columns: minmax(0, 1fr);
}

.wpes-single-layout--fullwidth .wpes-single-details {
    grid-column: 1;
    grid-row: 1;
    width: 100%;   /* the checkout widget lives inside; keep it full width on mobile too */
    min-width: 0;
}

.wpes-single-layout--fullwidth .wpes-ticket-aside {
    width: 100%;
    position: static;
    margin: 24px 0 28px;
}

.wpes-single-layout--fullwidth .wpes-single-media {
    grid-column: 1;
    grid-row: 2;
}

.wpes-ticket-aside--fullwidth .wpes-ticket-widget,
.wpes-ticket-aside--fullwidth .wpes-ticket-widget iframe {
    width: 100% !important;
    min-width: 100% !important;
}

/* TEC event pages: let the panel use the full width of the TEC content area. */
.wpes-tec-checkout--fullwidth {
    max-width: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ASTRA THEME COMPATIBILITY
   Moved here from Appearance > Customize > Additional CSS. These rules use
   Astra's own selectors so they win over the theme's link/title styling, and
   they only load on pages where this stylesheet is enqueued (event listings,
   event archive and single event pages).
═══════════════════════════════════════════════════════════════════════════ */

/* Event listing buttons placed inside post content: keep orange, no underline. */
.ast-single-post .entry-content a.wpes-list-ticket-btn {
    text-decoration: none;
    background-color: #ea4812;
}

.ast-single-post .entry-content a.wpes-list-ticket-btn:hover {
    background-color: #d83b06;
}

/* Page / post titles: centered, regular weight. */
.ast-archive-description .entry-title,
.page .entry-title,
.single-post .entry-title {
    text-align: center !important;
}

header.entry-header .entry-title {
    font-weight: 400;
}

/* No underline on links inside single post content and comments. */
.ast-single-post .entry-content a,
.ast-comment-content a:not(.ast-comment-edit-reply-wrap a) {
    text-decoration: none;
}
