/**
 * WP Event Page Manager - Styles
 */

/* Grid View */
.wpepm-events-grid {
    display: grid;
    gap: 30px;
    margin: 0 0 30px 0;
}

.wpepm-events-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wpepm-events-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wpepm-events-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .wpepm-events-columns-4,
    .wpepm-events-columns-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .wpepm-events-columns-4,
    .wpepm-events-columns-3,
    .wpepm-events-columns-2 { grid-template-columns: 1fr; }
}

/* Event Card */
.wpepm-event-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e5e5;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.wpepm-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wpepm-event-image {
    overflow: hidden;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f0f0f0;
}

.wpepm-event-image a {
    display: block;
    height: 100%;
    width: 100%;
}

.wpepm-event-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.wpepm-event-content {
    padding: 20px;
}

/* Mixed View */
.wpepm-events-mixed .wpepm-events-list {
    margin-top: 30px;
}

/* Event Title */
.wpepm-event-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.3;
}

.wpepm-event-title a {
    color: inherit;
    text-decoration: none;
}

.wpepm-event-title a:hover {
    color: #0073aa;
}

/* Date & Time */
.wpepm-event-date-time {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.wpepm-events-grid .wpepm-event-date {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.wpepm-events-grid .wpepm-event-time {
    display: block;
    color: #888;
}

.wpepm-events-list .wpepm-event-date {
    font-weight: 600;
    display: inline;
}

.wpepm-events-list .wpepm-event-time-separator {
    display: inline;
}

.wpepm-events-list .wpepm-event-time {
    display: inline;
    color: #888;
}

/* Excerpt */
.wpepm-event-excerpt {
    margin-bottom: 15px;
    color: #666;
}

/* Event Link */
.wpepm-event-link {
    display: inline-block;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.wpepm-event-link:hover {
    background: #005a87;
    color: #fff;
}

/* List View */
.wpepm-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 0 30px 0;
}

.wpepm-event-list-item {
    display: flex;
    gap: 20px;
    border: 1px solid #e5e5e5;
    padding: 20px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.wpepm-event-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpepm-event-list-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    overflow: hidden;
}

.wpepm-event-list-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

.wpepm-event-list-content {
    flex-grow: 1;
}

@media (max-width: 768px) {
    .wpepm-event-list-item {
        flex-direction: column;
    }
    
    .wpepm-event-list-image {
        width: 100%;
    }
    
    .wpepm-events-list .wpepm-event-date {
        display: block;
        margin-bottom: 5px;
    }
    
    .wpepm-events-list .wpepm-event-time-separator {
        display: none;
    }
    
    .wpepm-events-list .wpepm-event-time {
        display: block;
    }
}

@media (max-width: 576px) {
    .wpepm-events-list {
        display: grid;
        gap: 30px;
    }
    
    .wpepm-event-list-item {
        display: flex;
        flex-direction: column;
        border: 1px solid #e5e5e5;
        padding: 0;
        background: #fff;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .wpepm-event-list-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .wpepm-event-list-image {
        width: 100%;
        overflow: hidden;
        position: relative;
        aspect-ratio: 3 / 2;
        background: #f0f0f0;
        height: auto;
    }
    
    .wpepm-event-list-image a {
        display: block;
        height: 100%;
        width: 100%;
    }
    
    .wpepm-event-list-image img {
        transition: transform 0.3s ease;
    }
    
    .wpepm-event-list-item:hover .wpepm-event-list-image img {
        transform: scale(1.05);
    }
    
    .wpepm-event-list-content {
        padding: 20px;
    }
}

/* Filter Bar */
.wpepm-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.wpepm-filter-pill {
    display: inline-block;
    padding: 8px 20px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.wpepm-filter-pill:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.wpepm-filter-pill.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.wpepm-filter-pill.active:hover {
    background: #005a87;
    border-color: #005a87;
}

/* AJAX loading transition */
.wpepm-events-ajax-target {
    transition: opacity 0.2s ease;
}

@media (max-width: 576px) {
    .wpepm-filter-bar {
        gap: 6px;
    }
    
    .wpepm-filter-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* No Results */
.wpepm-events-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Recurring Info */
.wpepm-event-recurring-info {
    padding: 15px;
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.wpepm-event-recurring-info strong {
    color: #0073aa;
}

/* Container Clearfix */
.wpepm-events-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Single Event Page */
.wpepm-single-event {
    max-width: 800px;
    margin: 0 auto;
}

.wpepm-single-event-header {
    margin-bottom: 30px;
}

.wpepm-single-event-title {
    margin: 0 0 20px 0;
}

.wpepm-single-event-meta {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    align-items: center;
}

.wpepm-single-event-date {
    font-weight: 600;
    font-size: 18px;
}

.wpepm-single-event-time-separator {
    margin: 0 10px;
}

.wpepm-single-event-time {
    font-size: 16px;
    color: #666;
}

.wpepm-single-event-location {
    font-size: 16px;
    color: #666;
}

.wpepm-single-event-location-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 5px 0;
}

.wpepm-single-event-location-row + .wpepm-single-event-location-row {
    border-top: 1px solid #eee;
}

.wpepm-single-event-location-row .wpepm-single-event-location {
    min-width: 140px;
    color: #333;
}

.wpepm-single-event-rsvp {
    margin-bottom: 30px;
}

.wpepm-single-event-content {
    line-height: 1.6;
    margin-bottom: 30px;
}

.wpepm-single-event-recurring-info {
    padding: 15px;
    background: #f0f8ff;
    border-left: 4px solid #0073aa;
    margin-top: 30px;
}

.wpepm-single-event-recurring-info strong {
    color: #0073aa;
}

@media (max-width: 576px) {
    .wpepm-single-event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wpepm-single-event-time-separator {
        display: none;
    }
}