/**
 * EventPrime Filters Public Styles
 */

.epf-filters-wrapper {
    margin: 20px 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.epf-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.epf-filter-item {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    flex: 1;
}

.epf-filter-item label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.epf-filter-item input,
.epf-filter-item select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.epf-filter-item input:focus,
.epf-filter-item select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 1px #007cba;
}

.epf-filter-date-range .epf-date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.epf-filter-date-range .epf-date-inputs input {
    flex: 1;
}

.epf-date-separator {
    color: #666;
    font-weight: bold;
}

.epf-filter-submit {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}

.epf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.epf-btn-primary {
    background-color: #007cba;
    color: #fff;
}

.epf-btn-primary:hover {
    background-color: #005a87;
}

.epf-btn-secondary {
    background-color: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
}

.epf-btn-secondary:hover {
    background-color: #e6e7e8;
}

.epf-btn.epf-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.epf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .epf-filters-container {
        flex-direction: column;
    }
    
    .epf-filter-item {
        min-width: 100%;
    }
    
    .epf-filter-submit {
        flex-direction: column;
        margin-top: 15px;
    }
    
    .epf-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .epf-filter-date-range .epf-date-inputs {
        flex-direction: column;
        gap: 5px;
    }
    
    .epf-date-separator {
        display: none;
    }
}

/* Filtered Events Results */
.epf-filtered-events {
    margin-top: 30px;
    border-top: 2px solid #ddd;
    padding-top: 20px;
}

.epf-results-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.epf-events-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.epf-event-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.epf-event-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.epf-event-image {
    flex-shrink: 0;
    width: 150px;
}

.epf-event-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.epf-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.epf-event-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.epf-event-title a {
    color: #333;
    text-decoration: none;
}

.epf-event-title a:hover {
    color: #007cba;
}

.epf-event-date,
.epf-event-venue,
.epf-event-type,
.epf-event-category {
    font-size: 14px;
    color: #666;
}

.epf-event-date-label,
.epf-event-venue-label,
.epf-event-type-label,
.epf-event-category-label {
    font-weight: 600;
    color: #333;
}

.epf-event-time {
    margin-left: 10px;
    font-style: italic;
}

.epf-event-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-top: 5px;
}

.epf-event-actions {
    margin-top: auto;
    padding-top: 10px;
}

.epf-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.epf-pagination {
    text-align: center;
    margin-top: 30px;
}

.epf-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s ease;
}

.epf-pagination .page-numbers:hover,
.epf-pagination .page-numbers.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.epf-pagination .page-numbers.prev,
.epf-pagination .page-numbers.next {
    font-weight: 600;
}

/* Mobile Responsive for Events */
@media (max-width: 768px) {
    .epf-event-item {
        flex-direction: column;
    }
    
    .epf-event-image {
        width: 100%;
    }
    
    .epf-event-image img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .epf-event-item {
        padding: 15px;
        gap: 10px;
    }
    
    .epf-results-title {
        font-size: 16px;
    }
}

/* AJAX Loading Styles */
.ep-events-results-wrapper {
    position: relative;
}

.epf-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    min-height: 200px;
    backdrop-filter: blur(2px);
}

.epf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: epf-spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes epf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.epf-loading-overlay p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Loading button state */
.epf-btn.epf-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Smooth transitions for results */
.epf-filtered-events {
    transition: opacity 0.3s ease;
}

.epf-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 4px;
    margin: 20px 0;
}

.epf-no-events p {
    color: #666;
    font-size: 16px;
    margin: 0;
}
