/*
 * Timeline Canvas Styles
 */
.timeline-canvas {
	display: block;
	background: #1a1a1a;
	border-bottom: 1px solid #222;
	cursor: default;
	outline: none;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
	image-rendering: pixelated;
}

/* Timeline container for scale indicator */
.timeline-container {
	position: relative;
}

/* Time scale indicator - top edge gradient */
.timeline-container::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg,
		rgba(180, 120, 80, 0.2) 0%,
		rgba(140, 120, 100, 0.1) 50%,
		rgba(100, 140, 180, 0.15) 100%
	);
	z-index: 10;
	pointer-events: none;
}

/* Timeline Info Pane (popup for editing events) */
/* Uses unified spectra-modal design */
.timeline-info-pane {
	position: fixed;
	z-index: 10000;
	padding: 12px 15px;
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
	display: none;
}

.timeline-info-pane > select,
.timeline-info-pane > input {
	padding: 5px 8px;
	border: none;
	border-left: 2px solid #444;
	background: #252525;
	color: #ddd;
	font-size: 12px;
	outline: none;
	margin-right: 6px;
}

.timeline-info-pane > select:focus,
.timeline-info-pane > input:focus {
	border-left-color: #2561c1;
	background: #2a2a2a;
}

.timeline-info-header {
	font-size: 13px;
	font-weight: 400;
	color: #fff;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #333;
}

.timeline-info-row {
	margin: 6px 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.timeline-info-row .param-label {
	min-width: 50px;
	color: #888;
	font-size: 11px;
}

.timeline-info-row input,
.timeline-info-row select {
	padding: 4px 6px;
	border: none;
	border-left: 2px solid #444;
	background: #252525;
	color: #ddd;
	font-size: 12px;
	outline: none;
}

.timeline-info-row input:focus,
.timeline-info-row select:focus {
	border-left-color: #2561c1;
	background: #2a2a2a;
}

.timeline-info-actions {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #333;
	display: flex;
	gap: 8px;
}

.timeline-info-actions button {
	padding: 6px 14px;
	border: none;
	border-radius: 2px;
	background: #2561c1;
	color: #fff;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
}

.timeline-info-actions button:hover {
	background: #1b4891;
}

.timeline-info-actions .timeline-info-delete {
	background: #333;
	color: #aaa;
}

.timeline-info-actions .timeline-info-delete:hover {
	background: #c44;
	color: #fff;
}


/*
 * Grid Editor Styles
 */
.grid-editor-content {
	margin-top: 15px;
}

.grid-type-settings {
	margin-top: 15px;
	padding: 12px 15px;
	background: rgba(255, 255, 255, 0.03);
	border-left: 2px solid #444;
}

.grid-file-waveform {
	border: 1px solid #333;
}

.grid-freq-textarea {
	font-family: monospace;
	font-size: 12px;
	background: #1a1a1a;
	border: 1px solid #333;
	color: #ccc;
	padding: 8px;
	resize: vertical;
}

.grid-freq-textarea:focus {
	border-color: #2561c1;
	outline: none;
}


/*
 * Playback Speed Control
 */
.playback-speed-container {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.playback-speed-input {
	width: 80px !important;
	text-align: center;
	margin-bottom: 0 !important;
}

.playback-speed-preset {
	padding: 3px 8px;
	font-size: 11px;
	background: #333;
	border: none;
	color: #888;
	cursor: pointer;
	border-radius: 2px;
}

.playback-speed-preset:hover {
	background: #444;
	color: #fff;
}

.playback-speed-preset.active {
	background: #2561c1;
	color: #fff;
}


/*
 * Audio Analyzer - Use Frequencies Button
 */
.analyzer-use-frequencies {
	display: none;
	margin-left: 10px;
	background: #36a !important;
}

.analyzer-use-frequencies:hover {
	background: #48c !important;
}


/*
 * Adjust main canvas position for timeline
 */
.center {
	display: flex;
	flex-direction: column;
}

.center #canvasElement {
	flex: 1;
}


/*
 * Grid lines on main canvas
 */
.grid-line-major {
	stroke: rgba(100, 100, 100, 0.5);
	stroke-width: 1;
}

.grid-line-minor {
	stroke: rgba(60, 60, 60, 0.3);
	stroke-width: 1;
}


/*
 * Adaptive Tuning Styles
 */
.adaptive-tuning-settings {
	margin-top: 15px;
	padding: 12px 15px;
	background: rgba(255, 255, 255, 0.03);
	border-left: 2px solid #5a5;
}

.adaptive-tuning-settings .param-row {
	margin: 10px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.adaptive-tuning-settings .param-label {
	min-width: 140px;
	color: #888;
	font-size: 12px;
}

.adaptive-tuning-settings .param-hint {
	font-size: 11px;
	color: #666;
	font-style: italic;
}

.adaptive-tuning-settings input[type="number"] {
	width: 70px;
	padding: 5px 8px;
	border: none;
	border-left: 2px solid #5a5;
	background: #1a1a1a;
	color: #ddd;
	font-size: 12px;
}

.adaptive-tuning-settings input[type="number"]:focus {
	border-left-color: #8c8;
	background: #252525;
	outline: none;
}

.adaptive-tuning-settings label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	color: #aaa;
	font-size: 12px;
}