/* PSV Ratings Dashboard Custom Styles */

/* Sidebar styles - matching your existing app */
.sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 60px;
    background-color: #212529;
    color: white;
    transition: width 0.3s ease;
    z-index: 1030;
    overflow: hidden;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.sidebar-container:not(.collapsed) {
    width: 250px;
}

.sidebar-content {
    width: 250px;
    padding-top: 60px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1031;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-container .nav-link {
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.sidebar-container .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-container .nav-link.active {
    background-color: #0d6efd;
}

.sidebar-container .nav-link i {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

/* Main content adjustment */
.main-content {
    width: calc(100% - 60px) !important;
    margin-left: 60px !important;
    padding-left: 20px;
    padding-right: 20px;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.sidebar-container:not(.collapsed) ~ .main-content {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
}

/* Player card styles */
.player-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.player-photo {
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-rating {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

/* Table improvements */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
    border-collapse: separate;
    border-spacing: 0;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    background: linear-gradient(135deg, #012230 0%, #00406A 100%);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
    background-color: #f8f9fa;
}

/* Chart improvements */
.js-plotly-plot, .plotly-graph-div {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card improvements */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #012230 0%, #00406A 100%);
    border-bottom: none;
    font-weight: 600;
}

/* Button improvements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
}

/* Form improvements */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Tab improvements */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-weight: 500;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    background: #e9ecef;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    border-color: transparent;
}

.tab-content {
    background: white;
    border-radius: 0 8px 8px 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .sidebar-container {
        width: 0;
    }

    .sidebar-container:not(.collapsed) {
        width: 250px;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar-container:not(.collapsed) ~ .main-content {
        padding-left: 10px;
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* Loading animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Grade-specific styling */
.grade-diamond {
    background: linear-gradient(135deg, #3CD6FF 0%, #0085A9 100%);
    color: black;
}

.grade-gold {
    background: linear-gradient(135deg, #ECFE06 0%, #FFA500 100%);
    color: black;
}

.grade-silver {
    background: linear-gradient(135deg, #A6A6A6 0%, #D5D5D5 100%);
    color: black;
}

.grade-bronze {
    background: linear-gradient(135deg, #FFC865 0%, #FF8D6D 100%);
    color: black;
}
