/* ===================================
   COMPARISON VIEW STYLES (PRO FEATURE)
   Clean, professional side-by-side comparison
   =================================== */

/* Floating Compare Bar */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 42, 42, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(127, 255, 0, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.compare-bar.active {
    transform: translateY(0);
}

.compare-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.compare-bar-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.compare-counter {
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: #7FFF00;
    white-space: nowrap;
}

.compare-counter-number {
    font-size: 1.2rem;
    font-weight: 800;
}

.compare-selected-events {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    flex: 1;
    padding: 0.25rem 0;
}

.compare-mini-card {
    min-width: 180px;
    background: rgba(127, 255, 0, 0.05);
    border: 1px solid rgba(127, 255, 0, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.compare-mini-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(127, 255, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.compare-mini-info {
    flex: 1;
    min-width: 0;
}

.compare-mini-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-mini-price {
    font-size: 0.8rem;
    color: #7FFF00;
    font-weight: 600;
}

.compare-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    border: none;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-bar-actions {
    display: flex;
    gap: 0.75rem;
}

.compare-clear-btn,
.compare-view-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    font-size: 0.9rem;
}

.compare-clear-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.compare-view-btn {
    background: #7FFF00;
    color: #0A1A1A;
}

.compare-view-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   COMPARISON VIEW - Main Container
   =================================== */

.events-grid.comparison-view {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 1rem;
    margin-bottom: 100px;
}

/* Bottom Actions Bar - UNDER the table */
.comparison-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 42, 42, 0.6);
    border: 1px solid rgba(127, 255, 0, 0.15);
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

.comparison-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(127, 255, 0, 0.1);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 8px;
    color: #7FFF00;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.comparison-back-btn:hover {
    background: rgba(127, 255, 0, 0.2);
}

.comparison-info {
    text-align: center;
}

.comparison-info h2 {
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.comparison-info p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.25rem 0 0 0;
}

.comparison-clear-all-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.comparison-clear-all-btn:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Hide old top bar class */
.comparison-top-bar {
    display: none;
}

/* ===================================
   COMPARISON TABLE - Full Width Professional
   =================================== */

.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.comparison-table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(15, 42, 42, 0.5);
    border: 1px solid rgba(127, 255, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    table-layout: fixed;
}

/* Table Header - Event Cards */
.comparison-table thead tr {
    background: rgba(15, 42, 42, 0.8);
}

.comparison-table th {
    padding: 1.5rem 1.25rem;
    text-align: center;
    vertical-align: top;
    border-bottom: 1px solid rgba(127, 255, 0, 0.1);
}

.comparison-table th:first-child {
    width: 140px;
    min-width: 140px;
    text-align: left;
    background: rgba(10, 26, 26, 0.6);
}

/* Event Header Card */
.comparison-event-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.comparison-event-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.comparison-event-badge.best-overall {
    background: #FFD700;
    color: #000;
}

.comparison-event-badge.best-value {
    background: #7FFF00;
    color: #000;
}

.comparison-event-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(127, 255, 0, 0.1), rgba(78, 205, 196, 0.1));
    border: 1px solid rgba(127, 255, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.comparison-event-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    max-width: 200px;
}

.comparison-event-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(127, 255, 0, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #7FFF00;
    font-weight: 600;
    text-transform: uppercase;
}

/* Table Body - Data Rows */
.comparison-table tbody tr {
    transition: background 0.2s;
}

.comparison-table tbody tr:hover {
    background: rgba(127, 255, 0, 0.03);
}

.comparison-table td {
    padding: 1rem 1.25rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid rgba(127, 255, 0, 0.08);
}

.comparison-table td:first-child {
    width: 140px;
    min-width: 140px;
    text-align: left;
    background: rgba(10, 26, 26, 0.4);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Row Label */
.row-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.row-label svg {
    width: 18px;
    height: 18px;
    stroke: #7FFF00;
    opacity: 0.7;
}

/* Cell Values */
.cell-value {
    font-size: 1rem;
    color: #fff;
    display: inline-block;
    position: relative;
}

.cell-value.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #7FFF00;
}

.cell-value.winner::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -16px;
    width: 18px;
    height: 18px;
    background: #7FFF00;
    color: #0A1A1A;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Rating Display */
.rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    position: relative;
}

.rating-display.winner::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -16px;
    width: 18px;
    height: 18px;
    background: #7FFF00;
    color: #0A1A1A;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars svg {
    width: 16px;
    height: 16px;
    fill: #FFD700;
}

.rating-stars svg.empty {
    fill: rgba(255, 255, 255, 0.2);
}

/* Capacity Bar */
.capacity-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.capacity-bar {
    width: 100%;
    max-width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: #7FFF00;
    transition: width 0.3s;
}

/* Location Badge */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4ECDC4;
}

/* Action Buttons */
.comparison-table tfoot td {
    padding: 1.25rem 1rem;
    background: rgba(10, 26, 26, 0.6);
}

.comparison-action-btn {
    padding: 0.75rem 1.5rem;
    background: #7FFF00;
    color: #0A1A1A;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.comparison-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 255, 0, 0.3);
}

/* ===================================
   ADD TO COMPARE BUTTON (on event cards)
   =================================== */

.add-to-compare-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: rgba(15, 42, 42, 0.9);
    border: 1px solid rgba(127, 255, 0, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.add-to-compare-btn:hover {
    background: rgba(127, 255, 0, 0.15);
    border-color: rgba(127, 255, 0, 0.5);
}

.add-to-compare-btn.active {
    background: #7FFF00;
    border-color: #7FFF00;
}

.add-to-compare-btn svg {
    width: 18px;
    height: 18px;
    stroke: #7FFF00;
}

.add-to-compare-btn.active svg {
    stroke: #0A1A1A;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .compare-bar-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .compare-bar-actions {
        width: 100%;
    }
    
    .compare-view-btn,
    .compare-clear-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .comparison-bottom-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        width: 100px;
        min-width: 100px;
    }
    
    .comparison-event-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .comparison-event-name {
        font-size: 0.9rem;
    }
}

/* Add padding when compare bar is active */
body.compare-active .events-grid-section {
    padding-bottom: 120px !important;
}
