/* EVENTS MODULE STYLESHEET SCOPED TO THE /EVENTS/ LIST/CALENDAR PAGE WPBAKERY MODULE. SINGLE EVENT PAGE STYLES LIVE IN TEMPLATES/CSS/EVENTS.CSS */
/* SELF-CONTAINED — DOES NOT RELY ON lf-components.css. NO SHARED CLASSES ARE USED HERE. */

/* MODULE WRAPPER */
.lf-events-module {
    position: relative;
    width: 100%;
    background: transparent;
    color: var(--lf-events-body, inherit);
}

.lf-events-module h1,
.lf-events-module h2,
.lf-events-module h3,
.lf-events-module h4,
.lf-events-module h5,
.lf-events-module h6,
.lf-events-module p,
.lf-events-module span,
.lf-events-module label {
    color: var(--lf-events-body, inherit);
}

.lf-event-item__title,
.lf-event-item__title a {
    color: var(--lf-events-body, inherit) !important;
}

.lf-events-module--dark,
.lf-events-module--dark h1,
.lf-events-module--dark h2,
.lf-events-module--dark h3,
.lf-events-module--dark h4,
.lf-events-module--dark h5,
.lf-events-module--dark h6,
.lf-events-module--dark p,
.lf-events-module--dark span,
.lf-events-module--dark label,
.lf-events-module--dark .lf-event-item__title,
.lf-events-module--dark .lf-event-item__title a {
    color: #ffffff !important;
}

/* TOOLBAR ROW 1 SEARCH + CATEGORIES + FIND EVENTS */
.lf-events-toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lf-events-toolbar-row--search {
    flex-wrap: wrap;
}

/* SEARCH INPUT & CATEGORY DROPDOWN */
.lf-events-search-wrap {
    flex: 1 1 200px;
    min-width: 160px;
}

.lf-events-filter-wrap {
    flex: 0 1 200px;
    min-width: 140px;
}

.lf-events-search,
.lf-events-category-filter {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    color: var(--lf-events-body, #333);
    box-sizing: border-box;
}

.lf-events-search:focus,
.lf-events-category-filter:focus {
    outline: none;
    border-color: var(--lf-events-accent);
}

.lf-events-module--dark .lf-events-search,
.lf-events-module--dark .lf-events-category-filter {
    color: var(--lf-events-body, #ffffff);
}

/* FIND EVENTS BUTTON */
.lf-events-find-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 180px;
    min-width: 180px;
    height: 48px;
    padding: 0 16px;
    background-color: var(--lf-events-accent);
    color: #ffffff !important;
    border: 1px solid var(--lf-events-accent);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.lf-events-find-btn:hover {
    opacity: 0.85;
}

/* TOOLBAR ROW 2 VIEW TOGGLE + PAST EVENTS + EXPORT */
.lf-events-toolbar-row--controls {
    justify-content: space-between;
    margin-bottom: 24px;
}

.lf-events-controls-left,
.lf-events-controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* VIEW TOGGLE */
.lf-events-view-toggle {
    display: flex;
    gap: 12px;
}

.lf-events-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid var(--lf-events-accent);
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--lf-events-accent) !important;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.lf-events-view-btn:hover:not(.active) {
    background: #f5f5f5;
}

.lf-events-view-btn.active {
    background-color: var(--lf-events-accent);
    color: #ffffff !important;
}

/* PAST EVENTS TOGGLE */
.lf-events-past-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
}

.lf-events-past-toggle {
    cursor: pointer;
    width: 14px;
    height: 14px;
}

/* EXPORT DROPDOWN */
.lf-events-export-wrap {
    position: relative;
    flex: 0 0 180px;
}

.lf-events-export-wrap ul,
.lf-events-export-wrap ul li {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.lf-events-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    min-width: 180px;
    gap: 8px;
    height: 48px;
    padding: 0 16px;
    background: #fff;
    color: var(--lf-events-accent) !important;
    border: 1px solid var(--lf-events-accent);
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.lf-events-export-btn:hover {
    opacity: 0.85;
}

.lf-events-export-arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.lf-events-export-btn[aria-expanded="true"] .lf-events-export-arrow {
    transform: rotate(180deg);
}

.lf-events-export-dropdown {
    list-style: none !important;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.lf-events-export-dropdown[hidden] {
    display: none;
}

.lf-events-export-dropdown li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--lf-events-body, #333) !important;
    text-decoration: none;
    transition: background 0.12s;
}

.lf-events-export-dropdown li a:hover {
    background: #f5f5f5;
    text-decoration: none;
}

/* RESULTS AREA + LOADING */
.lf-events-results {
    position: relative;
    min-height: 100px;
    transition: opacity 0.2s;
}

.lf-events-results.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.lf-events-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.lf-events-loading.is-visible {
    display: block;
}

.lf-events-spinner {
    display: block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--lf-events-accent);
    border-radius: 50%;
    animation: lf-events-spin 0.7s linear infinite;
}

