/* Main grid - responsive layout */
.wpfec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* better large-screen fit */
    gap: 24px;
    margin: 20px 0;
}

/* Let wrappers participate in the grid so cards align nicely */
.wpfec-events-active,
.wpfec-events-past {
    display: contents;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .wpfec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .wpfec-grid {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 1400px) {
    .wpfec-grid {
        gap: 28px;
    }
}

/* Event cards - consistent styling */
.wpfec-item {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #f9f9f9;
    position: relative;
    transition: all 0.3s ease;
}

.wpfec-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wpfec-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.wpfec-item a {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: #0073aa;
}

.wpfec-item a:hover {
    text-decoration: underline;
}

/* Date box styling */
.wpfec-date-box {
    width: 48px;
    height: 48px;
    background: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 10px;
}

.wpfec-date-box.past-event {
    background: #dc3545;
}

.wpfec-day {
    font-size: 1.3em;
    line-height: 1;
}

.wpfec-month {
    font-size: 0.9em;
    text-transform: uppercase;
    line-height: 1;
}

/* Event cover image */
.wpfec-cover {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
}

/* Multi-day info - simplified styling */
.wpfec-multiday-info {
    background: #510000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    margin: 10px 0;
    font-weight: bold;
    text-align: center;
}

.wpfec-multiday-info.first {
    background: #28a745;
}

.wpfec-multiday-info.middle {
    background: #ffc107;
    color: #000;
}

.wpfec-multiday-info.last {
    background: #dc3545;
}

/* Day progression indicator */
.wpfec-day-progression {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
    gap: 4px;
}

.wpfec-day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s;
}

.wpfec-day-dot.active {
    background: #510000;
    transform: scale(1.5);
}

.wpfec-day-dot.completed {
    background: #28a745;
}

/* Time info */
.wpfec-time-info {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    margin: 10px 0;
    color: #333;
}

/* Actions section */
.wpfec-actions {
    margin-top: 15px;
}

.wpfec-buy-ticket {
    background: #510000;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.wpfec-buy-ticket:hover {
    background: #720000;
    text-decoration: none !important;
}

/* Filter buttons + controls - simplified */
.wpfec-controls {
    display: flex;
    align-items: center;
    margin: 10px 0 6px;
}

.wpfec-filters {
    margin: 10px 0;
    text-align: left;
}

/* Controls: convert to single Filtre button + dropdown */
.wpfec-filter-wrap {
    position: relative;
    z-index: 100; /* Ensure dropdown appears above other elements */
}
.wpfec-filter-toggle {
    background: linear-gradient(180deg, #6b0a0a, #510000);
    color: #fff;
    border: 1px solid #410000;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 -1px 0 rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    outline: none; /* Remove focus outline that might make it look pressed */
}

.wpfec-filter-toggle:hover {
    background: linear-gradient(180deg, #7b1a1a, #610000);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Remove any active/pressed state styling */
.wpfec-filter-toggle:active,
.wpfec-filter-toggle:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 -1px 0 rgba(255,255,255,0.08);
}

.wpfec-filter-toggle .filter-icon {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.wpfec-filter-toggle .chev {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.wpfec-filter-wrap.open .chev {
    transform: rotate(180deg);
}

/* Dropdown menu styles - ensure it's hidden by default */
.wpfec-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px;
    display: none;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.wpfec-filter-wrap.open .wpfec-filter-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Filter options */
.wpfec-filter-option {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpfec-filter-option:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.wpfec-filter-option.active {
    background: #510000;
    color: #fff;
}

.wpfec-filter-option.active:hover {
    background: #610000;
}

/* Remove disabled styles since button is now functional */
.wpfec-filter-toggle:disabled {
    display: none;
}

/* Remove search styles since we don't need them */
.wpfec-search {
    display: none;
}
#wpfec-search-input,
.wpfec-search-btn {
    display: none;
}

/* Section separator: use <hr /> */
.wpfec-section-separator {
    grid-column: 1 / -1;
    border: none;
    border-top: 2px solid #510000;
    margin: 8px 0 14px;
    opacity: 0.6;
}

/* Pagination */
.wpfec-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 16px 0 0;
}
.wpfec-page-btn {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.wpfec-page-btn:hover { background: #f3f4f6; }
.wpfec-page-btn.active {
    background: #510000;
    border-color: #510000;
    color: #fff;
}
.wpfec-page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Focus styles for better usability */
.wpfec-filter-toggle:focus-visible,
.wpfec-filter-option:focus-visible,
.wpfec-search-btn:focus-visible,
#wpfec-search-input:focus-visible {
    outline: 3px solid rgba(81,0,0,0.35);
    outline-offset: 2px;
    box-shadow: none;
}

/* Existing styles kept (cards, date box, cover, multiday, time, actions) */