/* Debug Helpers */
.pco-error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.pco-success {
    color: #155724;
    background-color: #d4edda;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.pco-notice {
    color: #0c5460;
    background-color: #d1ecf1;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Grid Layouts */
.pco-groups,
.pco-registrations-minimal {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 1rem 0;
}

/* Card Styles */
.pco-group,
.pco-registration-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Headers */
.pco-group h4,
.pco-registration-card h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    line-height: 1.4;
    font-weight: bold;
}

.pco-registration-content h5,
.pco-group h5 {
    /* padding: 0; */
    font-size: 26px;
    margin: 0 0 10px 0;
}

/* Meta Information */
.pco-group-meta,
.pco-registration-date {
    color: #4a5568;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pco-bold {
    font-weight: bold;
}

.pco-group-members {
    display: none;
}

/* Description Areas */
.pco-group-description,
.pco-registration-description {
    color: #4a5568;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Images */

/* REPLACE the problematic loading spinner CSS in frontend-styles.php with this fixed version */

/* Enhanced Group Image Styles */
.pco-group-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: #f7fafc;
    position: relative;
    border: 1px solid #e2e8f0;
}

.pco-group-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    /* ADDED: This ensures the image appears above the loading spinner */
    position: relative;
    z-index: 2;
}

.pco-group:hover .pco-group-image img {
    transform: scale(1.05);
}

/* Fallback styling for placeholder images */
.pco-group-image img[src*="group-placeholder.jpg"],
.pco-group-image img[src*="placeholder"] {
    object-fit: contain;
    padding: 20px;
    opacity: 0.7;
    background-color: #f8f9fa;
}

/* FIXED: Loading state - only show when image hasn't loaded yet */
.pco-group-image.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #de7130;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pco-group-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .pco-group-image {
        height: 120px;
    }
}

/* Error state styling for broken images */
.pco-group-image img[onerror] {
    display: block;
}

/* Optional: Add a subtle background pattern for empty states */
.pco-group-image:empty {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="%23cbd5e0" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}



.pco-registration-image {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 0;
}

/* Single Registration Layout */
.pco-single-registration {
    max-width: 800px;
    margin: 0 auto;
    background: none;
    border: none;
    overflow: hidden;
}

.pco-registration-single-card {
    display: flex;
    flex-direction: column;
}

