/**
 * What's On – Events Plugin - Frontend Styles
 *
 * @package Whats_On
 */

:root {
    --wo-primary: #6366f1;
    --wo-primary-hover: #4f46e5;
    --wo-primary-light: #e0e7ff;
    --wo-text: #1f2937;
    --wo-text-muted: #6b7280;
    --wo-border: #e5e7eb;
    --wo-bg: #ffffff;
    --wo-bg-alt: #f9fafb;
    --wo-radius: 12px;
    --wo-radius-sm: 8px;
    --wo-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --wo-shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --wo-transition: 0.2s ease;
}

/* Base Container */
.wo-events {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: var(--wo-text);
}

.wo-events *,
.wo-events *::before,
.wo-events *::after {
    box-sizing: border-box;
}

/* Filter Bar */
.wo-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: var(--wo-bg-alt);
    border-radius: var(--wo-radius);
    border: 1px solid var(--wo-border);
}

.wo-filter-left,
.wo-filter-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Search */
.wo-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wo-search-input {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    font-size: 0.875rem;
    background: var(--wo-bg);
    width: 180px;
    transition: all var(--wo-transition);
}

.wo-search-input:focus {
    outline: none;
    border-color: var(--wo-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wo-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px !important;
    height: 16px !important;
    color: var(--wo-text-muted);
    pointer-events: none;
}

/* Date Range */
.wo-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wo-date-from,
.wo-date-to {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    font-size: 0.8rem;
    background: var(--wo-bg);
    width: 145px;
    transition: all var(--wo-transition);
}

/* Add space between date text and calendar icon */
.wo-date-from::-webkit-calendar-picker-indicator,
.wo-date-to::-webkit-calendar-picker-indicator {
    margin-left: 0.5rem;
    cursor: pointer;
    opacity: 0.6;
}

.wo-date-from::-webkit-calendar-picker-indicator:hover,
.wo-date-to::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.wo-date-from:focus,
.wo-date-to:focus {
    outline: none;
    border-color: var(--wo-primary);
}

.wo-date-sep {
    color: var(--wo-text-muted);
    font-size: 0.75rem;
}

/* Category Filter Dropdown */
.wo-category-filter {
    position: relative;
}

.wo-category-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    font-size: 0.875rem;
    background: var(--wo-bg);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 140px;
    transition: all var(--wo-transition);
}

.wo-category-select:focus {
    outline: none;
    border-color: var(--wo-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wo-date-filters {
    display: flex;
    gap: 0.5rem;
}

.wo-filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--wo-border);
    background: var(--wo-bg);
    color: var(--wo-text);
    border-radius: var(--wo-radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--wo-transition);
    font-family: inherit;
}

.wo-filter-btn:hover {
    border-color: var(--wo-primary);
    color: var(--wo-primary);
}

.wo-filter-btn.active {
    background: var(--wo-primary);
    border-color: var(--wo-primary);
    color: white;
}

/* View Toggle Buttons */
.wo-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--wo-bg);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    padding: 0.25rem;
}

.wo-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--wo-text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--wo-transition);
    line-height: 1;
}

.wo-view-btn:hover {
    color: var(--wo-primary);
    background: var(--wo-primary-light);
}

.wo-view-btn.active {
    color: white;
    background: var(--wo-primary);
}

/* CSS-based view icons */
.wo-icon-grid,
.wo-icon-list {
    display: block;
    width: 16px;
    height: 16px;
    position: relative;
}

/* Grid icon - 4 squares */
.wo-icon-grid::before,
.wo-icon-grid::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
}

.wo-icon-grid::before {
    width: 6px;
    height: 6px;
    top: 0;
    left: 0;
    box-shadow: 10px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor;
}

/* List icon - 3 rows */
.wo-icon-list::before,
.wo-icon-list::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 1px;
}

