/**
 * Quarter Results - Rankings Page Styles
 *
 * Professional styling for performance rankings page
 *
 * @version 1.0.0
 * @since 2025-01-01
 */

/* ==========================================
   RANKINGS HERO SECTION
   ========================================== */

.rankings-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 3rem 0 2rem;
}

.breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    opacity: 0.7;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb li[aria-current="page"] {
    color: white;
    font-weight: 600;
}

.rankings-hero .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.rankings-hero .hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
    max-width: 700px;
}

/* ==========================================
   FILTER SECTION
   ========================================== */

.rankings-filters {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 992px) {
    .filter-grid,
    .filter-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .filter-grid,
    .filter-grid-5 {
        grid-template-columns: 1fr;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group select:hover {
    border-color: #3b82f6;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.results-summary {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.results-summary p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

.results-summary strong {
    color: #2c3e50;
}

/* ==========================================
   RANKINGS TABLE
   ========================================== */

.rankings-table-section {
    padding: 3rem 0;
    background: white;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.rankings-table thead {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
}

.rankings-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rankings-table tbody tr {
    border-bottom: 1px solid #e1e8ed;
    transition: background 0.2s ease;
}

.rankings-table tbody tr:hover {
    background: #f8f9fa;
}

.rankings-table tbody tr:last-child {
    border-bottom: none;
}

.rankings-table td {
    padding: 1.25rem 1rem;
    font-size: 0.9375rem;
}

/* Column specific styles */
.rank-col {
    width: 80px;
    text-align: center;
    font-weight: 700;
    color: #1e3a8a;
    font-size: 1rem;
}

.company-col {
    min-width: 250px;
}

.company-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
}

.company-link:hover strong {
    color: #3b82f6;
}

.company-link strong {
    font-size: 1rem;
    color: #2c3e50;
    transition: color 0.2s ease;
}

.company-link .ticker {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.sector-col {
    min-width: 150px;
    color: #6c757d;
}

.date-col {
    min-width: 120px;
    color: #6c757d;
}

.revenue-col {
    min-width: 120px;
    font-weight: 600;
    color: #2c3e50;
}

.metric-col {
    min-width: 120px;
    font-weight: 700;
    font-size: 1.125rem;
    text-align: right;
}

.metric-col.positive {
    color: #10b981;
}

.metric-col.negative {
    color: #dc3545;
}

.metric-col.neutral {
    color: #2c3e50;
}

/* ==========================================
   PAGINATION
   ========================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

.pagination-link {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.pagination-info {
    font-size: 0.9375rem;
    color: #6c757d;
    font-weight: 500;
}

/* ==========================================
   NO RESULTS
   ========================================== */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-results p {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.no-results p:last-child {
    font-size: 1rem;
}

/* ==========================================
   QUICK LINKS SECTION
   ========================================== */

.quick-links {
    padding: 3rem 0;
    background: #f8f9fa;
}

.quick-links h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.quick-link-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.quick-link-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 0.75rem;
}

.quick-link-card p {
    font-size: 0.9375rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .rankings-hero .hero-content h1 {
        font-size: 1.75rem;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .metric-col {
        font-size: 1rem;
    }

    .company-col {
        min-width: 200px;
    }

    .sector-col,
    .date-col {
        display: none; /* Hide on mobile for better UX */
    }

    .pagination {
        gap: 1rem;
    }

    .pagination-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .rankings-table th,
    .rankings-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8125rem;
    }

    .revenue-col {
        display: none; /* Hide revenue on very small screens */
    }
}