.pco-registration-single-image {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.pco-registration-single-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pco-registration-button-container {
    bottom: 0;
    margin: auto;
}

/* IMPROVED: Watermark-Style Event Cards */
.pco-registrations-table {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.pco-event-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.pco-event-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* KEY FIX: Remove align-items: center and use stretch */
.pco-event-card {
    display: flex;
    align-items: stretch; /* CHANGED: This allows height stretching */
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 0; /* CHANGED: Remove padding from main container */
    transition: all 0.2s ease;
    min-height: 80px;
    overflow: hidden; /* ADDED: Clean edges */
}

.pco-event-card:hover {
    background-color: #f7fafc;
    border-color: #dedede;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* IMPROVED: Date container now stretches full height */
.pco-event-card__date {
    flex-shrink: 0;
    display: flex; /* ADDED */
    align-items: stretch; /* ADDED */
    margin:5px;
}

/* IMPROVED: Date box now fills full height */
.pco-event-card__date-box {
    background: #f6f4f0;
    color: #333;
    text-align: center;
    width: 60px;
    /* REMOVED: Fixed height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 0; /* ADDED: Some breathing room */
}

.pco-event-card__month {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1;
}

.pco-event-card__day {
    font-weight: 700;
    margin: 2px 0 0 0;
    line-height: 1;
    color: #de7130;
}

/* IMPROVED: Content area with proper padding */
.pco-event-card__content {
    flex-grow: 1;
    min-width: 0;
    padding: 15px 10px; /* MOVED: Padding here instead of on card */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pco-event-card__title {

    color: #2d3748;
    margin: 0 0 8px 0; /* IMPROVED: Better spacing */
    line-height: 1.3;
}

.pco-event-status-notice {
    color: #e53e3e;
    font-weight: 500;
    font-size: 0.9rem;
}

.pco-event-card__meta {
    color: #4a5568;
    line-height: 1.4;
    margin: 0; /* REMOVED: Extra margin */
}

.pco-event-card__time {
    font-weight: 500;
    color: #2d3748;
}

.pco-event-card__desc {
    color: #4a5568;
}

/* IMPROVED: Action area */
.pco-event-card__action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 15px; /* MOVED: Padding here */
}

.pco-event-card__btn {
    display: inline-block;
    white-space: nowrap;
    text-transform: uppercase;
}

.pco-event-card:hover .pco-event-card__btn {
    /* hover handled by fl-button */
}

/* Responsive Design for Watermark-Style Cards */
@media (max-width: 768px) {
    .pco-event-card {
        
    }
        /* IMPROVED: Date container now stretches full height */
    .pco-event-card__date {
        flex-shrink: 0;
        display: flex; /* ADDED */
        align-items: stretch; /* ADDED */
        margin:5px;
    }

    /* IMPROVED: Date box now fills full height */
    .pco-event-card__date-box {
        background: #f6f4f0;
        color: #333;
        text-align: center;
        width: 60px;
        /* REMOVED: Fixed height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 10px 0; /* ADDED: Some breathing room */
    }
    
    .pco-event-card__month {

    }
    
    .pco-event-card__day {

    }
    
    .pco-event-card__content {
        padding: 10px;
        margin-bottom: 1rem;
    }
    
    .pco-event-card__action {
        display:none;
    }
}

@media (max-width: 480px) {
    .pco-event-card {
        padding: 0;
    }
    
    .pco-event-card__content {
        padding: 8px;
    }
    
    .pco-event-card__meta {
        font-size: 1.3rem;
    }
}

/* Buttons and Links ÃƒÂ¢Ã¢â€šÂ¬Ã¢â‚¬Â inherit site's fl-button styles */
.pco-group-link,
.pco-registration-link,
.pco-event-grid-link {
    text-decoration: none;
    text-align: center;
    align-self: center;
    display: inline-flex;
    text-transform: uppercase;
}

.pco-event-card__btn {
    text-transform: uppercase;
}

/* ============================================================
   EVENT GRID CARDS (matches groups card layout)
   ============================================================ */

.pco-events-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 1rem 0;
    animation: fadeIn 0.3s ease;
}

/* Single event: centered, 50% wider than standard card */
.pco-events-grid.pco-events-count-1 {
    grid-template-columns: 1fr;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.pco-events-grid.pco-events-count-1 .pco-event-grid-card h5 {
    font-size: 32px;
}

.pco-events-grid.pco-events-count-1 .pco-event-grid-image {
    height: 300px;
}

/* Two events: centered side by side */
.pco-events-grid.pco-events-count-2 {
    grid-template-columns: repeat(2, minmax(300px, 400px));
    justify-content: center;
}

/* Three or more: center the last row's dangling cards */
.pco-events-grid:not(.pco-events-count-1):not(.pco-events-count-2) {
    justify-items: center;
}

/* Mobile: all counts stack to single column */
@media (max-width: 680px) {
    .pco-events-grid.pco-events-count-1 {
        max-width: 100%;
    }

    .pco-events-grid.pco-events-count-1 .pco-event-grid-image {
        height: 200px;
    }

    .pco-events-grid.pco-events-count-1 .pco-event-grid-card h5 {
        font-size: 26px;
    }

    .pco-events-grid.pco-events-count-2 {
        grid-template-columns: 1fr;
    }
}

.pco-event-grid-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pco-event-grid-card h5 {
    font-size: 26px;
    margin: 0 0 10px 0;
}

/* Event Grid Image */
.pco-event-grid-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: #f7fafc;
    position: relative;
    border: 1px solid #e2e8f0;
}

.pco-event-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.pco-event-grid-card:hover .pco-event-grid-image img {
    transform: scale(1.05);
}

/* No-image placeholder */
.pco-event-grid-image--no-image {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading spinner for images */
.pco-event-grid-image.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #de7130;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

/* Date badge overlaid on image */
.pco-event-grid-date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 3;
    line-height: 1;
}

.pco-event-grid-date-month {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #de7130;
    letter-spacing: 0.5px;
}

.pco-event-grid-date-day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-top: 2px;
}

/* No-image: center the badge */
.pco-event-grid-image--no-image .pco-event-grid-date-badge {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 10px;
}

.pco-event-grid-image--no-image .pco-event-grid-date-month {
    font-size: 14px;
}

.pco-event-grid-image--no-image .pco-event-grid-date-day {
    font-size: 36px;
}

/* Multi-day date range badge */
.pco-event-grid-date-badge--range {
    padding: 6px 12px;
}

.pco-event-grid-date-badge--range .pco-event-grid-date-day {
    font-size: 16px;
    white-space: nowrap;
}

.pco-event-grid-image--no-image .pco-event-grid-date-badge--range .pco-event-grid-date-day {
    font-size: 28px;
}

/* ====================================
   FEATURED EVENT - 2-column layout
   ==================================== */

.pco-featured-event {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f5f4f0;
    border-radius: 4px;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    padding:20px;
}

.pco-featured-event__image {
    position: relative;
    min-height: 400px;
}

.pco-featured-event__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.pco-featured-event__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
}

