/* OptimizedTeamTab.razor Styles */

.activity-tab-icon {
    color: white !important;
    background: linear-gradient(to bottom, #97a6fc 10%, #2545ff 100%);
    padding: 15px;
    font-size: 20px;
    border-radius: 10px;
}

.dash-card {
    box-shadow: none !important;
    border: 1px solid #e4e4e4;
    line-height: 1.1;
}

.dash-icon {
    padding-right: 7px;
    font-size: 12px;
    color: #a4a4a4;
    width: fit-content;
}

.dash-card-title {
    font-size: 14px;
    display: flex;
    color: #a4a4a4;
    padding-left: 0 !important;
    width: fit-content;
    font-weight: 500;
}

.dash-card-value {
    font-size: 32px;
    font-weight: 600;
    padding-left: 0 !important;
    letter-spacing: -2px;
    color: black !important;
}

.dash-icon-col {
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    display: flex;
}

.dash-main-icon {
    padding: 15px;
    font-size: 20px;
    border-radius: 50%;
}

/* Team Tab Selector Styles */
.team-period-selector {
    padding: 15px;
    background-color: #0c1754;
    border: 1px solid #d2d2d2;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.team-selector-blob {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    opacity: 1;
}

    .team-selector-blob:nth-child(1) {
        width: 80px;
        height: 60px;
        top: -15px;
        right: 15px;
    }

    .team-selector-blob:nth-child(2) {
        width: 60px;
        height: 40px;
        bottom: -10px;
        left: 20px;
    }

    .team-selector-blob:nth-child(3) {
        width: 40px;
        height: 40px;
        top: 40%;
        right: -5px;
    }

    .team-selector-blob:nth-child(4) {
        width: 70px;
        height: 35px;
        top: -20px;
        left: 30%;
    }

    .team-selector-blob:nth-child(5) {
        width: 50px;
        height: 30px;
        bottom: 20%;
        right: 25%;
    }

.team-period-selector .nav-pills {
    background: none;
    border: none;
}

    .team-period-selector .nav-pills .nav-link {
        border-radius: 10px;
        margin: 0 0.25rem;
        padding: 0.75rem 1.5rem;
        font-weight: 600;
        color: #c1c1c1;
        transition: all 0.3s ease;
        border: none;
        background: none;
    }

        .team-period-selector .nav-pills .nav-link:hover {
            background: #c1c1c1;
            color: white;
        }

        .team-period-selector .nav-pills .nav-link.active {
            background: white;
            color: black;
            box-shadow: 0 5px 15px rgba(37, 69, 255, 0.3);
        }

.team-period-selector .refresh-btn {
    background: #677eff;
    border: none;
    color: white;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .team-period-selector .refresh-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
    }

.bg-success {
    background-color: #49d669 !important;
}

.bg-warning {
    background-color: #fecf3d !important;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-header {
    margin-bottom: 20px;
}

.team-overview-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 100%;
}

    .team-overview-card:hover {
        transform: translateY(-2px);
    }

.overview-icon {
    margin-bottom: 15px;
}

.overview-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.overview-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.leaderboard-card, .collaboration-card, .workload-card, .patterns-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 100%;
}

    .leaderboard-card:hover, .collaboration-card:hover, .workload-card:hover, .patterns-card:hover {
        transform: translateY(-2px);
    }

/* Workload Distribution Card Blobs */
.workload-blob {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
    opacity: 1;
}

    .workload-blob:nth-child(1) {
        width: 80px;
        height: 60px;
        top: -15px;
        right: 15px;
    }

    .workload-blob:nth-child(2) {
        width: 60px;
        height: 60px;
        bottom: 10px;
        left: 20px;
    }

    .workload-blob:nth-child(3) {
        width: 40px;
        height: 40px;
        top: 40%;
        right: -5px;
    }

    .workload-blob:nth-child(4) {
        width: 70px;
        height: 35px;
        top: -20px;
        left: 30%;
    }

    .workload-blob:nth-child(5) {
        width: 50px;
        height: 50px;
        bottom: 20%;
        right: 0%;
    }

