/**
 * Vista Events Calendar Shortcode Styles
 * 
 * @package Vista_Events
 * @since 1.0.0
 */

/* ==== Main Container ==== */
.vista-events-calendar-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==== Layout ==== */
.vista-events-calendar-layout {
    display: block;
}

.vista-events-calendar-layout.has-sidebar {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

/* ==== Sidebar ==== */
.vista-events-calendar-sidebar {
    position: sticky;
    top: 100px;
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ==== Mini Calendar ==== */
.vista-mini-calendar {
    margin-bottom: 2rem;
}

.vista-mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.vista-calendar-month-year {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #111827 !important;
}

.vista-calendar-nav {
    background: none !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 3px !important;
    padding: 0.15rem 0.4rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    color: #6b7280 !important;
    min-width: 38px !important;
    height: 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.vista-calendar-nav:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

.vista-calendar-nav .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

/* Calendar Grid */
.vista-mini-calendar-grid {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.vista-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.vista-calendar-weekday {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
}

.vista-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.vista-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    position: relative;
    transition: all 0.2s ease;
}

.vista-calendar-day:nth-child(7n) {
    border-right: none;
}

.vista-calendar-day.vista-calendar-day-empty {
    background: #f9fafb;
}

.vista-calendar-day .day-number {
    font-size: 0.875rem;
    line-height: 1;
}

.vista-calendar-day .event-count-badge {
    font-size: 0.625rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.1);
    color: #ffffff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.vista-calendar-day.today {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
}

/* Event days - color entire cell */
.vista-calendar-day.has-event {
    cursor: pointer;
    font-weight: 600;
}

/* Single event - light green */
.vista-calendar-day.event-single {
    background: #dcfce7;
    color: #166534;
}

.vista-calendar-day.event-single:hover {
    background: #bbf7d0;
    transform: scale(1.05);
}

/* Two events - yellow */
.vista-calendar-day.event-double {
    background: #fef08a;
    color: #854d0e;
}

.vista-calendar-day.event-double:hover {
    background: #fde047;
    transform: scale(1.05);
}

/* Multiple events (3+) - orange/red */
.vista-calendar-day.event-multiple {
    background: #fca5a5;
    color: #7f1d1d;
}

.vista-calendar-day.event-multiple:hover {
    background: #f87171;
    transform: scale(1.05);
}

/* Today with events - blend colors */
.vista-calendar-day.today.event-single {
    background: linear-gradient(135deg, #dbeafe 50%, #dcfce7 50%);
    color: #166534;
}

.vista-calendar-day.today.event-double {
    background: linear-gradient(135deg, #dbeafe 50%, #fef08a 50%);
    color: #854d0e;
}

.vista-calendar-day.today.event-multiple {
    background: linear-gradient(135deg, #dbeafe 50%, #fca5a5 50%);
    color: #7f1d1d;
}

/* Selected day */
.vista-calendar-day.selected {
    background: var(--e-global-color-primary, #3b82f6) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--e-global-color-primary, #3b82f6);
}

.vista-calendar-day.selected .event-count-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* ==== Filters ==== */
.vista-events-filters {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.vista-filters-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #111827 !important;
    margin: 0 0 1rem 0 !important;
}

.vista-filter-group {
    margin-bottom: 1rem;
}

.vista-filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.vista-filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    background: #ffffff;
    transition: border-color 0.2s;
}

.vista-filter-select:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Event Type Tags */
.vista-filter-event-types .vista-event-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.vista-event-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: var(--e-global-color-secondary, #6366f1);
    font-size: 1rem !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    max-height: 25px;
    line-height: 1;
    flex: 0 0 auto;
    min-width: fit-content;
}

.vista-event-type-tag:hover {
    background: #f9fafb;
    border-color: var(--e-global-color-secondary, #6366f1);
}

/* Selected Event Type Tag */
.vista-event-type-tag.vista-event-type-selected {
    background: var(--e-global-color-secondary, #6366f1);
    border-color: var(--e-global-color-secondary, #6366f1);
    color: #ffffff;
}

.vista-event-type-tag.vista-event-type-selected:hover {
    background: var(--e-global-color-accent, #4f46e5);
    border-color: var(--e-global-color-accent, #4f46e5);
}

.vista-type-checkmark {
    font-size: 1rem !important;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vista-type-name {
    display: inline-block;
    line-height: 1;
}

.vista-filter-checkbox-group {
    display: flex;
    align-items: center;
}

.vista-filter-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.vista-filter-checkbox {
    margin-right: 0.5rem;
}

/* Venue Checkboxes */
.vista-filter-venues .vista-venue-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Inline Checkboxes Layout */
.vista-venue-checkboxes-inline {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    margin-top: 0.5rem;
}

.vista-venue-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
    padding: 0.25rem 0;
}

.vista-venue-checkbox-label:hover {
    color: #111827;
}

.vista-filter-venue-checkbox {
    margin-right: 0.5rem;
    cursor: pointer;
}

.vista-venue-checkbox-label span {
    flex: 1;
}

.vista-filter-reset {
    width: 100%;
    padding: 0.35rem 0.65rem;
    background: var(--e-global-color-secondary, #6366f1);
    border: none;
    border-radius: 4px;
    font-size: 1rem !important;
    font-weight: 600;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.2s;
    max-height: 25px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vista-filter-reset:hover {
    background: var(--e-global-color-accent, #4f46e5);
    color: #ffffff !important;
    opacity: 0.9;
}

/* ==== Inline Filters (No Sidebar) ==== */
.vista-events-inline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.vista-events-inline-filters .vista-filter-group {
    margin: 0;
    flex: 1 1 200px;
}

.vista-events-inline-filters .vista-filter-group label {
    margin-bottom: 0.25rem;
}

.vista-events-inline-filters .vista-filter-reset {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
}

/* ==== Events List Wrapper ==== */
.vista-events-list-wrapper {
    min-height: 600px;
    position: relative;
}

/* Event Count */
.vista-events-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-left: 3px solid var(--e-global-color-primary, #3b82f6);
    border-radius: 4px;
}

.vista-events-count strong {
    color: #111827;
}

/* Loading State */
.vista-events-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.vista-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--e-global-color-primary, #3b82f6);
    border-radius: 50%;
    animation: vista-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.vista-events-loading p {
    color: #6b7280;
    font-weight: 600;
}

/* Events List */
.vista-events-list {
    display: grid;
    gap: 1.5rem;
}

/* No Events Message */
.vista-no-events {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-size: 1.125rem;
}

/* ==== Event Card ==== */
.vista-event-card {
    background: #f7f7f7;
    border: none;
    border-radius: 4px;
    padding: 0;
    transition: box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: row;
    max-height: 200px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    /* Prevent layout shift by reserving space for shadow */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
    transform: translateZ(0);
    will-change: auto;
}

/* Adjust card height when price is displayed */
.vista-event-card:has(.vista-event-price) {
    max-height: 230px;
}

.vista-event-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
}

.vista-event-card:active,
.vista-event-card-link:active {
    transform: translateZ(0) !important;
    transition: box-shadow 0.2s !important;
}

/* Global rule to remove all outlines from event cards */
.vista-event-card *,
.vista-event-card *:focus,
.vista-event-card *:active,
.vista-event-card *:focus-visible {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

/* Event Card Link - Makes entire card clickable */
.vista-event-card-link {
    display: flex;
    flex-direction: row;
    width: 100%;
    text-decoration: none;
    color: inherit;
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    border: none;
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

.vista-event-card-link:focus,
.vista-event-card-link:focus-visible,
.vista-event-card-link:focus-within,
.vista-event-card-link:active,
.vista-event-card-link:visited,
.vista-event-card-link:hover,
.vista-event-card-link:link {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

/* Also remove outline from the card itself */
.vista-event-card:focus,
.vista-event-card:focus-visible,
.vista-event-card:focus-within,
.vista-event-card:active {
    outline: none !important;
    outline-width: 0 !important;
    outline-style: none !important;
    outline-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    -moz-outline: none !important;
}

/* Event Image */
.vista-event-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    pointer-events: none;
}

/* Adjust image height when card has price */
.vista-event-card:has(.vista-event-price) .vista-event-image {
    height: 230px;
}

/* Event Image with Lightbox */
.vista-event-image-lightbox {
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    transition: opacity 0.2s;
    overflow: hidden;
}

.vista-event-image-lightbox:hover {
    opacity: 0.9;
}

/* Event Image Overlay - Shows on hover */
.vista-event-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #ffffff;
}

.vista-event-image-lightbox:hover .vista-event-image-overlay {
    opacity: 1;
}

.vista-event-image-overlay .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #ffffff;
}

.vista-enlarge-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Event Card Content */
.vista-event-card-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: row;
    min-width: 0;
    transition: all 0.2s;
}

.vista-event-card:hover .vista-event-card-content {
    background: var(--e-global-color-secondary, #6366f1);
    color: #ffffff;
}

/* Event Card Details Section */
.vista-event-card-details {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

/* Event Card Navigation Section */
.vista-event-card-navigation {
    flex: 0 0 auto;
    min-width: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Event Type Badges */
.vista-event-type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.vista-event-type-badge {
    background: var(--e-global-color-primary, #3b82f6) !important;
    background-color: var(--e-global-color-primary, #3b82f6) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    box-shadow: none !important;
    display: inline-block !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.vista-event-card:hover .vista-event-type-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Flexible Schedule Badge in Calendar Event Cards - Match Main Badge Style */
.vista-event-type-badges .vista-flexible-schedule-badge {
    background: #f39c12 !important;
    background-color: #f39c12 !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3) !important;
    display: inline-block !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.vista-event-card:hover .vista-flexible-schedule-badge {
    background: rgba(243, 156, 18, 0.9) !important;
    background-color: rgba(243, 156, 18, 0.9) !important;
    color: #ffffff !important;
}

/* Event Status Badges - Inline with Date */
.vista-event-status-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-left: 0.5rem;
}

.vista-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.vista-status-today {
    background: #fef3c7;
    color: #92400e;
    transition: all 0.2s;
}

.vista-event-card:hover .vista-status-today {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.vista-status-deadline {
    background: #fee2e2;
    color: #991b1b;
    transition: all 0.2s;
}

.vista-event-card:hover .vista-status-deadline {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Event Title */
.vista-event-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
    transition: color 0.2s;
    color: #111827;
}

.vista-event-card:hover .vista-event-title {
    color: #ffffff !important;
}

/* Event Subtitle */
.vista-event-subtitle {
    font-size: 1rem;
    color: #111827;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-event-subtitle {
    color: #ffffff;
}

/* Event Meta */
.vista-event-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.vista-event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    color: #111827;
    line-height: 1.4;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-event-meta-item {
    color: #ffffff;
}

/* Date item - for inline badge support (legacy) */
.vista-event-meta-item.vista-event-date {
    flex-wrap: wrap;
    align-items: center;
}

/* Date & Time Combined - for inline badge support */
.vista-event-meta-item.vista-event-datetime {
    flex-wrap: wrap;
    align-items: center;
}

.vista-datetime-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.vista-time-separator {
    color: #9ca3af;
    font-weight: 500;
    margin: 0 0.15rem;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-time-separator {
    color: rgba(255, 255, 255, 0.7);
}

.vista-event-meta-item .dashicons {
    color: #6b7280;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-event-meta-item .dashicons {
    color: #ffffff;
}

/* Price - no icon */
.vista-event-meta-item.vista-event-price .dashicons {
    display: none;
}

.vista-free-event {
    color: #059669;
    font-weight: 600;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-free-event {
    color: #ffffff;
}

/* Event Card Navigation Link */
.vista-event-card-navigation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--e-global-color-primary, #3b82f6);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0;
    pointer-events: none;
}

.vista-event-card:hover .vista-event-card-navigation-link {
    color: #ffffff;
}

.vista-event-card-navigation-link .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: inherit;
    transition: color 0.2s;
}

.vista-event-card:hover .vista-event-card-navigation-link .dashicons {
    color: #ffffff;
}

/* ==== Lightbox Modal ==== */
.vista-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 3rem;
    opacity: 0;
}

.vista-lightbox-modal.active {
    display: flex;
    animation: vista-lightbox-fade-in 0.3s ease-out forwards;
}

@keyframes vista-lightbox-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vista-lightbox-wrapper {
    max-width: 95%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(30px);
}

.vista-lightbox-modal.active .vista-lightbox-wrapper {
    animation: vista-lightbox-fade-in-up 0.4s ease-out forwards;
}

@keyframes vista-lightbox-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vista-lightbox-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    padding: 0 1rem;
    text-align: center;
}

.vista-lightbox-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: default;
}

.vista-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    display: block;
}

.vista-lightbox-close {
    position: fixed !important;
    top: 2rem !important;
    right: 2rem !important;
    background: #111827 !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.75rem 1.5rem !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.vista-lightbox-close:hover {
    background: #1f2937 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

.vista-lightbox-close:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    background: #111827 !important;
    color: #ffffff !important;
}

/* ==== Pagination ==== */
.vista-events-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.vista-events-pagination a,
.vista-events-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.vista-events-pagination a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.vista-events-pagination .current {
    background: var(--e-global-color-primary, #3b82f6);
    color: #ffffff;
    border-color: var(--e-global-color-primary, #3b82f6);
}

/* ==== Responsive Design ==== */

/* Desktop - Accordions always expanded, styled as regular sections */
@media (min-width: 768px) {
    .vista-accordion-item {
        border: none !important;
        margin-bottom: 2rem;
        background: transparent;
        overflow: visible;
        box-shadow: none !important;
    }
    
    .vista-accordion-content {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }
    
    .vista-accordion-content.vista-accordion-open {
        max-height: none !important;
    }
    
    .vista-accordion-header {
        pointer-events: none;
        cursor: default;
        background: transparent !important;
        padding: 0 !important;
        margin-bottom: 1rem;
        font-size: 1.125rem !important;
        font-weight: 700;
        color: var(--e-global-color-text, #1e293b);
        border: none;
        border-radius: 0;
        box-shadow: none !important;
    }
    
    .vista-accordion-header:hover {
        background: transparent !important;
        color: var(--e-global-color-text, #1e293b) !important;
    }
    
    .vista-accordion-header:hover * {
        color: var(--e-global-color-text, #1e293b) !important;
    }
    
    .vista-accordion-header:focus {
        outline: none !important;
    }
    
    .vista-accordion-header .vista-accordion-icon {
        display: none;
    }
    
    .vista-accordion-content-inner {
        padding: 0 !important;
    }
    
    /* Hide accordion header for calendar on desktop since it has its own header */
    .vista-calendar-accordion .vista-accordion-header {
        display: none;
    }
    
    /* Show filters title on desktop */
    .vista-filters-accordion .vista-accordion-header {
        display: block;
        margin-bottom: 1rem;
    }
    
    .vista-events-filters .vista-filters-title {
        display: none !important;
    }
    
    /* Inline Filters - Desktop */
    .vista-filters-inline {
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: #f9fafb;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .vista-filters-inline .vista-filter-group {
        margin-bottom: 1rem;
    }
    
    .vista-filters-inline .vista-filter-group:last-of-type {
        margin-bottom: 0.75rem;
    }
    
    .vista-filters-inline .vista-filter-group label {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
        color: var(--e-global-color-text, #1e293b);
        font-weight: 600;
        display: block;
    }
    
    .vista-filters-inline .vista-venue-checkboxes-inline {
        margin-top: 0.5rem;
        gap: 1rem !important;
    }
    
    .vista-filters-inline .vista-venue-checkbox-label {
        font-size: 0.875rem;
        padding: 0.25rem 0;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .vista-events-calendar-layout.has-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .vista-events-calendar-sidebar {
        position: static;
    }
    
    .vista-event-card-meta {
        grid-template-columns: 1fr;
    }
    
    /* Event Type Tags - More compact on tablet */
    .vista-filter-event-types .vista-event-type-tags {
        gap: 0.35rem;
    }
    
    .vista-event-type-tag {
        padding: 0.25rem 0.45rem;
        font-size: 0.9375rem !important;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .vista-events-calendar-container {
        padding: 1rem 0.5rem;
    }
    
    /* Accordion Styles for Mobile - Compact with Elementor Secondary Color */
    .vista-accordion-item {
        margin-bottom: 0.75rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        overflow: hidden;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    
    .vista-accordion-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.625rem 0.875rem;
        background: var(--e-global-color-secondary, #007cba);
        cursor: pointer;
        user-select: none;
        border: none;
        width: 100%;
        text-align: left;
        font-weight: 600;
        font-size: 0.8125rem;
        color: #ffffff !important;
        transition: none;
        font-family: inherit;
    }
    
    /* Calendar accordion: no background change on hover/active, only arrow rotates */
    .vista-calendar-accordion .vista-accordion-header {
        background: var(--e-global-color-secondary, #007cba) !important;
        transition: none;
    }
    
    .vista-calendar-accordion .vista-accordion-header:hover {
        background: var(--e-global-color-secondary, #007cba) !important;
        color: #ffffff !important;
        opacity: 1;
    }
    
    .vista-calendar-accordion .vista-accordion-header:hover * {
        color: #ffffff !important;
    }
    
    .vista-calendar-accordion .vista-accordion-header[aria-expanded="true"] {
        background: var(--e-global-color-secondary, #007cba) !important;
        color: #ffffff !important;
    }
    
    .vista-calendar-accordion .vista-accordion-header[aria-expanded="true"] * {
        color: #ffffff !important;
    }
    
    /* Filters accordion: keep hover effect */
    .vista-filters-accordion .vista-accordion-header:hover {
        background: var(--e-global-color-accent, #005a87) !important;
        color: #ffffff !important;
        opacity: 0.95;
    }
    
    .vista-filters-accordion .vista-accordion-header:hover * {
        color: #ffffff !important;
    }
    
    .vista-accordion-header:focus {
        outline: 2px solid var(--e-global-color-secondary, #007cba);
        outline-offset: -2px;
    }
    
    .vista-accordion-header .vista-accordion-icon {
        font-size: 16px;
        width: 16px;
        height: 16px;
        transition: transform 0.3s ease;
        color: #ffffff !important;
        flex-shrink: 0;
        margin-left: 0.5rem;
    }
    
    .vista-accordion-header[aria-expanded="true"] .vista-accordion-icon {
        transform: rotate(180deg);
    }
    
    .vista-accordion-content {
        max-height: 0 !important;
        overflow: hidden;
        transition: max-height 0.35s ease-out;
    }
    
    .vista-accordion-content.vista-accordion-open {
        max-height: 3000px !important;
        transition: max-height 0.5s ease-in;
    }
    
    .vista-accordion-content-inner {
        padding: 0.625rem 0.75rem;
    }
    
    /* Sidebar - Compact padding */
    .vista-events-calendar-sidebar {
        padding: 0.75rem !important;
    }
    
    /* Mini Calendar Accordion - Compact */
    .vista-mini-calendar {
        margin-bottom: 0;
    }
    
    .vista-mini-calendar .vista-accordion-content-inner {
        padding: 0.5rem;
    }
    
    .vista-mini-calendar-header {
        margin-bottom: 0.5rem;
    }
    
    .vista-calendar-month-year {
        font-size: 14px !important;
    }
    
    .vista-calendar-weekday {
        font-size: 0.625rem;
        padding: 0.2rem;
    }
    
    .vista-calendar-day {
        font-size: 0.7rem;
        padding: 0.2rem;
    }
    
    .vista-calendar-nav {
        min-width: 28px !important;
        height: 22px !important;
        padding: 0.1rem 0.25rem !important;
    }
    
    /* Inline Filters - No Accordion */
    .vista-filters-inline {
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #f9fafb;
        border-radius: 4px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .vista-filters-inline .vista-filter-group {
        margin-bottom: 0.75rem;
    }
    
    .vista-filters-inline .vista-filter-group:last-of-type {
        margin-bottom: 0.5rem;
    }
    
    .vista-filters-inline .vista-filter-group label {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
        color: var(--e-global-color-text, #1e293b);
        font-weight: 600;
        display: block;
    }
    
    .vista-filters-inline .vista-venue-checkboxes-inline {
        margin-top: 0.5rem;
    }
    
    .vista-filters-inline .vista-venue-checkbox-label {
        font-size: 0.8125rem;
        padding: 0.25rem 0;
        white-space: nowrap;
    }
    
    /* Reset Button - Use Elementor Secondary Color */
    .vista-filter-reset {
        background: var(--e-global-color-secondary, #007cba) !important;
        color: #ffffff !important;
        border: none !important;
        padding: 0.5rem 0.875rem !important;
        font-size: 0.8125rem !important;
        font-weight: 600 !important;
        margin-top: 0.5rem;
    }
    
    .vista-filter-reset:hover {
        background: var(--e-global-color-accent, #005a87) !important;
        color: #ffffff !important;
        opacity: 0.9;
    }
    
    /* Inline Filters Accordion */
    .vista-events-inline-filters {
        flex-direction: column;
        gap: 0;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        margin-bottom: 1rem;
    }
    
    .vista-events-inline-filters .vista-filter-group {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .vista-events-inline-filters .vista-filter-reset {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Event Count - Compact */
    .vista-events-count {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }
    
    /* Horizontal layout: 30% image, 70% content - minimum 200px height, flexible for content */
    .vista-event-card {
        flex-direction: row !important;
        min-height: 200px !important;
        height: auto !important;
        max-height: none !important;
        align-items: stretch;
        overflow: hidden;
    }

    /* Image on the left - 30% width, stretches to match card height */
    .vista-event-image {
        width: 30% !important;
        min-width: 30%;
        max-width: 30%;
        flex: 0 0 30% !important;
        flex-shrink: 0;
        height: auto !important;
        min-height: 200px !important;
        max-height: none !important;
        align-self: stretch;
        display: flex;
        align-items: stretch;
        padding-top: 0 !important;
    }

    .vista-event-image-lightbox {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: stretch;
    }

    .vista-event-image img {
        position: relative;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Support for background-image style images */
    .vista-event-image[style*="background"] {
        background-size: cover;
        background-position: center;
        height: 100% !important;
        min-height: 200px !important;
    }

    .vista-event-image-overlay {
        height: 100%;
    }
    
    .vista-event-image-overlay .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
    
    .vista-enlarge-text {
        font-size: 0.625rem;
    }
    
    /* Content on the right - 70% width, left-aligned, compact padding */
    .vista-event-card-content {
        width: 70% !important;
        padding: 10px 12px !important;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        height: auto !important;
        min-height: 200px !important;
        max-height: none !important;
        overflow: visible !important;
        justify-content: flex-start;
    }

    .vista-event-card-details {
        flex: 1;
        width: 100%;
        text-align: left;
        align-items: flex-start;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: visible !important;
    }
    
    .vista-event-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .vista-event-subtitle {
        font-size: 12px !important;
        margin-bottom: 3px !important;
        line-height: 1.25 !important;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }
    
    .vista-event-meta-item {
        font-size: 12px !important;
        margin-bottom: 2px !important;
        gap: 3px !important;
        text-align: left;
        justify-content: flex-start;
        line-height: 1.15 !important;
    }
    
    .vista-event-meta-item .dashicons {
        font-size: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }

    /* Combined Date/Time on mobile */
    .vista-datetime-text {
        gap: 0.2rem !important;
        font-size: 12px !important;
    }

    .vista-time-separator {
        margin: 0 0.1rem !important;
    }

    .vista-event-card-meta {
        gap: 0.2rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .vista-event-type-badges {
        justify-content: flex-start;
        gap: 0.2rem !important;
        margin-top: 0.25rem !important;
        flex-wrap: wrap;
    }
    
    /* Match Flexible badge styling exactly (except colors and box-shadow) */
    .vista-event-type-badge {
        padding: 6px 14px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        box-shadow: none !important;
        line-height: 1.4 !important;
        border: none !important;
        transition: all 0.2s ease !important;
    }
    
    .vista-flexible-schedule-badge {
        padding: 6px 14px !important;
        border-radius: 20px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.8px !important;
        box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3) !important;
        line-height: 1.4 !important;
        border: none !important;
        transition: all 0.2s ease !important;
    }
    
    /* Hide navigation section on mobile for more space */
    .vista-event-card-navigation {
        display: none !important;
    }
    
    .vista-event-card-footer {
        padding-top: 0.2rem !important;
        margin-top: auto;
    }
    
    .vista-event-details-link {
        font-size: 0.65rem !important;
    }
    
    .vista-calendar-weekday {
        font-size: 0.625rem;
        padding: 0.25rem;
    }
    
    .vista-calendar-day {
        font-size: 0.75rem;
    }
    
    .vista-calendar-month-year {
        font-size: 0.875rem;
    }
    
    /* Event Type Tags - More compact on mobile */
    .vista-filter-event-types .vista-event-type-tags {
        gap: 0.3rem;
    }
    
    .vista-event-type-tag {
        padding: 0.25rem 0.4rem;
        font-size: 0.875rem !important;
        gap: 0.2rem;
    }
    
    .vista-type-checkmark {
        font-size: 0.875rem !important;
    }
    
    /* Lightbox Modal - Mobile */
    .vista-lightbox-modal {
        padding: 1rem;
    }
    
    .vista-lightbox-close {
        top: 1rem !important;
        right: 1rem !important;
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
    
    .vista-lightbox-wrapper {
        max-width: 100%;
    }
    
    .vista-lightbox-title {
        font-size: 1.125rem;
        padding: 0 0.5rem;
    }
    
    .vista-lightbox-content {
        border-radius: 4px;
    }
    
    .vista-lightbox-content img {
        max-height: 70vh;
    }
}

/* ==== Event Card Highlight Animation ==== */
.vista-event-highlight {
    animation: vista-pulse-highlight 2s ease-in-out;
}

@keyframes vista-pulse-highlight {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
        transform: scale(1.02);
    }
}

