/* Carnevale Events Frontend Styles */

/* Events Archive Styles */
.events-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.events-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.archive-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.archive-description {
    color: #666;
    font-size: 1.1rem;
}

/* Events Search */
.events-search {
    margin-bottom: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.events-search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-row input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 300px;
}

.search-row button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-row button:hover {
    background-color: #005a87;
}

.filters-toggle-btn {
    padding: 10px 15px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-toggle-btn:hover {
    background-color: #555;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.clear-filters-btn {
    padding: 10px 15px;
    background-color: #dc3232;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.clear-filters-btn:hover {
    background-color: #b32d2e;
}

.filters-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filter-group input[type="date"],
.filter-group input[type="text"],
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 150px;
    background-color: white;
}

.filter-group input[type="checkbox"] {
    margin-right: 5px;
}

.filter-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    font-weight: normal;
}


/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.event-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.event-card-thumbnail {
    position: relative;
    overflow: hidden;
}

.event-card-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.event-card-title {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

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

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

.event-card-meta {
    margin-bottom: 15px;
}

.event-card-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.event-card-meta .dashicons {
    margin-right: 8px;
    color: #0073aa;
}

.event-card-category {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9rem;
}

.event-category {
    display: flex;
    align-items: center;
}

.event-card-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.event-card-actions {
    text-align: right;
}

.btn-event-details {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn-event-details:hover {
    background-color: #005a87;
    color: white;
}

/* No Events */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Single Event Styles */
.event-single-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.event-single {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.event-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.event-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
}

.event-meta {
    display: grid;
    gap: 15px;
}

.event-meta > div {
    display: flex;
    align-items: center;
}

.event-meta-label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
    min-width: 80px;
}

.event-meta-value {
    color: #666;
    font-size: 1.1rem;
}

.event-thumbnail {
    text-align: center;
}

.event-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.event-content {
    padding: 30px;
    line-height: 1.8;
}

.event-content h2,
.event-content h3,
.event-content h4 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.event-content p {
    margin-bottom: 20px;
}

.event-footer {
    padding: 30px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.event-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.event-navigation a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.event-navigation a:hover {
    color: #005a87;
}

.back-to-events {
    text-align: center;
}

.btn-back-to-events {
    display: inline-block;
    padding: 10px 20px;
    background-color: #666;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn-back-to-events:hover {
    background-color: #555;
    color: white;
}

/* Events List Shortcode */
.carnevale-events-list {
    margin: 20px 0;
}

.event-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.event-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.event-item h3 a {
    color: #333;
    text-decoration: none;
}

.event-item h3 a:hover {
    color: #0073aa;
}

.event-item .event-meta {
    margin-bottom: 15px;
}

.event-item .event-meta > div {
    margin-bottom: 5px;
    color: #666;
}

.event-item .event-meta strong {
    color: #333;
}

.event-excerpt {
    color: #666;
    line-height: 1.6;
}

/* Recurring Event Badges */
.event-recurring-badge {
    margin-bottom: 15px;
}

.recurring-indicator {
    display: inline-block;
    background: #e7f3ff;
    color: #0073aa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #b8daff;
}

.recurring-instance-indicator {
    display: inline-block;
    background: #fff2e7;
    color: #ff8c00;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #ffb84d;
}

/* Event Card Recurring Badges */
.event-card .event-recurring-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.event-card .recurring-indicator,
.event-card .recurring-instance-indicator {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Recurring Dates Display */
.event-recurring-dates {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.recurring-date {
    display: inline-block;
    background: white;
    padding: 2px 6px;
    margin: 2px 4px 2px 0;
    border-radius: 3px;
    font-size: 0.9em;
    color: #0073aa;
    border: 1px solid #e0e0e0;
}

/* Pagination */
.events-pagination {
    text-align: center;
    margin-top: 40px;
}

.events-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background: white;
    color: #0073aa;
    text-decoration: none;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-row input[type="text"] {
        width: 100%;
        max-width: 300px;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-group {
        align-items: stretch;
    }
    
    .filter-group input[type="date"],
    .filter-group input[type="text"],
    .filter-group select {
        width: 100%;
    }
    
    .filter-group:last-child {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .event-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .event-meta {
        grid-template-columns: 1fr;
    }
    
    .event-meta-label {
        min-width: auto;
    }
}