/* Distance visualization and control styles */

/* Distance control panel */
.distance-controls {
    margin: 15px 0;
    padding: 20px;
    border-top: 2px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.distance-controls h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-primary, #2c3e50);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Control buttons and selects */
.control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.control-group button {
    padding: 8px 15px;
    background-color: var(--primary-color, #667eea);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-group button:hover {
    background-color: var(--primary-dark, #5a6fc8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Sort mode selector */
#sort-mode {
    width: 100%;
    margin-bottom: 10px;
}

/* Filter group styling */
.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary, #2c3e50);
}

.filter-group select {
    flex: 1;
    min-width: 150px;
}

/* Distance filter */
#distance-filter {
    flex: 1;
    min-width: 150px;
}

/* Pathogenicity filter */
#pathogenicity-filter {
    flex: 1;
    min-width: 150px;
}

/* Distance information in variant list */
.variant-info {
    flex: 1;
}

.distance-info {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Distance category colors */
.distance-close {
    color: #d32f2f;  /* Red for close contact (<5Å) */
}

.distance-medium {
    color: #ff9800;  /* Orange for medium distance (5-10Å) */
}

.distance-far {
    color: #4caf50;  /* Green for far distance (>10Å) */
}

/* Distance labels in variant list */
#variant-list li {
    position: relative;
    padding-right: 10px;
}

#variant-list li .distance-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    background-color: #f0f0f0;
}

#variant-list li .distance-badge.close {
    background-color: #ffebee;
    color: #d32f2f;
}

#variant-list li .distance-badge.medium {
    background-color: #fff3e0;
    color: #ff9800;
}

#variant-list li .distance-badge.far {
    background-color: #e8f5e9;
    color: #4caf50;
}

/* Toggle DNA button special state */
#toggle-dna-btn {
    background-color: var(--secondary-color, #764ba2);
}

#toggle-dna-btn:hover {
    background-color: #633a8e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

/* Show all distances button */
#show-distances-btn {
    background-color: var(--info-color, #3498db);
}

#show-distances-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .control-group {
        flex-direction: column;
    }
    
    .control-group button,
    .control-group select {
        width: 100%;
    }
}