/* Lyrix chunk cards + waveform change markers */

.lyrix-lyrics-editor--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lyrix-chunks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 14px 0 18px;
}

.lyrix-chunks-empty {
    padding: 18px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(139, 92, 246, 0.35);
    color: #94a3b8;
    font-size: 0.92rem;
    text-align: center;
}

.lyrix-chunk-card {
    border-radius: 14px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    background: rgba(15, 23, 42, 0.82);
    padding: 14px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lyrix-chunk-card.is-dirty {
    border-color: rgba(52, 211, 153, 0.55);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15);
}

.lyrix-chunk-card.is-generated {
    border-color: rgba(96, 165, 250, 0.45);
}

.lyrix-chunk-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.lyrix-chunk-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #c4b5fd;
}

.lyrix-chunk-status {
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.lyrix-chunk-card.is-dirty .lyrix-chunk-status {
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
}

.lyrix-chunk-card.is-generated .lyrix-chunk-status {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

.lyrix-chunk-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.lyrix-chunk-line {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px;
    align-items: center;
}

.lyrix-chunk-line-time {
    font-size: 0.78rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.lyrix-chunk-line-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(2, 6, 23, 0.55);
    color: #e2e8f0;
    font: inherit;
    font-size: 0.92rem;
}

.lyrix-chunk-line-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.18);
}

.lyrix-chunk-line-input:disabled {
    opacity: 0.55;
}

.lyrix-chunk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lyrix-chunk-style {
    flex: 1 1 140px;
    min-width: 120px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(2, 6, 23, 0.55);
    color: #e2e8f0;
    font: inherit;
    font-size: 0.85rem;
}

.lyrix-chunk-actions .btn {
    white-space: nowrap;
}

.lyrix-actions--generate-all {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.lyrix-waveform-wrap {
    position: relative;
}

.lyrix-waveform-markers {
    position: relative;
    width: 100%;
    height: 18px;
    margin-bottom: 4px;
}

.lyrix-waveform-marker {
    position: absolute;
    top: 0;
    height: 18px;
    min-width: 4px;
    border: none;
    border-radius: 4px;
    background: rgba(52, 211, 153, 0.35);
    cursor: pointer;
    padding: 0;
}

.lyrix-waveform-marker.is-generated {
    background: rgba(96, 165, 250, 0.4);
}

.lyrix-waveform-marker:hover {
    filter: brightness(1.15);
}

.lyrix-waveform-marker:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 1px;
}

@media (max-width: 640px) {
    .lyrix-chunk-line {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .lyrix-chunk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lyrix-chunk-style {
        width: 100%;
    }
}
