/* Custom CSS for EIC Evaluation System */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    font-weight: 600;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.9em;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.1);
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.4em 0.6em;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* Evaluation Panel Styles */
.evaluation-panel {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.score-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.score-slider:hover {
    opacity: 1;
}

.score-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.score-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.score-display {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
}

.total-score {
    font-size: 1.5em;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

/* External Links */
.external-link {
    word-break: break-all;
}

.external-link a {
    text-decoration: none;
}

.external-link a:hover {
    text-decoration: underline;
}

/* Project Content */
.project-content {
    line-height: 1.6;
    font-size: 1.05em;
}

.section-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Status Indicators */
.table-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

/* Form Controls */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* Modal */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 10px 10px 0 0;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .evaluation-panel {
        position: static;
        max-height: none;
        margin-top: 2rem;
    }
    
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        font-size: 0.9em;
    }
    
    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .badge {
        font-size: 0.7em;
    }
    
    .total-score {
        font-size: 1.3em;
        padding: 10px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #842029;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #664d03;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #055160;
}

/* Modern Table Styling */
.modern-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-table-header {
    background: #0d6efd !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-table-header th {
    border: none !important;
    padding: 1rem 0.75rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: transparent !important;
    color: white !important;
}

.modern-table-header th:last-child {
    border-right: none;
}

.modern-table-header th:first-child {
    border-top-left-radius: 12px;
}

.modern-table-header th:last-child {
    border-top-right-radius: 12px;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 3px solid #e5e7eb;
    background-color: #ffffff;
    margin-bottom: 2px;
}

.modern-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.modern-table tbody tr + tr {
    border-top: 1px solid #f3f4f6;
}

.modern-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
    font-size: 0.9rem;
}

.modern-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.modern-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Enhanced DataTables Styling */
.dataTables_wrapper {
    padding: 1.5rem 0;
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dataTables_wrapper .dataTables_length select:hover {
    border-color: #cbd5e1;
}

.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    width: 250px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z'/%3e%3c/svg%3e");
    background-position: left 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dataTables_wrapper .dataTables_filter input:hover {
    border-color: #cbd5e1;
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: #9ca3af;
}

.dataTables_wrapper .dataTables_info {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

.page-link {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #374151;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #f9fafb;
    border-color: #f3f4f6;
}

/* DataTables Labels */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: block;
}

.dataTables_wrapper .dataTables_filter label {
    margin-bottom: 0;
}

/* Responsive DataTables */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .dataTables_wrapper .dataTables_length select {
        width: 100%;
    }
    
    .modern-table-header th {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .modern-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Project Detail Page Styles */
.evaluation-panel {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.project-detail-score-slider {
    width: 100%;
}

.project-detail-score-display {
    font-size: 1.2em;
    font-weight: bold;
}

.project-detail-total-score {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

.project-detail-external-link {
    word-break: break-all;
}

.project-detail-content {
    line-height: 1.6;
}

.project-detail-section-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Progress Bar Height Override */
.progress-height-20 {
    height: 20px !important;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Evaluator Comments Section */
.collapsible-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.collapsible-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.collapse-icon {
    transition: transform 0.3s ease;
}

.collapsible-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.comment-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.comment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.evaluator-info h6 {
    color: #495057;
    font-weight: 600;
}

.evaluator-info small {
    font-size: 0.8rem;
}

.score-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

.comment-content {
    background: white;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 4px solid #007bff;
    font-style: italic;
    line-height: 1.5;
}

.comment-divider {
    margin: 1.5rem 0;
    border-color: #dee2e6;
}

/* Responsive adjustments for comments */
@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .score-badge {
        margin-top: 0.5rem;
    }
    
    .comment-card {
        padding: 0.75rem;
    }
    
    .comment-content {
        padding: 0.5rem;
    }
}

/* Recommendation Badge Styles */
.recommendation-badge {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.6rem !important;
    border-radius: 6px !important;
    min-width: 45px;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
    cursor: help;
}

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

.recommendation-badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: 1px solid #1e7e34;
    color: white !important;
}

.recommendation-badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    border: 1px solid #d39e00;
    color: #212529 !important;
}

.recommendation-badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    border: 1px solid #545b62;
    color: white !important;
}

/* Recommendation Column Headers */
.modern-table-header th:nth-child(8),
.modern-table-header th:nth-child(9),
.modern-table-header th:nth-child(10),
.modern-table-header th:nth-child(11),
.modern-table-header th:nth-child(12) {
    font-size: 0.8rem !important;
    padding: 0.8rem 0.5rem !important;
    text-align: center !important;
    min-width: 90px;
}

/* Recommendation Column Cells */
.modern-table tbody td:nth-child(8),
.modern-table tbody td:nth-child(9),
.modern-table tbody td:nth-child(10),
.modern-table tbody td:nth-child(11),
.modern-table tbody td:nth-child(12) {
    text-align: center !important;
    padding: 0.8rem 0.5rem !important;
    vertical-align: middle !important;
}

/* Tooltip Styling */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    background-color: #343a40;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    max-width: 200px;
}

/* Responsive Recommendation Columns */
@media (max-width: 1200px) {
    .recommendation-badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.4rem !important;
        min-width: 35px;
    }
    
    .modern-table-header th:nth-child(8),
    .modern-table-header th:nth-child(9),
    .modern-table-header th:nth-child(10),
    .modern-table-header th:nth-child(11),
    .modern-table-header th:nth-child(12) {
        font-size: 0.7rem !important;
        padding: 0.6rem 0.3rem !important;
        min-width: 70px;
    }
}

@media (max-width: 768px) {
    .recommendation-badge {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.3rem !important;
        min-width: 30px;
    }
    
    .modern-table-header th:nth-child(8),
    .modern-table-header th:nth-child(9),
    .modern-table-header th:nth-child(10),
    .modern-table-header th:nth-child(11),
    .modern-table-header th:nth-child(12) {
        font-size: 0.65rem !important;
        padding: 0.5rem 0.2rem !important;
        min-width: 60px;
    }
}

/* Enhanced Table Scrolling */
.table-responsive {
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Fixed Columns Enhancement */
.DTFC_LeftWrapper {
    border-right: 2px solid #e2e8f0;
}

.DTFC_LeftWrapper table.dataTable {
    background-color: #f8f9fa;
}

/* Print Styles */
@media print {
    .navbar, .btn, .modal, footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .evaluation-panel {
        display: none !important;
    }
    
    .col-lg-8 {
        width: 100% !important;
    }
    
    .collapsible-header {
        cursor: default;
    }
    
    .collapse {
        display: block !important;
    }
    
    .recommendation-badge {
        background: #f8f9fa !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}