.pco-featured-event__content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pco-featured-event__date {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #de7130;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.pco-featured-event__title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.pco-featured-event__schedule {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.pco-featured-event__campus {
    font-size: 14px;
    color: #718096;
    margin-bottom: 1.25rem;
}

.pco-featured-event__description {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.pco-featured-event__btn {
    align-self: flex-start;
}

/* Featured event mobile: stack to single column */
@media (max-width: 768px) {
    .pco-featured-event {
        grid-template-columns: 1fr;
    }

    .pco-featured-event__image {
        min-height: 250px;
    }

    .pco-featured-event__content {
        padding: 1.5rem;
    }

    .pco-featured-event__title {
        font-size: 26px;
    }
}

/* Meta info */
.pco-event-grid-meta {
    color: #4a5568;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pco-event-grid-schedule {
    font-weight: 500;
}

.pco-event-grid-campus {
    color: #718096;
    font-size: 0.9em;
}

/* Description */
.pco-event-grid-description {
    color: #4a5568;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .pco-event-grid-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .pco-event-grid-image {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
/* Filter Form Styles */
.pco-groups-filters,
.pco-registrations-filters {
    margin: 0 auto 15px auto;
    padding: 15px;
}

.pco-filter-row {
    margin-bottom: 1rem;
}

.pco-filter-row label {
    display: none;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.pco-filter-row select,
.pco-filter-row input[type="search"] {
    width: 100%;
    font-weight: 400;
    font-style: italic;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    box-shadow: 0 2px 7px 0px rgba(0, 0, 0, 0.07);
    padding: 12px;
}

.pco-filter-row button {
    background: #333939;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0;
    cursor: pointer;
}

.pco-filter-row button a {
    color: white;
    transition: all 0.2s ease;
}

.pco-filter-row button:hover {
    opacity: 0.8;
    transition: all 0.2s ease;
}

button.filter-submit {
    color: white !important;
    font-size: 16px;
    line-height: 18px;
    padding: 12px 36px;
    border-radius: 0;
    font-weight: 400;
    text-align: center;
    transition: all 0.2s ease;
    margin: 20px auto;
    width: auto;
}


/* ANIMATED FILTER FOR GROUPS / EVENTS */
/* Add this CSS to templates/frontend-styles.php */

/* Filter Toggle Button */
.pco-filter-toggle-container {
    margin-bottom: 20px;
    text-align: right;
}

.pco-filter-toggle-btn {
    background: #de7130;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.pco-filter-toggle-btn:hover {
    background: #bd591e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-icon {
    font-size: 18px;
    display:inline-block;

}

.filter-count {
    background: #fff;
    color: #de7130!important;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 4px;
}

/* Sliding Filter Panel */
.pco-filter-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 10000;
    transition: right 0.3s ease;
    box-shadow: -2px 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.pco-filter-panel.active {
    right: 0;
}

.pco-filter-panel-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.pco-filter-panel-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 20px;
}

.pco-filter-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #4a5568;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.2s ease;
}

.pco-filter-close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .pco-filter-close-btn {
        background: #de7130;
        color: white;
        font-size: 16px;
        font-weight: 500;
        padding: 12px 24px;
        border: none;
        min-width: 120px;
    }
    
    .pco-filter-close-btn:hover {
        background: #bd591e;
        color: white;
    }
    
    /* Hide the X symbol on mobile and show text instead */
    .pco-filter-close-btn::before {
        content: "See Results";
    }
    
    /* Hide the original X content on mobile */
    .pco-filter-panel.active .pco-filter-close-btn {
        font-size: 0; /* Hide the ÃƒÆ’Ã¢â‚¬â€ character */
    }
    
    /* Ensure the before content shows */
    .pco-filter-panel.active .pco-filter-close-btn::before {
        font-size: 16px;
    }
    
    /* Center the button in the header on mobile */
    .pco-filter-panel-header {
        justify-content: space-between;
        align-items: center;
    }
    
    /* Make the header more mobile-friendly */
    @media (max-width: 480px) {
        .pco-filter-panel-header {
            flex-direction: column;
            gap: 15px;
            text-align: center;
        }
        
        .pco-filter-close-btn {
            width: 100%;
            order: 2;
        }
        
        .pco-filter-panel-header h3 {
            order: 1;
            margin: 0;
        }
    }
}

