/**
 * Taxonomizer Styles
 */

/* Hero Section */
.taxonomizer-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin-bottom: 30px;
}

.taxonomizer-hero h1 {
    font-size: 48px;
    margin: 0 0 10px 0;
    font-weight: bold;
    letter-spacing: 2px;
}

.taxonomizer-hero .tagline {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

/* Mode Selection */
.mode-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.mode-selection label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.3s;
}

.mode-selection label:hover {
    background: #e0e0e0;
}

.mode-selection input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Input Section */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.input-section h2 {
    margin-top: 0;
}

.input-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.input-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Flow Section */
.flow-section, .results-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.flow-canvas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 200px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 20px 0;
    padding: 30px 20px;
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.flow-arrow-icon {
    font-size: 28px;
    color: #667eea;
    font-weight: bold;
}

.flow-arrow-label {
    font-size: 11px;
    color: #667eea;
    font-weight: 600;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #667eea;
    white-space: nowrap;
}

.flow-card {
    width: 140px;
    min-height: 160px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flow-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-color: #764ba2;
}

.flow-card .card-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.flow-card .card-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-card .card-uid {
    font-size: 14px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 4px;
}

.flow-card .card-name {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.flow-card .card-l2 {
    font-size: 11px;
    color: #667eea;
    background: #f0f0ff;
    padding: 4px 6px;
    border-radius: 4px;
    margin: 6px 0 4px 0;
    font-weight: 500;
}

.flow-card .card-l3 {
    font-size: 10px;
    color: #666;
    background: #f9f9f9;
    padding: 4px 6px;
    border-radius: 4px;
    margin-top: 4px;
    line-height: 1.4;
    text-align: left;
}

/* Results Section */
.results-content {
    line-height: 1.8;
}

.results-content ul {
    list-style: none;
    padding: 0;
}

.results-content li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Batch Mode */
.batch-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.batch-section h2 {
    margin-top: 0;
}

.batch-section p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Batch Progress */
.batch-progress {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

#progress-text {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.current-scenario {
    text-align: center;
    font-style: italic;
    color: #666;
    min-height: 30px;
    margin: 20px 0;
}

.interim-summary {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.interim-summary h4 {
    margin-top: 0;
}

.interim-summary p {
    margin: 10px 0;
    font-size: 16px;
}

/* Batch Complete */
.batch-complete {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.batch-complete h3 {
    color: #22c55e;
    font-size: 32px;
    margin-top: 0;
}

.csv-filename {
    font-family: monospace;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Coverage Chart */
.coverage-chart {
    margin: 40px 0;
    text-align: left;
}

.coverage-chart h4 {
    margin-bottom: 20px;
}

.coverage-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bar-label {
    width: 150px;
    font-size: 14px;
    font-weight: 500;
}

.bar-track {
    flex: 1;
    background: #f0f0f0;
    border-radius: 4px;
    height: 24px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 4px;
}

.bar-value {
    font-size: 14px;
    font-weight: bold;
    color: #667eea;
}

/* Gaps Section */
.gaps-section {
    margin-top: 40px;
    text-align: left;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.gaps-section h4 {
    margin-top: 0;
}

.gaps-section ul {
    list-style: disc;
    padding-left: 30px;
}

.gaps-section li {
    margin: 10px 0;
}

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

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 15px 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .taxonomizer-hero h1 {
        font-size: 32px;
    }

    .mode-selection {
        flex-direction: column;
    }

    .button-group {
        flex-direction: column;
    }

    .flow-canvas {
        min-height: 300px;
    }

    .coverage-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .bar-label {
        width: 100%;
    }
}
