/* Custom styles for 3DMark GPU Comparison Tool */

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

/* Card styling */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s ease-in-out;
}

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

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

/* GPU search dropdown */
#gpu-suggestions {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 9999;
    position: absolute;
    background-color: white;
}

.dropdown-item {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
    margin: 0;
    border: none;
    outline: none;
    position: relative;
    z-index: 10000;
}

.dropdown-item:hover {
    background-color: #e9ecef;
    transform: none;
    margin: 0;
    padding: 0.75rem 1rem;
    z-index: 10000;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* GPU list items */
.gpu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.gpu-item:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.gpu-item.loading {
    opacity: 0.7;
}

.gpu-name {
    font-weight: 600;
    color: #495057;
    flex-grow: 1;
}

.gpu-label {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.gpu-score {
    font-weight: 700;
    color: #28a745;
    margin-right: 0.5rem;
}

.gpu-score.loading {
    color: #6c757d;
}

.remove-gpu-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out;
}

.remove-gpu-btn:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart container */
#chart-container {
    position: relative;
}

#no-data-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Badge styles for labels */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.label-badge {
    background-color: #6f42c1;
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

/* Quick Add GPU buttons */
.quick-add-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quick-add-btn:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 123, 255, 0.3);
    color: white;
}

.quick-add-btn:active {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.2);
}

.quick-add-btn .gpu-label-text {
    font-size: 0.8rem;
    opacity: 0.9;
    display: block;
    margin-top: 0.25rem;
}

/* Editable labels */
.editable-label {
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.editable-label:hover {
    background-color: rgba(108, 117, 125, 0.1);
}

.edit-label-input {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    width: 120px;
}

.edit-icon {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.editable-label:hover .edit-icon {
    opacity: 1;
}

/* Status indicators */
.status-indicator {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
}

.status-success {
    background-color: #d1edff;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Table styling */
.table th {
    border-top: none;
    font-weight: 600;
    color: #FFFFFF;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .gpu-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gpu-score {
        margin-right: 0;
        margin-top: 0.5rem;
    }
    
    .remove-gpu-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Animation for adding GPUs */
.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Toast styling */
.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Button hover effects */
.btn {
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Focus styles for accessibility */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom scrollbar for suggestions */
#gpu-suggestions::-webkit-scrollbar {
    width: 6px;
}

#gpu-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#gpu-suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#gpu-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