.pco-filter-panel-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.pco-filter-group {
    margin-bottom: 24px;
}

.pco-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.pco-filter-group select,
.pco-filter-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.pco-filter-group select:focus,
.pco-filter-group input:focus {
    outline: none;
    border-color: #de7130;
    box-shadow: 0 0 0 3px rgba(222, 113, 48, 0.1);
}

.pco-filter-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.pco-clear-btn {
    background: #f7fafc!important;
    color: #4a5568!important;
    border: 2px solid #e2e8f0;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 16px;
}

.pco-clear-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.pco-results-count {
    text-align: center;
    color: #4a5568;
    font-size: 14px;
    font-style: italic;
}

/* Overlay - COMPLETE DEFINITION */
.pco-filter-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s ease !important;
}

.pco-filter-overlay.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .pco-filter-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .pco-filter-toggle-container {
        text-align: center;
    }
    
    .pco-filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for groups appearing */
.pco-groups {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.pco-groups-loading {
    text-align: center;
    padding: 40px;
    color: #4a5568;
    font-style: italic;
}

.pco-groups-loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #de7130;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* DESKTOP RESET: Force panel closed on desktop */
@media (min-width: 769px) {
    .pco-filter-panel {
        right: -400px !important; /* Force hidden state */
        width: 400px; /* Fixed width on desktop */
    }
    
    .pco-filter-panel.active {
        right: 0 !important; /* Show when active */
    }
    
    /* Desktop close button (X) - remove mobile overrides */
    .pco-filter-close-btn {
        background: none !important;
        border: none !important;
        font-size: 24px !important;
        color: #4a5568 !important;
        cursor: pointer;
        padding: 5px !important;
        line-height: 1;
        transition: all 0.2s ease;
        min-width: unset !important; /* Reset mobile width */
    }
    
    .pco-filter-close-btn:hover {
        background: #e2e8f0 !important;
        color: #2d3748 !important;
    }
    
    /* Remove mobile "See Results" text on desktop */
    .pco-filter-close-btn::before {
        content: none !important;
    }
    
    /* Ensure X shows on desktop */
    .pco-filter-panel.active .pco-filter-close-btn {
        font-size: 24px !important; /* Override mobile font-size: 0 */
    }
    
    /* Show results count on desktop */
    .pco-results-count {
        display: block !important;
    }
    
    /* Reset mobile flex ordering on desktop */
    .pco-filter-actions {
        order: unset !important;
        margin-top: 30px;
        margin-bottom: 0;
        padding-top: 20px;
        padding-bottom: 0;
        border-top: 1px solid #e2e8f0;
        border-bottom: none;
        display: block !important;
        flex-direction: column !important;
    }
    
    .pco-filter-panel-content {
        display: block !important;
    }
}

/* OVERLAY FIXES - ENHANCED */
.pco-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease;
    pointer-events: none !important;
    display: none !important; /* Extra protection - completely hide it */
}