.wo-icon-list::before {
    width: 4px;
    height: 4px;
    top: 0;
    left: 0;
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.wo-icon-list::after {
    width: 10px;
    height: 2px;
    top: 1px;
    left: 6px;
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

/* Events Grid - Card View */
.wo-events-grid {
    display: grid;
    gap: 1.5rem;
    transition: opacity var(--wo-transition);
}

.wo-view-card .wo-events-grid {
    /* Default - will be overridden by inline styles based on settings */
    grid-template-columns: repeat(3, 1fr);
}

.wo-columns-1.wo-view-card .wo-events-grid { grid-template-columns: 1fr; }
.wo-columns-2.wo-view-card .wo-events-grid { grid-template-columns: repeat(2, 1fr); }
.wo-columns-3.wo-view-card .wo-events-grid { grid-template-columns: repeat(3, 1fr); }
.wo-columns-4.wo-view-card .wo-events-grid { grid-template-columns: repeat(4, 1fr); }

/* Event Card */
.wo-event-item {
    background: var(--wo-bg);
    border-radius: var(--wo-radius);
    box-shadow: var(--wo-shadow);
    overflow: hidden;
    transition: transform var(--wo-transition), box-shadow var(--wo-transition);
    border: 1px solid var(--wo-border);
}

.wo-event-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--wo-shadow-lg);
}

/* Event Image - Display Only (no click action) */
.wo-event-image {
    position: relative;
    overflow: hidden;
    background: var(--wo-bg-alt);
    /* Default ratio - overridden by inline style from settings */
    aspect-ratio: var(--wo-image-ratio, 3 / 4);
}

.wo-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease, opacity 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.wo-event-item:hover .wo-event-image img {
    transform: scale(1.03);
}

/* Image Overlays */
.wo-custom-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    background: #e94560;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.wo-date-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    text-align: center;
    line-height: 1;
}

.wo-date-day {
    font-size: 22px;
    font-weight: 700;
    display: block;
}

.wo-date-month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-top: 2px;
    display: block;
}

/* Countdown Timer */
.wo-countdown {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 6px;
}

.wo-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.wo-countdown-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.wo-countdown-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Large Countdown (Single Event Page) */
.wo-sidebar-countdown {
    background: linear-gradient(135deg, var(--wo-primary) 0%, #8b5cf6 100%);
    border-radius: var(--wo-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.wo-countdown-large {
    position: static;
    background: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0.75rem;
}

.wo-countdown-large .wo-countdown-item {
    min-width: 60px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.wo-countdown-large .wo-countdown-value {
    font-size: 1.75rem;
    font-weight: 800;
}

.wo-countdown-large .wo-countdown-label {
    font-size: 0.7rem;
    margin-top: 4px;
}

.wo-countdown-text {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* Event Content */
.wo-event-content {
    padding: 1.25rem;
}

.wo-event-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.wo-date-full {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--wo-primary);
    font-weight: 600;
}

.wo-date-full::after {
    content: '•';
    margin-left: 0.75rem;
    color: var(--wo-border);
}

/* Recurring Badge */
.wo-recurring-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    color: var(--wo-primary);
    cursor: help;
}

.wo-recurring-badge svg {
    width: 12px;
    height: 12px;
}

.wo-time,
.wo-meta-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--wo-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.wo-event-meta svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px;
    flex-shrink: 0;
    display: inline-block !important;
    vertical-align: middle;
}

.wo-event-meta svg * {
    vector-effect: non-scaling-stroke;
}

.wo-time svg {
    stroke: var(--wo-primary) !important;
    fill: none !important;
}

.wo-meta-link {
    color: var(--wo-primary);
    text-decoration: none;
    padding: 4px 10px;
    background: var(--wo-primary-light);
    border-radius: 4px;
    transition: all var(--wo-transition);
}

.wo-meta-link:hover {
    background: var(--wo-primary);
    color: #fff;
}

.wo-meta-link:hover svg {
    stroke: #fff !important;
}

.wo-meta-link svg {
    stroke: var(--wo-primary) !important;
    fill: none !important;
}

.wo-event-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wo-text);
    line-height: 1.3;
}

.wo-event-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--wo-transition);
}

.wo-event-title a:hover {
    color: var(--wo-primary);
}

/* Clickable Image Link */
.wo-event-image-link {
    display: block;
    text-decoration: none;
}