@keyframes lf-events-spin {
    to {
        transform: rotate(360deg);
    }
}

.lf-events-none {
    padding: 40px 0;
    text-align: center;
    font-size: 15px;
}

/* MONTH SEPARATOR */
.lf-events-month-sep-item {
    list-style: none !important;
    padding-top: 24px;
}

.lf-events-month-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: var(--lf-events-accent) !important;
}

.lf-events-month-sep::before,
.lf-events-month-sep::after {
    content: '';
    display: block;
    height: 1px;
    background-color: var(--lf-events-accent);
    opacity: 0.3;
}

.lf-events-month-sep::before {
    width: 20px;
    flex-shrink: 0;
}

.lf-events-month-sep::after {
    flex: 1;
}

/* LIST — SELF-CONTAINED, NO SHARED CLASSES NEEDED */
.lf-events-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lf-event-item {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #efefef;
    align-items: flex-start;
}

.lf-events-module--dark .lf-event-item {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.lf-event-item:last-child {
    border-bottom: none;
}

/* FEATURED IMAGE — 44% RATIO, MATCHES THE SLIDER'S IMAGE RATIO */
.lf-event-item__image {
    flex: 0 0 44%;
    width: 44%;
    align-self: stretch;
}

.lf-event-item__image a {
    display: block;
    height: 100%;
}

.lf-event-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* BODY */
.lf-event-item__body {
    flex: 1;
    min-width: 0;
}

/* CATEGORY PILLS */
.lf-event-item__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.lf-pill.lf-pill--tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 20px;
    background-color: var(--lf-events-accent);
    color: #ffffff !important;
}

.lf-event-item__title a {
    text-decoration: none;
}

.lf-event-item__title a:hover {
    text-decoration: underline;
}

/* META DATE + TIME */
.lf-event-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

.lf-event-item__date,
.lf-event-item__time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    opacity: 0.8;
}

/* EXCERPT */
.lf-event-item__excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px;
}

/* FOOTER LINKS */
.lf-event-item__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.lf-event-item__details-link {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--lf-events-accent) !important;
}

.lf-event-item__details-link:hover {
    text-decoration: underline;
}

.lf-event-item__ext-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.lf-event-item__ext-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* PAGINATION */
.lf-events-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
    justify-content: center;
}

.lf-events-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    cursor: pointer;
    background: #fff;
}

.lf-events-module--dark .lf-events-page-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
}

.lf-events-page-btn.active,
.lf-events-page-btn:hover {
    border-color: var(--lf-events-accent);
    color: var(--lf-events-accent) !important;
}

/* MONTH CALENDAR VIEW */
.lf-events-cal {
    width: 100%;
}

.lf-events-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.lf-events-cal-heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.lf-events-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 18px;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.lf-events-module--dark .lf-events-cal-nav-btn {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
}

.lf-events-cal-nav-btn:hover {
    border-color: var(--lf-events-accent);
    color: var(--lf-events-accent) !important;
}

.lf-events-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 20px;
}

.lf-events-cal-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 0;
}

.lf-events-cal-day {
    min-height: 60px;
    padding: 6px;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    cursor: default;
    position: relative;
    background: #fff;
}

