/**
 * Popular Comparisons Widget CSS
 * Path: public_html/css/popular-comparisons-widget.css
 * Version: 2.0.0
 *
 * Changelog v2.0.0:
 * - Redesigned as full-width section (moved out of sidebar)
 * - Horizontal scrollable card layout
 * - Responsive for all screen sizes
 *
 * Styles for the popular comparisons widget.
 * Includes dark mode and responsive support.
 */

/* ============================================
   Widget Container
   ============================================ */

.popular-comparisons-widget {
    margin-top: 8px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
}

.pcw-title {
    font-size: 1.5rem;
    font-weight: normal;
    color: #333;
    margin: 0 0 16px 0;
    text-align: center;
}

/* ============================================
   List — horizontal scrollable row
   ============================================ */

.pcw-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.pcw-item {
    margin: 0;
    padding: 0;
    flex: 1 1 calc(33.333% - 12px);
    min-width: 180px;
    max-width: 100%;
}

.pcw-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background-color: #f8f9fa;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    height: 100%;
    overflow: hidden;
}

.pcw-link:hover {
    border-color: #0056b3;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pcw-link:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* ============================================
   Logos
   ============================================ */

.pcw-logos {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    overflow: hidden;
}

.pcw-logo {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.pcw-vs {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6c757d;
    padding: 0 2px;
}

/* ============================================
   Label + View All
   ============================================ */

.pcw-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pcw-view-all {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0056b3;
    text-decoration: none;
}

.pcw-view-all:hover {
    text-decoration: underline;
}

/* ============================================
   Dark Mode
   ============================================ */

[data-theme="dark"] .popular-comparisons-widget {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pcw-title {
    color: #e2e8f0;
}

[data-theme="dark"] .pcw-link {
    border-color: #334155;
    background-color: #0f172a;
}

[data-theme="dark"] .pcw-link:hover {
    border-color: #60a5fa;
    background-color: #1e293b;
}

[data-theme="dark"] .pcw-logo {
    background-color: #334155;
    border-color: #475569;
}

[data-theme="dark"] .pcw-vs {
    color: #94a3b8;
}

[data-theme="dark"] .pcw-label {
    color: #e2e8f0;
}

[data-theme="dark"] .pcw-view-all {
    color: #60a5fa;
}

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

@media (max-width: 768px) {
    .popular-comparisons-widget {
        margin: 20px auto;
        padding: 15px;
    }

    .pcw-title {
        font-size: 1.3rem;
    }

    .pcw-list {
        gap: 8px;
    }

    .pcw-item {
        flex-basis: calc(50% - 8px);
        min-width: 140px;
    }

    .pcw-link {
        padding: 8px 12px;
    }

    .pcw-logo {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }

    .pcw-label {
        font-size: 0.8rem;
    }
}
