/* ===== ECG strip section ===== */
.ecg-section {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.ecg-section h2 {
    text-align: center;
    color: #7eb8ff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Tab navigation */
.ecg-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.ecg-tab {
    background: #1a2238;
    border: 1px solid #2a3a5a;
    color: #8899bb;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.ecg-tab:hover, .ecg-tab.active {
    background: #2a3a6a;
    color: #7eb8ff;
    border-color: #4a6a9a;
}

/* ECG wave groups */
.ecg-wave-group {
    cursor: pointer;
    transition: opacity 0.2s;
}

.ecg-wave-group:hover {
    opacity: 0.8;
}

.ecg-wave-group.active {
    filter: drop-shadow(0 0 4px #7ee8a0);
}

/* Wave labels */
.wave-label {
    cursor: pointer;
    transition: all 0.2s;
}

.wave-label:hover {
    transform: scale(1.1);
}

/* ECG Legend (inside ECG view) */
.ecg-legend {
    background: #0a0e1a;
    border-top: 1px solid #2a3a5a;
    padding: 16px 24px;
    flex-shrink: 0;
}

.ecg-legend-title {
    color: #7eb8ff;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.ecg-legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 20px;
}

.ecg-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c0ccdd;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}

.ecg-legend-item:hover {
    color: #7eb8ff;
}

.ecg-legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .ecg-legend-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .ecg-legend-grid {
        grid-template-columns: 1fr;
    }
}