/**
 * Bull Search - Comparison Styles
 *
 * Modal and table styling for bull comparisons.
 *
 * @package Bull_Search
 */

/* ============================================
   Modal Overlay
   ============================================ */
.bs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.bs-modal {
    background: var(--bs-white);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-shadow-lg);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.bs-comparison-modal {
    max-width: 1200px;
}

/* ============================================
   Modal Header
   ============================================ */
.bs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bs-gray-200);
    flex-shrink: 0;
}

.bs-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--bs-gray-800);
}

.bs-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   Modal Body
   ============================================ */
.bs-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   Comparison Table
   ============================================ */
.bs-comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.bs-comparison-table th,
.bs-comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bs-gray-100);
}

.bs-comparison-table thead th {
    background: var(--bs-gray-50, #fafafa);
    font-weight: 600;
    font-size: 14px;
    color: var(--bs-gray-700);
    border-bottom: 1px solid var(--bs-gray-200);
    position: sticky;
    top: 0;
}

/* Trait Column */
.bs-trait-col {
    width: 200px;
    min-width: 200px;
    background: var(--bs-gray-50, #fafafa);
    font-size: 14px;
}

.bs-trait-col strong {
    color: var(--bs-gray-800);
}

.bs-unit {
    font-size: 12px;
    color: var(--bs-gray-500);
    font-weight: normal;
    margin-left: 4px;
}

/* Bull Columns */
.bs-bull-col {
    text-align: center;
    font-size: 14px;
    min-width: 150px;
}

.bs-bull-col.bs-best {
    background: rgba(40, 167, 69, 0.1);
    font-weight: 600;
    color: var(--bs-success);
}

/* Bull Header */
.bs-compare-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bs-compare-header img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--bs-border-radius);
    background: var(--bs-gray-100);
}

.bs-compare-header span {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* ============================================
   Category Grouping (for print)
   ============================================ */
.bs-comparison-table tbody tr:first-child td {
    padding-top: 20px;
}

.bs-comparison-table .bs-category-row td {
    background: var(--bs-gray-100);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bs-gray-600);
    padding: 8px 16px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .bs-modal-overlay {
        padding: 10px;
    }

    .bs-modal {
        max-height: 95vh;
    }

    .bs-modal-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .bs-modal-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .bs-comparison-table {
        display: block;
        overflow-x: auto;
    }

    .bs-trait-col {
        width: 150px;
        min-width: 150px;
    }

    .bs-bull-col {
        min-width: 120px;
    }
}
