/* Ticketmaster Style Layout for Ticket Listings */

/* Overall Container Styling */
.ticketmaster-layout .twp-events-content {
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.ticketmaster-layout .events-container {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.ticketmaster-layout #twp-events-heading {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
}

.ticketmaster-layout .twp-filter-controls {
    padding: 0 24px 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticketmaster-layout .twp-showing-from {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Desktop Layout - Ticketmaster Style */
.ticketmaster-layout .events-list.desktop-events {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
}

.ticketmaster-layout .events-list.desktop-events .event-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 0;
    /* background: #fff; */ /* Removed hardcoded background - set dynamically via inline CSS from EventListingsLayouts settings */
    transition: background-color 0.2s ease;
    box-shadow: none;
    min-height: 80px;
}

.ticketmaster-layout .events-list.desktop-events .event-item:hover {
    background-color: #f7f8fa;
}

.ticketmaster-layout .events-list.desktop-events .event-item:first-child {
    border-top: none;
}

/* Gray Date Card - Left Side */
.ticketmaster-layout .events-list.desktop-events .event-date {
    min-width: 80px;
    max-width: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
    margin-right: 20px;
}

/* Event Details - Middle */
.ticketmaster-layout .events-list.desktop-events .event-details {
    flex: 1;
    text-align: left;
    padding-right: 20px;
    min-width: 0;
}

.ticketmaster-layout .events-list.desktop-events .event-details .event-title {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.ticketmaster-layout .events-list.desktop-events .event-details .venue-location {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    margin: 2px 0;
    line-height: 1.3;
}

.ticketmaster-layout .events-list.desktop-events .event-details .event-venue strong {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    display: inline;
}

.ticketmaster-layout .events-list.desktop-events .event-details .event-venue strong a {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    text-decoration: none;
}

.ticketmaster-layout .events-list.desktop-events .event-details .event-venue strong a:hover {
    text-decoration: underline;
}

.ticketmaster-layout .events-list.desktop-events .event-details .event-time-day {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    margin-top: 2px;
}


.ticketmaster-layout .events-list.desktop-events .event-date .date-month {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    line-height: 1;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.ticketmaster-layout .events-list.desktop-events .event-date .date-day {
    /* Typography is set dynamically via inline CSS from EventListingsLayouts settings */
    line-height: 1;
}

.ticketmaster-layout .events-list.desktop-events .event-date .date-year {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    line-height: 1;
    margin-top: 2px;
}

/* Action Button Area - Right Side */
.ticketmaster-layout .events-list.desktop-events .event-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.ticketmaster-layout .events-list.desktop-events .event-action .button {
    border: 1px solid;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
    cursor: pointer;
    min-width: 120px;
    white-space: nowrap;
    /* Colors are set dynamically via inline CSS from EventListingsLayouts settings */
}

.ticketmaster-layout .events-list.desktop-events .event-action .button:hover {
    /* Colors are set dynamically via inline CSS from EventListingsLayouts settings */
    transition: background-color 0.2s ease;
}

.ticketmaster-layout .events-list.desktop-events .event-action .button::after {
    content: '>' !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: white !important;
    margin-left: 8px !important;
}

/* Countdown Messages */
.ticketmaster-layout .events-list.desktop-events .countdown-message {
    /* Background and text colors are set dynamically via inline CSS from EventListingsLayouts settings */
    padding: 4px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: inline-block;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
}

/* Mobile Layout - ACTUAL Ticketmaster Mobile Style */
.ticketmaster-layout .events-list.mobile-events {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
}

.ticketmaster-layout .events-list.mobile-events .event-row-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ticketmaster-layout .events-list.mobile-events .event-item {
    /* background: #fff; */ /* Removed hardcoded background - set dynamically via inline CSS from EventListingsLayouts settings */
    border: none;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
    transition: background-color 0.2s ease;
    position: relative;
    min-height: 70px;
    display: flex;
    flex-direction: column;
}

.ticketmaster-layout .events-list.mobile-events .event-item:hover {
    background-color: #f7f8fa;
}

.ticketmaster-layout .events-list.mobile-events .event-item:first-child {
    border-top: none;
}

/* Mobile Date Header */
.ticketmaster-layout .events-list.mobile-events .event-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.ticketmaster-layout .events-list.mobile-events .event-date > div {
    font-size: 16px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ticketmaster-layout .events-list.mobile-events .event-time {
    font-size: 14px;
    color: #525252;
    font-weight: 400;
    text-align: right;
}

/* Mobile Event Details */
.ticketmaster-layout .events-list.mobile-events .event-details {
    position: relative;
    padding-right: 30px;
}

.ticketmaster-layout .events-list.mobile-events .event-details .event-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticketmaster-layout .events-list.mobile-events .event-venue {
    margin-bottom: 0;
}

.ticketmaster-layout .events-list.mobile-events .event-venue strong {
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
}

.ticketmaster-layout .events-list.mobile-events .venue-location {
    color: #666;
    font-size: 14px;
    line-height: 1.3;
    margin-top: 2px;
}

/* GeoIP Events Styling */
.ticketmaster-layout .geoip-events .event-item {
    border-left: 4px solid #ff6b35;
    /* background: linear-gradient(90deg, #fff5f2 0%, #fff 100%); */ /* Removed hardcoded background - set dynamically via row color settings from EventListingsLayouts */
}

.ticketmaster-layout .geoip-events .event-distance {
    color: #ff6b35;
    font-weight: 600;
    font-size: 13px;
}

/* Filter Panel Enhancements */
.ticketmaster-layout .twp-filter-panel {
    background: #f8f9fa;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
}

.ticketmaster-layout .twp-filter-section h4 {
    color: #026cdf;
    font-weight: 600;
    font-size: 16px;
}

.ticketmaster-layout .twp-filter-options label {
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.ticketmaster-layout .twp-filter-options label:hover {
    background-color: #f0f8ff;
}

.ticketmaster-layout .twp-show-more-categories {
    color: #026cdf !important;
    background: rgba(2, 108, 223, 0.05) !important;
    border: 1px solid rgba(2, 108, 223, 0.2) !important;
}

.ticketmaster-layout .twp-show-more-categories:hover {
    background: rgba(2, 108, 223, 0.1) !important;
    border-color: #026cdf !important;
}

.ticketmaster-layout .twp-filter-options input[type="checkbox"]:checked + label {
    background-color: #e6f3ff;
    color: #026cdf;
    font-weight: 600;
}

/* Selected Filters */
.ticketmaster-layout .twp-filter-tag {
    background: #026cdf;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    margin: 4px 8px 4px 0;
    display: inline-flex;
    align-items: center;
}

.ticketmaster-layout .twp-filter-tag .twp-remove-filter {
    background: rgba(255,255,255,0.3);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.ticketmaster-layout .twp-filter-tag .twp-remove-filter:hover {
    background: rgba(255,255,255,0.5);
}

/* Filter Toggle Button - Ticketmaster Style */
.ticketmaster-layout .twp-filter-toggle-btn {
    background: #1e40af;
    color: #fff;
    border: 1px solid #1e40af;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ticketmaster-layout .twp-filter-toggle-btn:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    transform: none;
    box-shadow: none;
}

.ticketmaster-layout .twp-filter-toggle-btn .twp-filter-icon {
    display: inline-flex;
    align-items: center;
}

.ticketmaster-layout .twp-filter-toggle-btn .twp-filter-icon svg {
    width: 14px;
    height: 14px;
}

/* Pagination - Ticketmaster Style */
.ticketmaster-layout .ticketwp-pagination {
    margin-top: 32px;
    text-align: center;
}

.ticketmaster-layout .ticketwp-pagination .page-numbers {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    margin: 0 2px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    display: inline-block;
    text-align: center;
}

.ticketmaster-layout .ticketwp-pagination .page-numbers:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

.ticketmaster-layout .ticketwp-pagination .page-numbers.current {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

.ticketmaster-layout .ticketwp-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ticketmaster-layout .events-list.desktop-events {
        display: none;
    }
    
    .ticketmaster-layout .events-list.mobile-events {
        display: block;
    }
    
    /* Override Frontend.css mobile spacing for Ticketmaster layout */
    .ticketmaster-layout .geoip-mobile-events .event-row-link,
    .ticketmaster-layout .mobile-events .event-row-link {
        padding: 0 !important;
        margin-bottom: 0 !important;
        border-bottom: none !important;
    }
    
    .ticketmaster-layout .twp-filter-panel {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .ticketmaster-layout .twp-filter-panel.twp-active {
        left: 0;
    }
    
    /* Mobile - Remove events-container constraints and flexbox */
    .ticketmaster-layout .events-container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    /* Mobile Pagination - Now should be full width */
    .ticketmaster-layout .ticketwp-pagination {
        margin: 32px 0 0 0 !important;
        padding: 0 16px !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (min-width: 769px) {
    .ticketmaster-layout .events-list.desktop-events {
        display: block;
    }
    
    .ticketmaster-layout .events-list.mobile-events {
        display: none;
    }
}

/* Clear Filters Button */
.ticketmaster-layout .twp-clear-filters-btn {
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticketmaster-layout .twp-clear-filters-btn:hover {
    background: #ff3742;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,71,87,0.3);
}

/* Loading States */
.ticketmaster-layout .event-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ticketmaster-layout .event-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #026cdf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ticketmaster Mobile Layout - Exact Match */
.ticketmaster-layout .mobile-events .event-row-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ticketmaster-layout .mobile-events .event-item {
    /* background color is set dynamically via InlineStyles.php (mobile row colors) */
    background: transparent;
    border-bottom: 1px solid #e1e5e9;
    padding: 20px 16px;
    position: relative;
    transition: background-color 0.2s ease;
}

.ticketmaster-layout .mobile-events .event-item:hover {
    background-color: #f7f8fa;
}

/* Main layout container */
.ticketmaster-layout .mobile-events .tm-mobile-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-right: 40px;
}

/* Gray date card on the left */
.ticketmaster-layout .mobile-events .tm-date-card {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.ticketmaster-layout .mobile-events .tm-month {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    line-height: 1;
    margin-bottom: 2px;
}

.ticketmaster-layout .mobile-events .tm-day {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

/* Event details on the right */
.ticketmaster-layout .mobile-events .tm-event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.ticketmaster-layout .mobile-events .tm-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.ticketmaster-layout .mobile-events .tm-location {
    color: #666;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 2px;
}

.ticketmaster-layout .mobile-events .tm-venue {
    color: #1e40af;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.ticketmaster-layout .mobile-events .tm-time {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* Chevron arrow container */
.ticketmaster-layout .mobile-events .tm-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Blue circle with chevron arrow - Default state */
/* Colors are now controlled dynamically via inline CSS from EventListingsLayouts settings */
.ticketmaster-layout .mobile-events .tm-chevron-circle {
    width: 32px;
    height: 32px;
    /* background color is set dynamically via inline CSS */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ticketmaster-layout .mobile-events .tm-chevron-circle span {
    /* color is set dynamically via inline CSS */
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

/* Hover state - becomes outline circle with chevron */
/* Colors are now controlled dynamically via inline CSS from EventListingsLayouts settings */
.ticketmaster-layout .mobile-events .event-row-link:hover .tm-chevron-circle {
    background: transparent;
    /* border-color is set dynamically via inline CSS */
    border: 2px solid;
    border-radius: 50%;
}

.ticketmaster-layout .mobile-events .event-row-link:hover .tm-chevron-circle span {
    /* color is set dynamically via inline CSS */
    font-size: 16px;
}