/* Custom styles for AI Team Balancer */
body {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #e9ecef;
}

.card {
    border: none;
    transition: box-shadow .3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Стили для аккуратного скролла в таблице */
.scrollable-table-body {
    overflow-y: auto;
    flex: 1; /* Заполняет доступное пространство */
}

.scrollable-table-body thead.sticky-top th {
    background-color: white; /* Фон для "липкого" заголовка */
}

/* Кастомизация скроллбара для Webkit-браузеров */
.scrollable-table-body::-webkit-scrollbar {
    width: 8px;
}

.scrollable-table-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scrollable-table-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.scrollable-table-body::-webkit-scrollbar-thumb:hover {
    background: #555;
} 

.table-responsive {
    overflow-y: auto;
}

.table thead.sticky-header th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa; /* Или другой цвет фона, подходящий под ваш дизайн */
    box-shadow: inset 0 -2px 0 #dee2e6; /* Тонкая линия для отделения заголовка */
}

/* Стили для таблицы оценок */
.scales-table th, .scales-table td {
    vertical-align: middle;
}

.scales-table .col-code, .scales-table .col-score, .scales-table .col-level {
    text-align: center;
    width: 10%;
}

.scales-table .col-name {
    width: 70%;
}

/* Интерактивность строк */
.scales-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.scales-table tbody tr:hover {
    background-color: #e9ecef;
}

.scales-table tbody tr.highlighted {
    background-color: #cfe2ff; /* Цвет подсветки Bootstrap */
    font-weight: bold;
} 

/* Стили для дашборда сотрудников */
.employee-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e0e0e0;
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

/* Стили для упрощенных карточек руководителей */
.candidate-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.candidate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.candidate-card .card-header {
    padding: 1rem;
}

.candidate-card .card-header .badge {
    font-size: 1rem !important;
    font-weight: 600;
}

.candidate-analysis .analysis-section {
    border-left: 3px solid #e9ecef;
    padding-left: 16px;
    margin-bottom: 20px;
}

.candidate-analysis .analysis-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #495057;
    padding-bottom: 4px;
    border-bottom: 2px solid #dee2e6;
}

.candidate-analysis .analysis-item {
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.candidate-analysis .analysis-item:hover {
    transform: translateX(4px);
}

.candidate-analysis .analysis-item .d-flex {
    align-items: center;
    min-height: 28px;
}

.candidate-analysis .analysis-item .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
}

/* Дополнительные стили для упрощенных карточек */
.candidate-card .card-header {
    padding: 0.75rem 1rem;
}

.candidate-card .card-body {
    padding: 1rem;
}

.candidate-card .card-footer {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
}

.candidate-analysis .analysis-item {
    padding: 6px 0;
    margin-bottom: 2px;
}

.candidate-analysis .analysis-item:last-child {
    margin-bottom: 0;
}

/* Стили для цветовой маркировки */
.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #fd7e14 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

.text-primary {
    color: #0d6efd !important;
}

/* Стили для прогресс-бара и бейджей */
.candidate-card .progress {
    height: 10px;
    border-radius: 6px;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.candidate-card .progress-bar {
    border-radius: 6px;
    transition: width 0.8s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.candidate-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Стили для улучшенных элементов анализа */
.candidate-analysis .analysis-item.border-start {
    border-left-width: 4px !important;
    transition: all 0.3s ease;
}

.candidate-analysis .analysis-item.border-start:hover {
    border-left-width: 6px !important;
    transform: translateX(6px);
}

.candidate-analysis .analysis-item.bg-light {
    background-color: rgba(248, 249, 250, 0.8) !important;
}

.candidate-analysis .analysis-item .fw-medium {
    font-weight: 500 !important;
}

/* Стили для цветовых индикаторов */
.candidate-analysis .text-success {
    color: #198754 !important;
    font-weight: 600;
}

.candidate-analysis .text-warning {
    color: #fd7e14 !important;
    font-weight: 600;
}

.candidate-analysis .text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

.candidate-analysis .text-primary {
    color: #0d6efd !important;
    font-weight: 600;
}

.candidate-analysis .text-info {
    color: #0dcaf0 !important;
    font-weight: 600;
}

/* Стили для топ ролей */
.candidate-analysis .analysis-item.bg-warning.bg-opacity-25 {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.1), rgba(253, 126, 20, 0.2)) !important;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 4px 0;
    border: 1px solid rgba(253, 126, 20, 0.3);
    box-shadow: 0 2px 4px rgba(253, 126, 20, 0.1);
}

/* Анимации для карточек */
.candidate-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Дополнительные анимации */
.candidate-analysis .analysis-item {
    animation: slideInLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.candidate-analysis .analysis-item:nth-child(1) { animation-delay: 0.1s; }
.candidate-analysis .analysis-item:nth-child(2) { animation-delay: 0.2s; }
.candidate-analysis .analysis-item:nth-child(3) { animation-delay: 0.3s; }
.candidate-analysis .analysis-item:nth-child(4) { animation-delay: 0.4s; }
.candidate-analysis .analysis-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.employee-card .card-title {
    color: #333;
}

.employee-card .form-check-input {
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
}

/* Плавающая кнопка балансировщика */
.balancer-fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

#balanceSelectedBtn, .balancer-fab-container .btn {
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

#balanceSelectedBtn:hover, .balancer-fab-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Стили для отформатированного ответа AI в балансировщике */
.card-body #aiSummaryContent h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    margin-top: 1.75rem !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.6rem !important;
    border-bottom: 3px solid #dee2e6 !important;
}

.card-body #aiSummaryContent h3:first-of-type {
    margin-top: 0 !important;
}

.card-body #aiSummaryContent ul {
    padding-left: 25px !important;
    list-style: none !important;
    margin-bottom: 1.25rem !important;
}

.card-body #aiSummaryContent li {
    position: relative !important;
    padding-left: 30px !important;
    margin-bottom: 0.8rem !important;
    line-height: 1.7 !important;
    font-size: 1.05rem !important;
}

.card-body #aiSummaryContent li::before {
    content: '✓' !important;
    position: absolute !important;
    left: 0 !important;
    top: 2px !important;
    color: #198754 !important;
    font-weight: bold !important;
    font-size: 1.4rem !important;
}

.card-body #aiSummaryContent strong {
    color: #0056b3 !important;
    font-weight: 600 !important;
}

.card-body #aiSummaryContent p {
    line-height: 1.7 !important;
    margin-bottom: 1rem !important;
    font-size: 1.05rem !important;
} 

.candidate-card:active {
    transform: translateY(0);
}

/* Анимация для заполненного поля */
@keyframes highlight-field {
    0% { background-color: rgba(25, 135, 84, 0.1); }
    100% { background-color: transparent; }
}

.field-updated {
    animation: highlight-field 1.5s ease-out;
}

/* Оверлей для загрузки страницы */
.page-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.page-loader-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.page-loader-overlay p {
    color: white;
    font-size: 1.1rem;
} 