﻿/* ===== Comparison Tool Specific Styles ===== */

/* ===== Navigation Links ===== */
.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== File List ===== */
.file-list {
    margin-top: 0.75rem;
}

.file-list.hidden {
    display: none;
}

.file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.file-card:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.file-card-info {
    flex: 1;
    min-width: 0;
}

.file-card-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-size {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.file-card-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.file-card-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.file-card-remove:hover {
    color: #ef4444;
}

/* ===== Sample Legend ===== */
.sample-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-samples {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.legend-item:hover {
    border-color: var(--primary-color);
}

.legend-color {
    width: 20px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.legend-color:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-name {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.legend-name:hover {
    background: rgba(0, 102, 204, 0.1);
}

.legend-name-input {
    width: 100%;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius);
    outline: none;
    font-weight: 500;
}

.section-note {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-style: italic;
}

/* ===== Data Info ===== */
.data-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-item {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.info-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Error Message ===== */
.error-message {
    padding: 0.75rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: var(--radius);
    color: #c00;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.error-message.hidden {
    display: none;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .graph-container {
        padding: 0.5rem !important;
        overflow: hidden !important;
        max-width: 100vw !important;
        min-height: 300px !important;
        height: auto !important;
    }

    .graph-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.5rem !important;
        overflow: hidden !important;
        height: auto !important;
        aspect-ratio: auto !important;
        min-height: 300px !important;
    }

    .graph-wrapper canvas {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 300px !important;
    }

    .control-panel,
    .info-panel {
        padding: 0.5rem !important;
    }

    .panel-section {
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
    }

    .file-card {
        padding: 0.4rem 0.6rem !important;
    }

    .legend-item {
        padding: 0.35rem 0.45rem !important;
    }
}

@media (max-width: 992px) {
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-link {
        text-align: center;
    }

    /* Ensure graph is responsive in mobile layout */
    .graph-container {
        min-height: 350px !important;
        max-height: none !important;
        overflow: hidden !important;
        padding: 0.5rem !important;
    }

    .graph-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        height: auto !important;
        min-height: 350px !important;
    }
}