/* WP Events Display Styles */

/* Page Title */
.events-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 2rem 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .events-page-title {
        font-size: 2rem;
    }
}

/* Button-Based Filters */
.events-filters {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-of-type {
    margin-bottom: 1.5rem;
}

.filter-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.filter-btn:hover {
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Brand button colors when active */
.brand-btn.brand-itx.active {
    background: #4B0BE8;
    border-color: #4B0BE8;
    color: white;
}

.brand-btn.brand-sentinel.active {
    background: #14B8A6;
    border-color: #14B8A6;
    color: white;
}

.brand-btn.brand-cdaio.active {
    background: #007BFF;
    border-color: #007BFF;
    color: white;
}

.brand-btn.brand-marketverse.active {
    background: #E60790;
    border-color: #E60790;
    color: white;
}

/* Type button dark blue when active */
.type-btn.active {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: white;
}

.filter-clear-btn {
    padding: 0.75rem 1.75rem;
    border: 2px solid #dc2626;
    border-radius: 5px;
    background: white;
    color: #dc2626;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: #dc2626;
    color: white;
}

/* Single line layout for all events view */
.events-filters.all-events {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.events-filters.all-events .filter-section {
    margin-bottom: 0;
}

.events-filters.all-events .filter-section-title {
    margin-right: 0.75rem;
    margin-bottom: 0;
}

.events-filters.all-events .filter-buttons {
    display: inline-flex;
}

@media (max-width: 640px) {
    .filter-btn {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 120px;
    }
    
    .events-filters.all-events {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Events Grid */
.events-wrapper {
    margin-top: 2rem;
}

.events-month-section {
    margin-bottom: 3rem;
    clear: both;
}

.events-month-header {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #1e3a8a;
    text-transform: capitalize;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .events-month-header {
        font-size: 1.5rem;
    }
}

/* Event Card */
.event-card {
    background: white !important;
    background-color: #ffffff !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.event-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}

.event-card-header {
    margin-bottom: 1rem;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
    line-height: 1.4;
}

.event-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.brand-badge,
.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Brand Colors */
.brand-badge.brand-itx {
    background: #4B0BE8;
    color: white;
}

.brand-badge.brand-sentinel {
    background: #14B8A6;
    color: white;
}

.brand-badge.brand-cdaio {
    background: #007BFF;
    color: white;
}

.brand-badge.brand-marketverse {
    background: #E60790;
    color: white;
}

.brand-badge.brand-default {
    background: #6b7280;
    color: white;
}

.type-badge {
    background: #e5e7eb;
    color: #374151;
}

/* Event Details */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.event-date-time {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-date,
.event-time,
.event-location,
.event-venue {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.event-date .icon,
.event-time .icon,
.event-location .icon,
.event-venue .icon {
    flex-shrink: 0;
    color: #9ca3af;
}

/* Sponsors Section */
.event-sponsors {
    margin-top: auto;
    padding-top: 1rem;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.sponsor-logos img {
    height: 32px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

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

/* Empty States */
.events-empty,
.events-error {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.events-empty p,
.events-error p {
    margin: 0;
    font-size: 1rem;
    color: #6b7280;
}

.events-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.events-error p {
    color: #991b1b;
}

.error-details {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-family: monospace;
    color: #7f1d1d;
}

/* Loading State */
.events-loading {
    text-align: center;
    padding: 3rem 1.5rem;
    grid-column: 1 / -1;
}

.events-loading::after {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 640px) {
    .events-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .event-title {
        font-size: 1.125rem;
    }
    
    .event-card-link {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .events-filters {
        display: none;
    }
    
    .event-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .event-card:hover {
        transform: none;
    }
}

/* Accessibility */
.event-card-link:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.events-filter:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .event-card {
        border: 2px solid currentColor;
    }
    
    .brand-badge,
    .type-badge {
        border: 1px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .event-card,
    .events-filter,
    .sponsor-logos img {
        transition: none;
    }
    
    .events-loading::after {
        animation: none;
    }
}