/* Category & Venue Row */
.wo-event-location-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Category Tags */
.wo-event-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.wo-category-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--wo-primary);
    background: var(--wo-primary-light);
    border-radius: 4px;
}

.wo-event-venue {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--wo-text-muted);
}

.wo-event-venue svg {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px;
    flex-shrink: 0;
    stroke: var(--wo-text-muted) !important;
    fill: none !important;
}

.wo-event-excerpt {
    font-size: 0.85rem;
    color: var(--wo-text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    min-height: 5.5rem; /* Fixed height for uniformity */
}

.wo-event-excerpt p {
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.wo-read-more {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wo-primary);
    text-decoration: none;
    transition: color var(--wo-transition);
}

.wo-read-more:hover {
    color: var(--wo-primary-hover);
    text-decoration: none;
}

/* Event Actions - New Layout */
.wo-event-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wo-border);
}

.wo-action-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}

/* When action-left is empty, don't take space */
.wo-action-left:empty {
    display: none;
}
/* Social Icons */
.wo-social-icons {
    display: flex;
    gap: 0.25rem;
}

.wo-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--wo-text-muted);
    border-radius: 4px;
    transition: all var(--wo-transition);
    text-decoration: none;
    opacity: 0.7;
}

.wo-social-icons a:hover {
    color: var(--wo-primary);
    background: var(--wo-primary-light);
    opacity: 1;
}

.wo-social-icons svg {
    width: 14px !important;
    height: 14px !important;
}

/* Ticket Button */
.wo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--wo-transition);
    font-family: inherit;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.wo-btn-primary {
    background: var(--wo-primary);
    color: white;
}

.wo-btn-primary:hover {
    background: var(--wo-primary-hover);
    color: white;
    text-decoration: none;
}

.wo-btn-secondary {
    background: var(--wo-bg);
    color: var(--wo-text);
    border: 1px solid var(--wo-border);
}

.wo-btn-secondary:hover {
    background: var(--wo-bg-alt);
    text-decoration: none;
}

/* Calendar Dropdown */
.wo-calendar-dropdown {
    position: relative;
}

.wo-calendar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.wo-calendar-toggle svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.wo-calendar-toggle .wo-dropdown-arrow {
    width: 12px;
    height: 12px;
}

.wo-dropdown-arrow {
    transition: transform var(--wo-transition);
}

.wo-calendar-dropdown.open .wo-dropdown-arrow {
    transform: rotate(180deg);
}

.wo-calendar-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: var(--wo-bg);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    box-shadow: var(--wo-shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.wo-calendar-dropdown.open .wo-calendar-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wo-calendar-menu a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    color: var(--wo-text);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background var(--wo-transition);
}

.wo-calendar-menu a:hover {
    background: var(--wo-bg-alt);
}

.wo-calendar-menu a:first-child {
    border-radius: var(--wo-radius-sm) var(--wo-radius-sm) 0 0;
}

.wo-calendar-menu a:last-child {
    border-radius: 0 0 var(--wo-radius-sm) var(--wo-radius-sm);
}

.wo-calendar-menu svg {
    flex-shrink: 0;
}

/* List View */
.wo-view-list .wo-events-grid {
    grid-template-columns: 1fr;
}

.wo-view-list .wo-event-item {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.wo-view-list .wo-event-image {
    /* In list view, use square ratio for compact display */
    aspect-ratio: 1 / 1;
}

.wo-view-list .wo-event-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem;
}

.wo-view-list .wo-event-title {
    font-size: 1.15rem;
}

/* Lightbox */
.wo-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.wo-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wo-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    animation: wo-lightbox-zoom 0.3s ease;
}

@keyframes wo-lightbox-zoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wo-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--wo-radius-sm);
    display: block;
}

.wo-lightbox-content iframe {
    width: 80vw;
    height: 45vw;
    max-width: 1200px;
    max-height: 80vh;
    border: none;
    border-radius: var(--wo-radius-sm);
}

