/* Cue Editor Styles */
.cue-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cue-item {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cue-item.overlapping {
    border-color: #f0ad4e;
    background-color: #fcf8e3;
}

.cue-item.dragging {
    opacity: 0.2;
    border: 2px dashed #3498db;
    transform: scale(0.98);
}

.cue-item.selected {
    border-color: #f1c40f;
    background-color: #fffde7 !important;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.3);
}

.cue-item.selected .cue-header {
    background-color: #fff9c4 !important;
}

.cue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px 6px 10px;
    white-space: nowrap;
    overflow: hidden;
    background-color: #f0f0f0;
    cursor: default;
    border-bottom: 1px solid #ddd;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

.cue-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    /* Crucial for nested flex truncation */
    overflow: hidden;
}

.cue-preview {
    display: inline-block;
    font-weight: 600;
    font-size: 0.8em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 3rem;
    max-width: 100%;
    /* Force it to respect parent width */
    flex: 1;
    margin-right: 8px;
}

.cue-time-display {
    font-size: 0.9em;
    color: #666;
    flex-shrink: 0;
    font-family: monospace;
    min-width: 10rem;
    text-align: right;
}

.cue-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.cue-controls {
    display: flex;
    gap: 5px;
}

.cue-controls button {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    color: black;
    padding: 0;
}

.cue-controls button:hover {
    background-color: #eee;
}

.delete-button {
    color: #d9534f;
}

.cue-form {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background-color: white;
    cursor: default;
}

.cue-item.open .cue-form {
    display: flex;
}

.cue-times {
    display: flex;
    gap: 8px;
}

.cue-times .input-group {
    flex: 1;
}

.overlap-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    padding: 3px 5px;
    margin-left: 5px;
    border-radius: 3px;
    font-size: 0.8em;
    display: inline-block;
    visibility: hidden;
    min-width: 4.5rem;
    text-align: center;
}

.overlap-warning.visible {
    visibility: visible;
}

.validation-errors {
    background-color: #f2dede;
    color: #a94442;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.validation-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-errors li {
    cursor: pointer;
    margin-bottom: 5px;
}

.validation-errors li:hover {
    text-decoration: underline;
}

/* Settings Summary */
.settings-summary {
    margin-top: 5px;
    font-size: 0.85em;
    padding: 2px 4px;
    background-color: #f9f9f9;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Highlight effect for cue list sync */
.cue-item.highlight {
    background-color: #e3f2fd;
    border-color: #2196f3;
    transition: background-color 0.3s ease;
}

.cue-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.subtitle-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Transcription UI Styles */
.transcription-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.option-group {
    margin-bottom: 15px;
}

#transcription-result {
    font-family: monospace;
    white-space: pre-wrap;
}

.results-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}