/* Portal Page Styles - Transfer portal scorecard interface */

/* Portal Hero Section */
.portal-hero-section {
    margin-bottom: 2rem;
}

.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.portal-stat-card {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portal-stat-card .stat-icon {
    background: var(--team-primary-color, #007bff);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.portal-stat-card .stat-content {
    flex: 1;
}

.portal-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary, #212529);
    line-height: 1;
}

.portal-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary, #6c757d);
    margin-top: 0.25rem;
}

/* Net balance color coding */
.net-positive {
    color: #28a745 !important;
}

.net-negative {
    color: #dc3545 !important;
}

.net-neutral {
    color: var(--text-secondary, #6c757d) !important;
}

/* Tab Navigation */
.portal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #dee2e6);
    padding-bottom: 0;
}

.portal-tab {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary, #6c757d);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.portal-tab:hover {
    color: var(--text-primary, #212529);
    background: rgba(0, 0, 0, 0.03);
}

.portal-tab.active {
    color: var(--team-primary-color, #007bff);
    border-bottom-color: var(--team-primary-color, #007bff);
    font-weight: 600;
}

.portal-tab .tab-count {
    background: var(--border-color, #dee2e6);
    color: var(--text-secondary, #6c757d);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.portal-tab.active .tab-count {
    background: var(--team-primary-color, #007bff);
    color: white;
}

/* Transfer Table */
.portal-transfers-section {
    margin-bottom: 2rem;
}

.portal-table-wrapper {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    overflow: hidden;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.portal-table th {
    background: var(--team-primary-color, #007bff);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portal-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light, #f8f9fa);
    vertical-align: middle;
}

.portal-table tbody tr:hover {
    background: var(--hover-bg, #f8f9fa);
}

.portal-table tbody tr:last-child td {
    border-bottom: none;
}

.portal-table .name-cell {
    font-weight: 600;
    color: var(--text-primary, #212529);
}

.portal-table .position-cell {
    font-weight: 500;
    color: var(--team-primary-color, #007bff);
    text-align: center;
    width: 70px;
}

.portal-table .stars-cell {
    text-align: center;
    width: 80px;
}

.portal-table .direction-cell {
    font-size: 0.85rem;
    max-width: 280px;
}

.direction-cell .school-name {
    font-weight: 500;
}

.direction-cell .arrow {
    color: var(--text-secondary, #6c757d);
    margin: 0 0.3rem;
}

.direction-cell .incoming-label {
    color: #28a745;
}

.direction-cell .outgoing-label {
    color: #dc3545;
}

.portal-table .eligibility-cell {
    font-size: 0.8rem;
    color: var(--text-secondary, #6c757d);
}

.portal-table .date-cell {
    font-size: 0.8rem;
    color: var(--text-secondary, #6c757d);
    width: 100px;
}

/* Star Ratings */
.star-rating {
    font-size: 1rem;
    letter-spacing: 1px;
}

.five-star { color: #ffd700; }
.four-star { color: #ffb347; }
.three-star { color: #dda0dd; }
.two-star { color: #87ceeb; }

/* Charts Section */
.portal-charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.portal-chart-card {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1.5rem;
}

.portal-chart-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #212529);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-chart-card h4 i {
    color: var(--team-primary-color, #007bff);
}

.chart-container {
    height: 280px;
    position: relative;
}

/* Section Headings (reuse recruit pattern) */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--team-primary-color, #007bff);
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
    color: var(--text-primary, #212529);
    font-weight: 600;
}

.section-heading h2 {
    font-size: 1.5rem;
}

.section-heading h3 {
    font-size: 1.25rem;
}

.section-heading i {
    color: var(--team-primary-color, #007bff);
    font-size: 1.2rem;
}

/* Empty state */
.portal-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #6c757d);
}

.portal-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.portal-empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .portal-charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .portal-stat-card {
        padding: 1rem;
    }

    .portal-stat-card .stat-value {
        font-size: 1.5rem;
    }

    .portal-table {
        font-size: 0.8rem;
    }

    .portal-table th,
    .portal-table td {
        padding: 0.5rem;
    }

    /* Hide less important columns on mobile */
    .portal-table .eligibility-cell,
    .portal-table th:nth-child(6),
    .portal-table .date-cell,
    .portal-table th:nth-child(7) {
        display: none;
    }

    .chart-container {
        height: 220px;
    }

    .portal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .portal-stats-grid {
        grid-template-columns: 1fr;
    }

    .portal-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .portal-stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Dark Mode */
[data-theme="dark"] {
    --card-background: #2d3748;
    --border-color: #4a5568;
    --border-light: #4a5568;
    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --hover-bg: #4a5568;
}

[data-theme="dark"] .portal-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .portal-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .portal-year-selector select {
    background: #2d3748;
    border-color: #4a5568;
    color: #f7fafc;
}

/* Print */
@media print {
    .portal-tabs {
        display: none;
    }

    .portal-charts-section {
        grid-template-columns: 1fr;
    }

    .portal-stat-card {
        break-inside: avoid;
    }
}