/* Map Lightbox */
.wo-map-content {
    background: var(--wo-bg);
    border-radius: var(--wo-radius);
    overflow: hidden;
    max-width: 800px;
    width: 90vw;
}

.wo-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--wo-border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wo-map-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wo-text);
}

.wo-map-external {
    font-size: 0.8125rem;
    color: var(--wo-primary);
    text-decoration: none;
}

.wo-map-external:hover {
    text-decoration: underline;
}

.wo-map-content iframe {
    width: 100%;
    height: 400px;
    max-height: 60vh;
    display: block;
}

.wo-lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--wo-transition);
}

.wo-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* No Events */
.wo-no-events {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--wo-text-muted);
    font-size: 1.125rem;
    background: var(--wo-bg-alt);
    border-radius: var(--wo-radius);
    border: 1px dashed var(--wo-border);
    margin: 0;
    grid-column: 1 / -1;
}

/* Loading State */
.wo-events-grid.wo-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 767px) {
    /* Mobile - uses inline styles from settings for column count */
    .wo-view-list .wo-event-item {
        grid-template-columns: 1fr;
    }

    .wo-view-list .wo-event-image {
        aspect-ratio: 16 / 9;
    }

    .wo-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .wo-filter-left,
    .wo-filter-right {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .wo-search-wrap,
    .wo-search-input {
        width: 100%;
    }

    .wo-date-range,
    .wo-category-filter {
        width: 100%;
    }

    .wo-category-select {
        width: 100%;
    }

    .wo-date-from,
    .wo-date-to {
        flex: 1;
    }

    .wo-date-filters {
        justify-content: center;
        width: 100%;
    }

    .wo-view-toggle {
        justify-content: center;
        align-self: center;
    }

    .wo-date-filters {
        flex-wrap: wrap;
    }

    .wo-filter-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .wo-date-range {
        flex-direction: column;
        gap: 0.5rem;
    }

    .wo-date-sep {
        display: none;
    }

    .wo-event-actions {
        flex-wrap: wrap;
    }

    .wo-action-left {
        flex: 1;
        justify-content: flex-start;
        margin-right: 0;
    }

    /* When no social links, keep calendar and ticket together */
    .wo-action-left:empty + .wo-calendar-dropdown {
        margin-right: auto;
    }

    .wo-btn-primary {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        order: 10;
    }

    .wo-lightbox-content iframe {
        width: 90vw;
        height: 50.625vw;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet - uses inline styles from settings for column count */
    .wo-view-list .wo-event-item {
        grid-template-columns: 160px 1fr;
    }
}


/* =====================================================
   SINGLE EVENT PAGE STYLES - 2 Column Layout
   ===================================================== */

.wo-single-event {
    /* max-width is controlled via inline style from plugin settings */
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--wo-text);
    line-height: 1.6;
}

/* Hero Image - Full Width */
.wo-single-hero {
    margin-bottom: 2rem;
}

.wo-single-image {
    position: relative;
    border-radius: var(--wo-radius);
    overflow: hidden;
    box-shadow: var(--wo-shadow-lg);
}

.wo-single-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.wo-single-image .wo-custom-badge {
    font-size: 12px;
    padding: 8px 16px;
}

.wo-single-image .wo-date-overlay {
    min-width: 70px;
    padding: 14px 16px;
}

.wo-single-image .wo-date-day {
    font-size: 32px;
}

.wo-single-image .wo-date-month {
    font-size: 14px;
}

/* 2 Column Container */
.wo-single-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
}

/* Main Content Column */
.wo-single-main {
    background: var(--wo-bg);
    border-radius: var(--wo-radius);
    box-shadow: var(--wo-shadow);
    padding: 2rem;
    border: 1px solid var(--wo-border);
}

.wo-single-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--wo-border);
}

.wo-single-title {
    margin: 0 0 1rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--wo-text);
    line-height: 1.2;
}

.wo-single-header .wo-event-categories {
    margin-bottom: 0;
}

.wo-single-header .wo-category-tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
}

/* Description */
.wo-single-description {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.8;
}

.wo-single-description p {
    margin-bottom: 1rem;
}

