/* Lineup Testing Styles */

.tool-info {
    margin-top: 10px;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
}

.tool-info small {
    color: #666;
    font-size: 11px;
    line-height: 1.3;
}

.lineup-test-modal .modal-content {
    max-width: 500px;
}

.config-section {
    margin: 20px 0;
}

.config-section .form-group {
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.progress-modal {
    text-align: center;
    max-width: 400px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s ease;
}

.lineup-results-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.lineup-results {
    display: flex;
    flex-direction: column;
    height: 80vh;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.results-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-controls button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.results-controls .secondary {
    background-color: #f8f9fa;
    color: #495057;
}

.results-controls .secondary:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.results-controls .danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.results-controls .danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.lineup-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.lineup-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    transition: background-color 0.2s ease;
}

.lineup-item:hover {
    background-color: #f0f0f0;
}

.lineup-rank {
    font-weight: bold;
    font-size: 18px;
    color: #666;
    min-width: 50px;
}

.lineup-stats {
    flex: 1;
    margin: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
}

.stat-value {
    font-size: 14px;
    color: #333;
}

.stat-diff.good {
    color: #4CAF50;
    font-weight: bold;
}

.stat-diff.ok {
    color: #FF9800;
    font-weight: bold;
}

.stat-diff.bad {
    color: #F44336;
    font-weight: bold;
}

.lineup-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lineup-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    min-width: 80px;
    transition: background-color 0.2s ease;
}

.preview-lineup, .preview-saved-lineup {
    background-color: #2196F3;
    color: white;
}

.preview-lineup:hover, .preview-saved-lineup:hover {
    background-color: #1976D2;
}

.apply-lineup, .apply-saved-lineup {
    background-color: #4CAF50;
    color: white;
}

.apply-lineup:hover, .apply-saved-lineup:hover {
    background-color: #388E3C;
}

.delete-saved-lineup {
    background-color: #F44336;
    color: white;
}

.delete-saved-lineup:hover {
    background-color: #D32F2F;
}

/* Color coding for TT scores */
.stat-value.good {
    color: #4CAF50;
    font-weight: bold;
}

.stat-value.ok {
    color: #FF9800;
    font-weight: bold;
}

.stat-value.bad {
    color: #F44336;
    font-weight: bold;
}

.preview-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #FF9800;
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.preview-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-weight: bold;
}

#revertPreview {
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
}

#revertPreview:hover {
    background-color: #555;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 600px;
    width: 90%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .lineup-results-modal .modal-content {
        width: 95vw;
        margin: 2% auto;
    }
    
    .lineup-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .lineup-rank {
        text-align: center;
    }
    
    .lineup-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .lineup-stats {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .results-controls {
        flex-direction: column;
        gap: 5px;
    }
    
    .results-controls button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lineup-actions button {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .results-controls button {
        padding: 8px 12px;
        font-size: 11px;
    }
}