.lf-events-module--dark .lf-events-cal-day {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.lf-events-cal-day.has-event {
    cursor: pointer;
    background: #fafafa;
}

.lf-events-module--dark .lf-events-cal-day.has-event {
    background: rgba(255, 255, 255, 0.1);
}

.lf-events-cal-day.has-event:hover {
    background: #f2f2f2;
}

.lf-events-module--dark .lf-events-cal-day.has-event:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lf-events-cal-day.lf-events-cal-empty {
    border-color: transparent;
    background: transparent;
}

.lf-events-cal-day.today,
.lf-events-cal-day.selected {
    border-width: 2px;
    border-color: var(--lf-events-accent);
}

.lf-events-cal-day-num {
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.lf-events-cal-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-top: 5px;
    background-color: var(--lf-events-accent);
}

.lf-events-cal-detail {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 20px;
}

.lf-events-module--dark .lf-events-cal-detail {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.lf-events-cal-detail:empty {
    display: none;
}

.lf-events-cal-detail-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    color: var(--lf-events-body, inherit) !important;
}

.lf-events-cal-detail-list,
.lf-events-cal-detail-list li,
.lf-events-cal-detail-item {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.lf-events-cal-detail-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 0;
}

.lf-events-cal-detail-item:first-child {
    padding-top: 12px;
}

.lf-events-module--dark .lf-events-cal-detail-item {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.lf-events-cal-detail-item:last-child {
    border-bottom: none;
}

.lf-events-cal-detail-item a {
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: var(--lf-events-accent) !important;
}

.lf-events-cal-detail-item a:hover {
    text-decoration: underline;
}

.lf-events-cal-detail-time {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    opacity: 0.8;
}

/* SLIDER WRAPPER + TRACK */
.lf-events-slider-wrap {
    position: relative;
    width: 100%;
}

.lf-events-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.lf-events-slider-clip {
    overflow: hidden;
    width: 100%;
}

.lf-events-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    cursor: grab;
}

.lf-events-slider-track.is-dragging {
    transition: none;
    cursor: grabbing;
}

.lf-events-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}

.lf-events-slider-slide .lf-event-item {
    gap: 32px;
    padding: 5px;
    border-bottom: none;
}

.lf-events-slider-slide .lf-event-item__image img {
    min-height: 280px;
}

.lf-events-slider-slide .lf-event-item__body {
    padding: 8px 64px 8px 0;
}

.lf-events-slider-slide .lf-event-item__title {
    font-size: 24px;
    margin-bottom: 12px;
}

.lf-events-slider-slide .lf-event-item__excerpt {
    font-size: 15px;
    margin-bottom: 20px;
}

/* SLIDER ARROWS */
.lf-events-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--lf-events-accent);
    border: 1px solid var(--lf-events-accent);
    border-radius: 50%;
    cursor: pointer;
    color: #fff !important;
    transition: opacity 0.2s, transform 0.2s;
}

.lf-events-module--dark .lf-events-slider-arrow {
    background-color: #fff;
    border-color: #fff;
    color: var(--lf-events-accent) !important;
}

.lf-events-slider-arrow:hover {
    opacity: 0.85;
    transform: translateY(-50%) scale(1.05);
}

.lf-events-slider-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.lf-events-slider-arrow--prev {
    left: 12px;
}

.lf-events-slider-arrow--next {
    right: 12px;
}

/* SLIDER DOTS */
.lf-events-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.lf-events-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.lf-events-module--dark .lf-events-slider-dot {
    background: rgba(255, 255, 255, 0.3);
}

.lf-events-slider-dot.active {
    background: var(--lf-events-accent);
    transform: scale(1.25);
}

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .lf-events-toolbar-row--controls {
        flex-wrap: wrap;
        gap: 12px;
    }

    .lf-events-controls-left {
        flex-wrap: wrap;
        gap: 12px;
    }

    .lf-events-toolbar-row--search {
        flex-direction: column;
        align-items: stretch;
    }

    .lf-events-find-btn {
        width: 100%;
    }

    .lf-events-export-dropdown {
        right: auto;
        left: 0;
    }

    .lf-event-item {
        flex-direction: column;
        gap: 16px;
    }

    .lf-event-item__image {
        flex: none;
        width: 100%;
    }

    .lf-event-item__image img {
        height: 200px;
    }

    .lf-events-cal-day {
        min-height: 36px;
    }

    .lf-events-cal-day-num {
        font-size: 10px;
    }

    .lf-events-slider-slide .lf-event-item {
        flex-direction: column;
        gap: 16px;
    }

    .lf-events-slider-slide .lf-event-item__image {
        flex: none;
        width: 100%;
    }

    .lf-events-slider-slide .lf-event-item__image img {
        min-height: 200px;
        height: 220px;
    }

    .lf-events-slider-arrow--prev {
        left: 8px;
    }

    .lf-events-slider-arrow--next {
        right: 8px;
    }

    .lf-events-slider-slide .lf-event-item__title {
        font-size: 20px;
    }
}