.wo-single-description p:last-child {
    margin-bottom: 0;
}

/* Share Section */
.wo-single-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wo-border);
}

.wo-share-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wo-text-muted);
}

.wo-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.wo-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--wo-bg-alt);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    color: var(--wo-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--wo-transition);
}

.wo-share-btn:hover {
    background: var(--wo-primary);
    border-color: var(--wo-primary);
    color: white;
}

/* Sidebar Column */
.wo-single-sidebar {
    position: sticky;
    top: 2rem;
}

.wo-sidebar-card {
    background: var(--wo-bg);
    border-radius: var(--wo-radius);
    box-shadow: var(--wo-shadow);
    border: 1px solid var(--wo-border);
    overflow: hidden;
}

.wo-sidebar-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--wo-border);
}

.wo-sidebar-section:last-of-type {
    border-bottom: none;
}

.wo-sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wo-text-muted);
}

.wo-sidebar-title svg {
    color: var(--wo-primary);
}

.wo-sidebar-date {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wo-text);
}

.wo-sidebar-time {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
    color: var(--wo-text-muted);
}

.wo-sidebar-venue {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wo-text);
}

.wo-sidebar-address {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--wo-text-muted);
    line-height: 1.5;
}

.wo-sidebar-map-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wo-primary);
    text-decoration: none;
}

.wo-sidebar-map-link:hover {
    text-decoration: underline;
}

/* Media Links */
.wo-sidebar-media-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wo-media-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--wo-bg-alt);
    border-radius: var(--wo-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wo-text);
    text-decoration: none;
    transition: all var(--wo-transition);
}

.wo-media-link:hover {
    background: var(--wo-primary-light);
    color: var(--wo-primary);
}

.wo-media-link svg {
    color: var(--wo-primary);
}

/* Social Links in Sidebar */
.wo-sidebar-social {
    display: flex;
    gap: 0.5rem;
}

.wo-sidebar-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--wo-bg-alt);
    border-radius: var(--wo-radius-sm);
    color: var(--wo-text-muted);
    text-decoration: none;
    transition: all var(--wo-transition);
}

.wo-sidebar-social a:hover {
    background: var(--wo-primary);
    color: white;
}

/* Action Buttons */
.wo-sidebar-actions {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--wo-bg-alt);
}

.wo-btn-full {
    width: 100%;
    justify-content: center;
}

.wo-btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.wo-calendar-full .wo-calendar-menu {
    left: 0;
    right: 0;
    bottom: auto;
    top: 100%;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Single Event Responsive */
@media (max-width: 900px) {
    .wo-single-container {
        grid-template-columns: 1fr;
    }

    .wo-single-sidebar {
        position: static;
    }

    .wo-single-image img {
        max-height: 350px;
    }
}

@media (max-width: 767px) {
    .wo-single-event {
        padding: 1rem;
    }

    .wo-single-main {
        padding: 1.5rem;
    }

    .wo-single-title {
        font-size: 1.5rem;
    }

    .wo-single-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .wo-single-image img {
        max-height: 280px;
    }

    .wo-single-image .wo-date-overlay {
        min-width: 55px;
        padding: 10px 12px;
    }

    .wo-single-image .wo-date-day {
        font-size: 24px;
    }
}

/* =====================================================
   SOLD OUT BADGE
   ===================================================== */
.wo-sold-out-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 6px 12px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.wo-sold-out-mini {
    padding: 3px 8px;
    font-size: 0.6rem;
}

.wo-btn-sold-out {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    cursor: not-allowed;
    border: none;
}

/* =====================================================
   LOAD MORE
   ===================================================== */
.wo-load-more-wrap {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wo-border);
}

.wo-btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--wo-bg);
    color: var(--wo-text);
    border: 2px solid var(--wo-border);
    border-radius: var(--wo-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--wo-transition);
    min-width: 200px;
}

.wo-btn-load-more:hover {
    border-color: var(--wo-primary);
    color: var(--wo-primary);
    background: var(--wo-primary-light);
}

.wo-btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wo-spinner {
    animation: wo-spin 1s linear infinite;
}

