/* Excel-style List View for Search Results */

/* Table Container */
.search-list-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.search-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    /* Slightly smaller for density */
    table-layout: fixed;
    min-width: 1000px;
}

/* Header Styles */
.search-list-table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 700;
    padding: 12px 8px;
    text-align: center;
    /* Default center for headers */
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    vertical-align: middle;
}

/* Body Cell Styles */
.search-list-table tbody td {
    padding: 14px 8px;
    /* Restored padding */
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    color: #212529;
}

.search-list-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* --- Column Widths & Alignments --- */

/* 1. Select (Check) */
.col-check {
    width: 25px;
    /* Reduced as requested (approx 20) */
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
}

/* 2. Image (Thumb) */
.col-thumb {
    width: 100px;
    /* Increased to 100px */
    text-align: center;
    padding: 0 !important;
}

/* 3. Brand */
.col-brand {
    width: 100px;
    text-align: center;
}

/* 4. Name (Product Name) - Flexible */
.col-name {
    width: 250px;
    /* Takes remaining space */
    text-align: left;
}

/* 5. Price */
.col-price {
    width: 120px;
    text-align: right;
}

/* 6. Platform */
.col-platform {
    width: 100px;
    text-align: center;
}

/* 7. Metrics (Reaction) */
.col-metrics {
    width: 200px;
    text-align: center;
}

/* 8. Action (Manage) */
.col-action {
    width: 50px;
    text-align: center;
}


/* --- Cell Content Styles --- */

/* Checkbox */
.list-checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
    margin: 0;
    /* Force visibility overrides */
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    z-index: 10;
}

/* Thumb */
.thumb-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #f1f3f5;
}

/* Brand */
.brand-cell {
    font-weight: 700;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Name */
.name-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    overflow: hidden;
}

.product-name-link {
    font-size: 14px;
    color: #343a40;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
    max-width: 100%;
}

.product-name-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.product-grade {
    font-size: 11px;
    color: #495057;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Price */
.price-cell {
    font-weight: 700;
    color: #212529;
    font-size: 14px;
    text-align: center;
}

/* Platform */
.platform-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #495057;
    /* Critical Fix: Stop badge from flying */
    position: static !important;
    transform: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Metrics */
.metrics-cell {
    font-size: 12px;
    color: #868e96;
    display: flex;
    flex-direction: column;
    /* Stacked metrics for cleaner look in narrow column, or row? User wanted wide. Let's do row wrap or just inline */
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* If row is preferred */
.metrics-cell {
    flex-direction: row;
    flex-wrap: wrap;
}

.metric-item {
    white-space: nowrap;
}

/* Action */
.action-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.list-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #adb5bd;
    padding: 4px;
    transition: color 0.2s;
}

.list-bookmark-btn.bookmarked {
    color: #e91e63;
}

.list-bookmark-btn:hover {
    color: #e91e63;
}

/* Mobile Responsive - Strict Fallback to stacked if needed, but horizontal scroll is often better for data tables */
@media (max-width: 768px) {
    .search-list-container {
        overflow-x: auto;
    }

    /* Simple sticky first column if possible? No, simply allow scroll for now to preserve strict data structure */
}