/* StubHub Style Layout for Ticket Listings */

/* Overall Container Styling */
.stubhub-layout .twp-events-content {
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin-top: 20px;
}

.stubhub-layout .events-container {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.stubhub-layout #twp-events-heading {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding: 24px 24px 0 24px;
}

.stubhub-layout .twp-filter-controls {
    padding: 0 24px 20px 24px;
    border-bottom: 1px solid #e6e6e6;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stubhub-layout .twp-showing-from {
    color: #6f6f6f;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Desktop Layout - StubHub Style */
.stubhub-layout .events-list.desktop-events {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.stubhub-layout .events-list.desktop-events .event-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    /* background color set dynamically via inline CSS from EventListingsLayouts settings */
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 90px;
    position: relative;
}

.stubhub-layout .events-list.desktop-events .event-item:hover {
    background-color: #fafafa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.stubhub-layout .events-list.desktop-events .event-item:last-child {
    margin-bottom: 0;
}

/* Date Card - Left Side (StubHub Purple Style) */
.stubhub-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: space-between;
    background: #fff;
    border: 2px solid #663399;
    border-radius: 8px;
    padding: 8px 8px 20px 8px;
    text-align: center;
    margin-right: 20px;
    color: #663399;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 70px;
    position: relative;
}

.stubhub-layout .events-list.desktop-events .event-date .date-month {
    font-size: 12px;
    font-weight: 700;
    color: #663399;
    line-height: 1;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stubhub-layout .events-list.desktop-events .event-date .date-day {
    font-size: 24px;
    font-weight: 700;
    color: #663399;
    line-height: 1;
    flex: 1;
    display: flex;
    align-items: center;
    padding-bottom: 5px;
}

.stubhub-layout .events-list.desktop-events .event-date .date-year {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(102, 51, 153, 0.7);
    padding: 6px 0;
    line-height: 1;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 6px 6px;
    text-align: center;
}

.stubhub-layout .events-list.desktop-events .event-date .date-day-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: rgba(102, 51, 153, 0.7);
    padding: 4px 0;
    line-height: 1;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 6px 6px;
    text-align: center;
    text-transform: uppercase;
}

/* Event Details - Middle */
.stubhub-layout .events-list.desktop-events .event-details {
    flex: 1;
    text-align: left;
    padding-right: 20px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stubhub-layout .events-list.desktop-events .event-details .event-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.stubhub-layout .events-list.desktop-events .event-details .event-info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6f6f6f;
    font-size: 14px;
    margin: 4px 0;
    line-height: 1.3;
    font-weight: 500;
}

.stubhub-layout .events-list.desktop-events .event-details .event-info-line .separator {
    color: #ccc;
    font-weight: 400;
}

.stubhub-layout .events-list.desktop-events .event-details .event-venue-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.stubhub-layout .events-list.desktop-events .event-details .event-venue-link:hover {
    color: #663399;
    text-decoration: underline;
}

.stubhub-layout .events-list.desktop-events .event-details .country-flag {
    font-size: 16px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI Symbol", "Noto Emoji";
}

.stubhub-layout .events-list.mobile-events .event-details .country-flag {
    font-size: 14px;
    margin-right: 4px;
    display: inline-block;
    vertical-align: middle;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI Symbol", "Noto Emoji";
}

.stubhub-layout .events-list.desktop-events .event-details .selling-fast-badge {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stubhub-layout .events-list.desktop-events .event-details .selling-fast-badge::before {
    content: "🔥";
    font-size: 12px;
}

/* Action Button Area - Right Side (StubHub Purple Outline) */
.stubhub-layout .events-list.desktop-events .event-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 20px;
    width: 140px;
    text-align: center;
}

.stubhub-layout .events-list.desktop-events .event-action .button,
.stubhub-layout .events-list.desktop-events .event-action .event-row-link.button {
    border: 2px solid;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 100px;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 auto;
    /* Colors are set dynamically via inline CSS from EventListingsLayouts settings */
}

.stubhub-layout .events-list.desktop-events .event-action .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 51, 153, 0.3);
    /* Colors are set dynamically via inline CSS from EventListingsLayouts settings */
}

/* Countdown Messages */
.stubhub-layout .events-list.desktop-events .countdown-message {
    background: #ff6b35;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.3);
}

/* Mobile Layout - StubHub Mobile Style */
.stubhub-layout .events-list.mobile-events {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

.stubhub-layout .events-list.mobile-events .event-row-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 0;
}

.stubhub-layout .events-list.mobile-events .event-item {
    /* background color set dynamically via inline CSS from EventListingsLayouts settings */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stubhub-layout .events-list.mobile-events .event-item:hover {
    background-color: #fafafa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.stubhub-layout .events-list.mobile-events .event-item:last-child {
    margin-bottom: 0;
}

/* Mobile Layout Container */
.stubhub-layout .events-list.mobile-events .sh-mobile-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

/* Mobile Date Card */
.stubhub-layout .events-list.mobile-events .sh-date-card {
    background: #fff;
    border: 2px solid #663399;
    border-radius: 8px;
    padding: 8px 6px 6px 6px;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
    color: #663399;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stubhub-layout .events-list.mobile-events .sh-month {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stubhub-layout .events-list.mobile-events .sh-day {
    font-size: 20px;
    font-weight: 700;
    color: #663399;
    line-height: 1;
    margin-bottom: 2px;
}

.stubhub-layout .events-list.mobile-events .sh-year {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    background: rgba(102, 51, 153, 0.7);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
    margin-top: auto;
}

/* Mobile Event Details */
.stubhub-layout .events-list.mobile-events .sh-event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding-right: 40px;
}