.leaderboard-list, .collaboration-list {
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-item, .collaboration-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

    .leaderboard-item:last-child, .collaboration-item:last-child {
        border-bottom: none;
    }

.rank-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.developer-info {
    flex: 1;
}

.developer-name {
    font-weight: 600;
    color: black;
    margin-bottom: 2px;
}

.developer-name-workload {
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.score {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.repo-info {
    flex: 1;
    background: #f8f9fa;
    padding: 10px 30px 10px;
    border-radius: 15px;
    border-left: 4px solid #2545ff;
    line-height: 1;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    border-top: 1px solid #eee;
}

.repo-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.collaboration-score {
    text-align: center;
}

.score-value {
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

.workload-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

    .stat-row:last-child {
        margin-bottom: 0;
    }

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
    color: #2c3e50;
}

.workload-chart {
    margin-top: 15px;
}

.workload-bar {
    margin-bottom: 15px;
}

    .workload-bar:last-child {
        margin-bottom: 0;
    }

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress {
    flex: 1;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.workload-percentage {
    min-width: 40px;
    text-align: right;
    font-weight: 500;
    color: white;
}

.peak-hours, .peak-days {
    margin-bottom: 10px;
    margin-top: 15px;
}

.peak-hours-col {
    line-height: 0.4;
    background: #f8f9fa;
    padding: 10px 30px 10px;
    border-radius: 15px;
    border-left: 4px solid #2545ff;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    border-top: 1px solid #eee;
}

.badge {
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .overview-value {
        font-size: 1.5rem;
    }

    .leaderboard-item, .collaboration-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .rank-badge {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .progress-container {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .workload-percentage {
        text-align: left;
    }
}

/* Developer badges styles */
.developer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.developer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: help;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .developer-badge:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 10;
        position: relative;
    }

    .developer-badge.more-badge {
        background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
        color: #8b4513;
        font-size: 9px;
        border-color: rgba(139, 69, 19, 0.2);
    }

        .developer-badge.more-badge:hover {
            background: linear-gradient(135deg, #fcb69f 0%, #ffecd2 100%);
        }

/* Team Weekly Progress Charts Styles */
.team-chart-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 100%;
}

    .team-chart-card:hover {
        transform: translateY(-2px);
    }

.chart-section {
    margin-bottom: 20px;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 15px;
}

.chart-title {
    text-align: center;
    margin-bottom: 65px;
    color: #495057;
    font-weight: 600;
}

.team-sync-card {
    background: #0c1754;
    padding: 15px;
    border-radius: 15px;
    align-items: center;
    display: flex;
    justify-content: center;
}

.stacked-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 250px;
    padding: 20px 10px 10px 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.chart-week-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0 2px;
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 220px;
    justify-content: flex-end;
}

.stacked-bar {
    width: 100%;
    max-width: 30px;
    min-height: 20px;
    display: flex;
    flex-direction: column-reverse;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
}

    .stacked-bar:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

.bar-segment {
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    position: relative;
}

    .bar-segment:first-child {
        border-radius: 4px 4px 0 0;
        border-bottom: none;
    }

    .bar-segment:last-child {
        border-radius: 0 0 4px 4px;
        border-bottom: none;
    }

    .bar-segment:only-child {
        border-radius: 4px;
        border-bottom: none;
    }

    .bar-segment:hover {
        filter: brightness(1.1);
        border-bottom-color: rgba(255,255,255,0.5);
    }

.chart-total-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-top: 5px;
    text-align: center;
}

.chart-week-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 8px;
    text-align: center;
    writing-mode: horizontal-tb;
    transform: rotate(0deg);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

    .legend-item:hover {
        background: rgba(255,255,255,0.8);
    }

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.legend-label {
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
    .stacked-chart-container {
        height: 200px;
        padding: 15px 5px 30px 5px;
    }

    .chart-bar-container {
        height: 170px;
    }

    .stacked-bar {
        max-width: 20px;
    }

    .chart-week-label {
        font-size: 0.65rem;
        margin-top: 5px;
    }

    .chart-legend {
        gap: 10px;
        padding: 10px;
    }

    .legend-label {
        font-size: 0.75rem;
    }
}

/* Data Source Controls */
.btn-group .btn {
    transition: all 0.2s ease;
}

    .btn-group .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

/* Performance Banner */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

/* Badge animations */
.badge {
    transition: all 0.2s ease;
}

    .badge:hover {
        transform: scale(1.05);
    }

/* Loading state improvements */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}
