/* ============================================================
   Comparison Tool Styles
   ============================================================ */

.compare-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    background: transparent !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #667eea !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.compare-btn:hover {
    border-color: #667eea !important;
    background: #f0f4ff !important;
}

.compare-btn.active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Compare Bar */
.compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 0;
    z-index: 999;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.compare-bar.d-none {
    display: none !important;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.compare-bar .container {
    padding: 0 20px;
}

.compare-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 8px;
    font-size: 13px;
    font-weight: 500;
}

.compare-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Comparison Page Styles */
.comparison-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    text-align: center;
}

.comparison-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.comparison-header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Comparison Toolbar */
.comparison-toolbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
    margin-bottom: 30px;
    position: sticky;
    top: 76px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.toolbar-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.toolbar-actions .btn:hover {
    background: #f8fafc;
    border-color: #667eea;
    color: #667eea;
}

.toolbar-actions .btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.toolbar-actions .btn-primary:hover {
    background: #5568d3;
    border-color: #5568d3;
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.category-filter {
    padding: 8px 16px;
    border-radius: 50px;
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
}

.category-filter:hover,
.category-filter.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Comparison Table */
.comparison-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: white;
}

.compare-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 14px;
}

.compare-table thead tr {
    border-bottom: 2px solid #e2e8f0;
}

.compare-table th {
    padding: 20px;
    background: white;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    border-right: 1px solid #e2e8f0;
}

.compare-table th:first-child {
    background: #f8fafc;
    text-align: left;
    border-right: 2px solid #e2e8f0;
    font-size: 13px;
    width: 200px;
}

.compare-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    text-align: center;
}

.compare-table td:last-child {
    border-right: none;
}

.compare-table tbody tr:hover {
    background: #f9fafb;
}

.compare-school-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.compare-school-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* Category Headers */
.compare-table tbody tr[style*="background:#f8fafc"] {
    background: #f1f5f9 !important;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.compare-table tbody tr[style*="background:#f8fafc"] th {
    padding: 12px 20px;
    text-align: left;
}

/* Winning/Highlight Row */
.compare-win {
    background: #fef3c7 !important;
    font-weight: 600;
    color: #92400e;
}

.compare-win i {
    color: #f59e0b;
}

/* Tags & Badges */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.tag-blue {
    background: #dbeafe;
    color: #1e40af;
}

.tag-green {
    background: #d1fae5;
    color: #065f46;
}

.tag-yellow {
    background: #fef3c7;
    color: #92400e;
}

.compare-stars {
    display: flex;
    gap: 4px;
}
    color: #f59e0b;
    font-size: 12px;
}

.rating-count {
    font-size: 12px;
    color: #64748b;
}

/* Data Cells */
.data-cell {
    font-size: 14px;
    color: #1e293b;
}

.data-cell.high {
    color: #10b981;
    font-weight: 600;
}

.data-cell.low {
    color: #ef4444;
}

.data-cell.neutral {
    color: #64748b;
}

.list-item {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
}

/* Legend */
.comparison-legend {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.legend-title {
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e293b;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.legend-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* School Actions */
.school-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Share Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.modal-close:hover {
    color: #1e293b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comparison-header h1 {
        font-size: 1.8rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .school-logo {
        width: 60px;
        height: 60px;
    }

    .school-name {
        font-size: 13px;
    }

    .toolbar-actions {
        justify-content: space-around;
    }

    .toolbar-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .category-filters {
        justify-content: space-around;
    }

    .compare-bar {
        padding: 12px 0;
    }

    .compare-bar .container {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

/* Print Styles */
@media print {
    .comparison-toolbar,
    .toolbar-actions,
    .school-actions,
    .compare-bar,
    .btn {
        display: none !important;
    }

    .comparison-header {
        page-break-inside: avoid;
        background: none;
        color: #1e293b;
        border: 1px solid #e2e8f0;
    }

    .comparison-table {
        page-break-inside: avoid;
    }

    .comparison-table tr {
        page-break-inside: avoid;
    }
}