.stubhub-layout .events-list.mobile-events .sh-title {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.stubhub-layout .events-list.mobile-events .sh-location {
    color: #6f6f6f;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.stubhub-layout .events-list.mobile-events .sh-venue {
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
}

.stubhub-layout .events-list.mobile-events .sh-performer {
    color: #663399;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.stubhub-layout .events-list.mobile-events .sh-time {
    color: #6f6f6f;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}

.stubhub-layout .events-list.mobile-events .sh-location {
    color: #6f6f6f;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2px;
}

.stubhub-layout .events-list.mobile-events .sh-selling-fast {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stubhub-layout .events-list.mobile-events .sh-selling-fast::before {
    content: "🔥";
    font-size: 10px;
}

/* Mobile Chevron Arrow - Hidden */
.stubhub-layout .events-list.mobile-events .sh-chevron {
    display: none;
}

/* GeoIP Events Styling */
.stubhub-layout .geoip-events .event-item {
    border-left: 4px solid #ff6b35;
    /* background color set dynamically via row color settings from EventListingsLayouts */
}

.stubhub-layout .geoip-events .event-distance {
    color: #ff6b35;
    font-weight: 600;
    font-size: 13px;
    margin-top: 4px;
    display: inline-block;
}

/* Filter Panel Enhancements */
.stubhub-layout .twp-filter-panel {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stubhub-layout .twp-filter-section h4 {
    color: #663399;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
}

.stubhub-layout .twp-filter-options label {
    padding: 10px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
    display: block;
}

.stubhub-layout .twp-filter-options label:hover {
    background-color: #f8f9fa;
    border-color: #e6e6e6;
}

.stubhub-layout .twp-filter-options input[type="checkbox"]:checked + label {
    background-color: rgba(102, 51, 153, 0.1);
    color: #663399;
    font-weight: 600;
    border-color: #663399;
}

.stubhub-layout .twp-show-more-categories {
    color: #663399 !important;
    background: rgba(102, 51, 153, 0.05) !important;
    border: 1px solid rgba(102, 51, 153, 0.2) !important;
}

.stubhub-layout .twp-show-more-categories:hover {
    background: rgba(102, 51, 153, 0.1) !important;
    border-color: #663399 !important;
}

/* Selected Filters */
.stubhub-layout .twp-filter-tag {
    background: #663399;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 4px 8px 4px 0;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(102, 51, 153, 0.2);
}

.stubhub-layout .twp-filter-tag .twp-remove-filter {
    background: rgba(255,255,255,0.3);
    border: none;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.stubhub-layout .twp-filter-tag .twp-remove-filter:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

/* Filter Toggle Button - StubHub Style */
.stubhub-layout .twp-filter-toggle-btn {
    background: #fff;
    color: #663399;
    border: 2px solid #663399;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stubhub-layout .twp-filter-toggle-btn:hover {
    background: #663399;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 51, 153, 0.3);
}

.stubhub-layout .twp-filter-toggle-btn .twp-filter-icon {
    display: inline-flex;
    align-items: center;
}

.stubhub-layout .twp-filter-toggle-btn .twp-filter-icon svg {
    width: 16px;
    height: 16px;
}

/* Pagination - StubHub Style */
.stubhub-layout .ticketwp-pagination {
    margin-top: 40px;
    text-align: center;
    padding: 20px 0;
}

.stubhub-layout .ticketwp-pagination .page-numbers {
    background: #fff;
    border: 2px solid #e6e6e6;
    color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin: 0 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    min-width: 44px;
    display: inline-block;
    text-align: center;
}

.stubhub-layout .ticketwp-pagination .page-numbers:hover {
    background: #f8f9fa;
    border-color: #663399;
    color: #663399;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 51, 153, 0.2);
}

.stubhub-layout .ticketwp-pagination .page-numbers.current {
    background: #663399;
    color: #fff;
    border-color: #663399;
    box-shadow: 0 2px 8px rgba(102, 51, 153, 0.3);
}

.stubhub-layout .ticketwp-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #6f6f6f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stubhub-layout .events-list.desktop-events {
        display: none;
    }
    
    .stubhub-layout .events-list.mobile-events {
        display: block;
    }
    
    /* Override Frontend.css mobile spacing for StubHub layout */
    .stubhub-layout .geoip-mobile-events .event-row-link,
    .stubhub-layout .mobile-events .event-row-link {
        padding: 0 !important;
        margin-bottom: 16px !important;
        border-bottom: none !important;
    }
    
    .stubhub-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;
    }
    
    .stubhub-layout .twp-filter-panel.twp-active {
        left: 0;
    }
    
    .stubhub-layout .events-container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    .stubhub-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) {
    .stubhub-layout .events-list.desktop-events {
        display: block;
    }
    
    .stubhub-layout .events-list.mobile-events {
        display: none;
    }
}

/* Clear Filters Button */
.stubhub-layout .twp-clear-filters-btn {
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.stubhub-layout .twp-clear-filters-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Loading States */
.stubhub-layout .event-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.stubhub-layout .event-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #663399;
    border-radius: 50%;
    animation: stubhub-spin 1s linear infinite;
}

@keyframes stubhub-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Visual Indicators */
.stubhub-layout .visual-indicator-badge {
    background: linear-gradient(135deg, #ff6b35, #e55a2b) !important;
    color: #fff !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    text-align: center !important;
    display: block !important;
    z-index: 999 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3) !important;
}