.pco-filter-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: block !important; /* Show it when active */
}

/* MOBILE-SPECIFIC OVERLAY FIXES */
@media (max-width: 768px) {
    .pco-filter-overlay {
        background: rgba(0, 0, 0, 0.7) !important; /* Darker on mobile for better contrast */
        display: none !important;
    }
    
    .pco-filter-overlay.active {
        display: block !important;
    }
}

/* MOBILE IMAGE HEIGHT FIXES */
@media (max-width: 768px) {
    .pco-group-image {
        height: 180px !important; /* Increased from 150px */
        min-height: 180px !important; /* Ensure minimum height */
    }
    
    .pco-group-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .pco-group-image {
        height: 160px !important; /* Increased from 120px */
        min-height: 160px !important; /* Ensure minimum height */
    }
}

/* MOBILE IMAGE HEIGHT FIXES */
@media (max-width: 768px) {
    .pco-group-image {
        height: 180px !important; /* Increased from 150px */
        min-height: 180px !important; /* Ensure minimum height */
    }
    
    .pco-group-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
}

@media (max-width: 480px) {
    .pco-group-image {
        height: 160px !important; /* Increased from 120px */
        min-height: 160px !important; /* Ensure minimum height */
    }
}

/* Responsive visibility classes - ADD THESE */
.pco-mobile-only {
    display: block;
}

.pco-desktop-only {
    display: none;
}

/* Desktop breakpoint - adjust as needed */
@media (min-width: 768px) {
    .pco-mobile-only {
        display: none;
    }
    
    .pco-desktop-only {
        display: block;
    }
}

/* NEW: Desktop filter bar styles - ADD THESE */
.pco-filter-desktop {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
}

.pco-filter-desktop-content {
    max-width: 100%;
}

.pco-filter-desktop .pco-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    margin-bottom: 15px;
}

.pco-filter-desktop .pco-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
    margin-bottom: 0; /* Override existing margin */
}

.pco-filter-desktop .pco-search-group {
    flex: 2; /* Make search field wider */
    min-width: 250px;
}

.pco-filter-desktop .pco-filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
    font-size: 14px;
    display: block; /* Override existing display: none */
}

.pco-filter-desktop .pco-filter-group select,
.pco-filter-desktop .pco-filter-group input {
    padding: 8px 12px;
    font-size: 14px;
    background: white;
    width: 100%;
    font-style: normal; /* Override existing italic */
    font-weight: normal; /* Override existing font-weight */
}

.pco-filter-desktop .pco-filter-group select:focus,
.pco-filter-desktop .pco-filter-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.pco-filter-desktop .pco-filter-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 0; /* Override existing margin */
    padding-top: 0; /* Override existing padding */
    border-top: none; /* Override existing border */
}

.pco-filter-desktop .pco-clear-btn {
    background: #6c757d !important;
    color: white !important;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    width: auto; /* Override existing width: 100% */
    margin-bottom: 0; /* Override existing margin */
}

.pco-filter-desktop .pco-clear-btn:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
    color: white !important;
}

.pco-filter-desktop .pco-results-count {
    font-size: 14px;
    color: #6c757d;
    white-space: nowrap;
    text-align: left; /* Override existing center alignment */
    font-style: normal; /* Override existing italic */
}

/* Responsive adjustments for smaller desktop screens */
@media (min-width: 768px) and (max-width: 1024px) {
    .pco-filter-desktop .pco-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pco-filter-desktop .pco-filter-group {
        min-width: 100%;
    }
    
    .pco-filter-desktop .pco-filter-actions {
        justify-content: space-between;
        margin-top: 10px;
    }
}