@keyframes wo-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wo-showing-count {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--wo-text-muted);
}

/* =====================================================
   WIDGET SHORTCODES - Common
   ===================================================== */
.wo-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: var(--wo-text);
}

.wo-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: var(--wo-text);
}

.wo-widget-empty {
    color: var(--wo-text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

/* =====================================================
   WIDGET - Full Cards (same as main shortcode)
   ===================================================== */
.wo-widget-full-cards .wo-widget-title {
    margin-bottom: 1.5rem;
}

/* =====================================================
   WIDGET - Compact List (horizontal cards)
   ===================================================== */
.wo-widget-list .wo-widget-list-grid {
    display: grid;
    grid-template-columns: repeat(var(--wo-widget-columns, 1), 1fr);
    gap: 1rem;
}

.wo-widget-list-card {
    display: flex;
    gap: 0.875rem;
    padding: 0.75rem;
    background: var(--wo-bg);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all var(--wo-transition);
}

.wo-widget-list-card:hover {
    border-color: var(--wo-primary);
    box-shadow: var(--wo-shadow);
}

.wo-widget-list-image {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--wo-bg-alt);
}

.wo-widget-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wo-widget-list-image .wo-sold-out-mini {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 4px;
    font-size: 0.5rem;
}

.wo-widget-list-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.wo-widget-list-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    padding: 0.25rem;
    background: var(--wo-primary-light);
    border-radius: 4px;
    text-align: center;
}

.wo-widget-day {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wo-primary);
    line-height: 1;
}

.wo-widget-month {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--wo-primary);
}

.wo-widget-list-info {
    flex: 1;
    min-width: 0;
}

.wo-widget-list-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.125rem 0;
    color: var(--wo-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wo-widget-list-venue {
    font-size: 0.75rem;
    color: var(--wo-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* =====================================================
   WIDGET - Featured
   ===================================================== */
.wo-widget-featured {
    position: relative;
    background: var(--wo-bg);
    border: 1px solid var(--wo-border);
    border-radius: var(--wo-radius);
    overflow: hidden;
    box-shadow: var(--wo-shadow);
}

.wo-featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, var(--wo-primary) 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.wo-featured-inner {
    display: flex;
    flex-direction: column;
}

.wo-widget-featured-horizontal .wo-featured-inner {
    flex-direction: row;
}

.wo-featured-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--wo-bg-alt);
}

.wo-widget-featured-vertical .wo-featured-image {
    aspect-ratio: 16 / 9;
}

.wo-widget-featured-horizontal .wo-featured-image {
    width: 45%;
    flex-shrink: 0;
}

.wo-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wo-featured-image:hover img {
    transform: scale(1.03);
}

.wo-featured-image .wo-sold-out-badge {
    top: auto;
    bottom: 12px;
    left: 12px;
}

.wo-featured-date-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border-radius: 6px;
    min-width: 50px;
}

.wo-featured-date-overlay .wo-date-day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.wo-featured-date-overlay .wo-date-month {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.wo-featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.wo-widget-featured-horizontal .wo-featured-content {
    flex: 1;
    justify-content: center;
}

.wo-featured-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wo-featured-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.wo-featured-title a {
    color: var(--wo-text);
    text-decoration: none;
}

.wo-featured-title a:hover {
    color: var(--wo-primary);
}

.wo-featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wo-featured-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--wo-text-muted);
}

.wo-featured-meta-item svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    color: var(--wo-primary);
    flex-shrink: 0;
    display: inline-block;
}

.wo-featured-excerpt {
    font-size: 0.9rem;
    color: var(--wo-text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.wo-featured-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive Featured Widget */
@media (max-width: 768px) {
    .wo-widget-featured-horizontal .wo-featured-inner {
        flex-direction: column;
    }

    .wo-widget-featured-horizontal .wo-featured-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* Print Styles */
@media print {
    .wo-filter-bar,
    .wo-view-toggle,
    .wo-lightbox-overlay,
    .wo-meta-link,
    .wo-load-more-wrap {
        display: none !important;
    }

    .wo-event-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
