/* Performance Tab Styles */

#performance-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Period Selector */
#performance-wrapper .period-btn {
    min-width: 45px;
    font-weight: 600;
}

#performance-wrapper .period-btn.active {
    background-color: #2464eb;
    border-color: #2464eb;
    color: white;
}

/* Hero Section - Total P/L Display */
#performance-wrapper .performance-hero {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#performance-wrapper .performance-hero-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 8px;
}

#performance-wrapper .performance-hero-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

#performance-wrapper .performance-hero-percent {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 4px;
}

/* Chart Container */
#performance-wrapper #performance-chart-container {
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

#performance-wrapper .chart-loading,
#performance-wrapper .chart-empty {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

/* Stat Cards */
#performance-wrapper .performance-stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#performance-wrapper .performance-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#performance-wrapper .performance-stat-card .card-body {
    padding: 1.25rem;
}

#performance-wrapper .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.25rem;
}

#performance-wrapper .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 4px;
}

#performance-wrapper .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

#performance-wrapper .stat-detail {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Background color classes for icons - scoped to performance wrapper */
#performance-wrapper .bg-primary-subtle {
    background-color: rgba(36, 100, 235, 0.1);
}

#performance-wrapper .bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.1);
}

#performance-wrapper .bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.1);
}

#performance-wrapper .bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.1);
}

#performance-wrapper .bg-info-subtle {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Table Styles */
#performance-wrapper .table {
    margin-bottom: 0;
}

#performance-wrapper .table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

#performance-wrapper .table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

#performance-wrapper .table tbody tr {
    transition: background-color 0.15s ease;
}

#performance-wrapper .table tbody tr:hover {
    background-color: rgba(36, 100, 235, 0.04);
}

/* Progress Bar for Win/Loss Distribution */
#performance-wrapper .progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

#performance-wrapper .progress-bar {
    transition: width 0.6s ease;
}

/* Badge Styles */
#performance-wrapper .badge {
    font-weight: 600;
    padding: 0.4em 0.8em;
    font-size: 0.75rem;
}

/* Text Colors */
#performance-wrapper .text-success {
    color: #22c55e !important;
}

#performance-wrapper .text-danger {
    color: #ef4444 !important;
}

#performance-wrapper .text-warning {
    color: #f59e0b !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #performance-wrapper .performance-hero-value {
        font-size: 2rem;
    }

    #performance-wrapper .performance-hero-percent {
        font-size: 1.25rem;
    }

    #performance-wrapper .stat-value {
        font-size: 1.5rem;
    }

    #performance-wrapper #performance-chart-container {
        height: 300px !important;
    }

    #performance-wrapper .period-btn {
        min-width: 35px;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Card Header */
#performance-wrapper .card-header {
    background-color: #f8f9fa;
}

#performance-wrapper .card-header h6 {
    color: #495057;
}

/* Animation for loading state */
@keyframes performance-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#performance-wrapper .loading-pulse {
    animation: performance-pulse 1.5s infinite;
}

/* Performance Confirm Modal */
#performance-confirm-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

#performance-confirm-message {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    text-align: center;
}

#performance-button-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
