/**
 * Setup Page Styles
 * -----------------
 * Styles UNIQUE to the Setup tab (not duplicated in specpoly.css or auth.css)
 */

/* ============================================
   SETUP PAGE CONTAINER
   ============================================ */
.setup-page {
	overflow-y: auto;
}

/* Hide timbre and grid list containers by default */
.timbre-list-container,
.grid-list-container {
	display: none;
}

/* ============================================
   SETUP SECTION COMMON STYLES
   ============================================ */

.setup-info-text {
	color: #666;
	font-size: 12px;
}

.setup-description {
	margin-bottom: 12px;
	color: #777;
	font-size: 11px;
}

.btn-small {
	padding: 4px 8px;
	margin-left: 10px;
	font-size: 11px;
	background: #333;
	border: 1px solid #555;
	border-radius: 2px;
	color: #ccc;
	cursor: pointer;
	vertical-align: middle;
}

.btn-small:hover {
	background: #444;
	border-color: #666;
}

.btn-small:active {
	background: #222;
}

.btn-small i {
	margin-right: 3px;
}

.midi-panic {
	color: #f90;
	border-color: #f90;
}

.midi-panic:hover {
	background: rgba(255, 153, 0, 0.2);
}

.setup-row {
	margin: 15px 0;
}

.setup-row-flex {
	margin: 10px 0;
	display: flex;
	align-items: center;
	gap: 15px;
}

.setup-form-box {
	margin: 20px 0;
	padding: 15px;
	background: rgba(255,255,255,0.03);
	border-radius: 2px;
}

.setup-form-box-header {
	margin: 0 0 12px 0;
	color: #aaa;
}

.setup-form-box-header b {
	color: #ccc;
}

.setup-label-flex {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	min-width: 130px;
}

.midi-status {
	font-weight: bold;
	color: #6f6;
}

.activity-indicator {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #333;
	transition: background 0.1s;
}

.activity-indicator.active {
	background: #6f6;
}

.setup-code-block {
	background: rgba(0,0,0,0.3);
	padding: 10px;
	border-radius: 2px;
	font-size: 11px;
	overflow-x: auto;
	margin: 10px 0;
}

.setup-empty-list {
	color: #666;
	font-size: 12px;
	padding: 8px 0;
}

.setup-instructions {
	margin: 0;
	padding-left: 20px;
	font-size: 12px;
	color: #aaa;
}

.setup-instructions li {
	margin: 5px 0;
}

.setup-instructions a {
	color: #6cf;
}

.setup-hr {
	border-color: #444;
	margin: 25px 0;
}

.setup-hr-thin {
	border-color: #444;
	margin: 8px 0;
}

/* ============================================
   TUNING SETTINGS
   ============================================ */
.tuning-midi-preview-container {
	margin: 10px 0;
}

.microtune-controls-scroll {
	max-height: 300px;
	overflow-y: auto;
}

/* ============================================
   GRID SETTINGS
   ============================================ */
.grid-hint {
	color: #888;
	font-size: 11px;
	margin-left: 10px;
}

.grid-file-waveform {
	display: block;
	margin-top: 10px;
	background: #1a1a1a;
	border-radius: 2px;
}

.grid-file-name {
	color: #888;
	font-size: 12px;
}

.grid-freq-textarea {
	width: 100%;
	max-width: 400px;
}

/* ============================================
   I/O SETTINGS
   ============================================ */
.io-section-box {
	margin: 20px 0;
	padding: 15px;
	background: rgba(255,255,255,0.03);
	border-radius: 2px;
}

.io-section-box-alt {
	margin-top: 15px;
	padding: 15px;
	background: rgba(255,255,255,0.05);
	border-radius: 2px;
}

.midi-inputs-list {
	margin-top: 10px;
}

.midi-tracks-custom {
	display: none;
}

.midi-tracks-list {
	margin-top: 10px;
	padding: 10px;
	background: rgba(0,0,0,0.2);
	border-radius: 2px;
	max-height: 150px;
	overflow-y: auto;
}

.midi-checkbox-item {
	display: flex;
	align-items: center;
	margin: 5px 0;
	cursor: pointer;
}

.midi-checkbox-item input {
	margin-right: 8px;
}

.midi-partials-input {
	display: none;
	width: 100%;
	margin-top: 10px;
	padding: 8px;
	background: rgba(0,0,0,0.2);
	border: 1px solid #444;
	color: #fff;
	border-radius: 2px;
}

.osc-address {
	color: #666;
	font-family: monospace;
	font-size: 12px;
}

/* ============================================
   ANALYZER STYLES
   ============================================ */
.analyzerOverlayWindow {
	max-width: 560px;
}

.analyzer-file-input {
	display: none;
}

.analyzer-file-name {
	margin-left: 10px;
	color: #666;
}

.analyzer-chart-container {
	height: 300px;
	position: relative;
	overflow: hidden;
}

.analyzer-control-row {
	margin-bottom: 10px;
}

.analyzer-slider {
	width: 300px;
}

/* ============================================
   EXPORT MODAL
   ============================================ */
.export-buttons-row {
	margin-top: 20px;
	display: flex;
	gap: 10px;
}

.musicxml-options {
	display: none;
	margin-top: 15px;
	padding: 10px;
	background: rgba(255,255,255,0.05);
	border-radius: 2px;
}

.musicxml-tuning-select {
	display: none;
	margin-top: 10px;
}

.musicxml-hint {
	margin-top: 10px;
	font-size: 11px;
	color: #888;
}

/* ============================================
   COMMON INPUT WIDTHS
   ============================================ */
.input-xs { width: 80px; }
.input-sm { width: 100px; }
.input-md { width: 150px; }
.input-lg { width: 200px; }
.input-xl { width: 250px; }
.input-min-lg { min-width: 200px; }
.input-min-xl { min-width: 250px; }

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 15px; }
.ml-1 { margin-left: 10px; }
.ml-2 { margin-left: 15px; }

/* ============================================
   DISPLAY UTILITIES
   ============================================ */
.visually-hidden {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

.d-block {
	display: block !important;
}

.flex-1 {
	flex: 1;
}

/* ============================================
   MISCELLANEOUS
   ============================================ */
.startOverlayCenter {
	text-align: center;
}

.startOverlayCenter p {
	color: #888;
	font-size: 14px;
}

.timeline-info-pane {
	display: none;
}

.help-description {
	font-size: 11px;
	color: #aaa;
}

/* Volume icon states */
.volume-icon-muted {
	display: none;
}

.volume-mute-btn.muted .volume-icon {
	display: none;
}

.volume-mute-btn.muted .volume-icon-muted {
	display: inline;
}

/* Playback speed */
.playback-speed-container {
	display: flex;
	align-items: center;
	gap: 5px;
}

.playback-speed-input {
	max-width: 53px;
	margin-bottom: 0 !important;
}

.playback-speed-preset {
	padding: 4px 8px;
	font-size: 11px;
}

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

/* Session join status */
.session-join-status {
	color: #888;
	font-size: 14px;
	text-align: center;
	margin-top: 20px;
}

/* ============================================
   OSC MODAL STYLES
   ============================================ */
.osc-delete-modal,
.osc-add-device-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10002;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
}

.osc-modal-content {
	background: #1a1a1a;
	border: 1px solid #333;
	border-radius: 2px;
	padding: 25px;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.osc-modal-content.narrow {
	max-width: 350px;
	text-align: center;
}

.osc-modal-content h3 {
	margin: 0 0 15px 0;
	padding: 0 0 10px 0;
	font-size: 18px;
	font-weight: 400;
	color: #fff;
	border-bottom: 1px solid #333;
}

.osc-modal-content p {
	color: #888;
	font-size: 13px;
	margin-bottom: 15px;
}

.osc-modal-config {
	margin-bottom: 15px;
	padding: 15px;
	background: #252525;
	border-radius: 2px;
}

.osc-modal-config label {
	display: block;
	margin-bottom: 6px;
	color: #aaa;
	font-size: 12px;
}

.osc-modal-config input {
	padding: 8px;
	background: #1a1a1a;
	border: 1px solid #444;
	border-radius: 2px;
	color: #fff;
	font-size: 13px;
}

.osc-modal-config input:focus {
	outline: none;
	border-color: #2561c1;
}

.osc-modal-pairing-code {
	font-family: monospace;
	font-size: 28px;
	color: #4a9eff;
	letter-spacing: 6px;
}

.osc-modal-code-timer {
	margin: 8px 0 0 0;
	color: #666;
	font-size: 11px;
}

.osc-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 15px;
}

.osc-modal-actions button {
	padding: 10px 20px;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 13px;
	transition: all 0.15s;
}

.osc-modal-cancel {
	background: #333;
	color: #aaa;
}

.osc-modal-cancel:hover {
	background: #444;
	color: #fff;
}

.osc-modal-add,
.osc-modal-generate-code {
	background: #2561c1;
	color: #fff;
}

.osc-modal-add:hover,
.osc-modal-generate-code:hover {
	background: #1b4891;
}

.osc-modal-confirm-delete {
	background: #c44;
	color: #fff;
}

.osc-modal-confirm-delete:hover {
	background: #a33;
}

/* ============================================
   OSC DEVICE STYLES
   ============================================ */
.osc-section {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #333;
}

.osc-section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.osc-section-title h4 {
	margin: 0;
	font-size: 13px;
	color: #888;
	font-weight: normal;
}

.osc-pair-btn {
	padding: 4px 10px;
	background: #4a9eff;
	border: none;
	border-radius: 2px;
	color: white;
	font-size: 11px;
	cursor: pointer;
}

.osc-pair-btn:hover {
	background: #3a8eef;
}

.osc-device-list {
	max-height: 150px;
	overflow-y: auto;
}

.osc-no-devices {
	color: #666;
	font-size: 12px;
	font-style: italic;
	padding: 10px 0;
}

.osc-device-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid #2a2a2a;
}

.osc-device-item:last-child {
	border-bottom: none;
}

.osc-device-checkbox {
	width: 14px;
	height: 14px;
	cursor: pointer;
}

.osc-device-name {
	flex: 1;
	font-size: 12px;
	color: #ccc;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.osc-device-rename,
.osc-device-remove {
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	padding: 2px 6px;
	font-size: 14px;
}

.osc-device-rename:hover {
	color: #4a9eff;
}

.osc-device-remove:hover {
	color: #e74c3c;
}

/* OSC Pairing Modal */
.osc-pairing-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.8);
}

.osc-pairing-modal.hidden {
	display: none;
}

.osc-pairing-content {
	background: #1a1a1a;
	border-radius: 2px;
	padding: 30px;
	text-align: center;
	max-width: 400px;
}

.osc-pairing-content h3 {
	margin: 0 0 10px 0;
	color: #fff;
}

.osc-pairing-content p {
	color: #888;
	font-size: 13px;
	margin: 0 0 20px 0;
}

.osc-pairing-key {
	font-family: monospace;
	font-size: 36px;
	font-weight: bold;
	color: #4a9eff;
	letter-spacing: 8px;
	padding: 20px;
	background: #252525;
	border-radius: 2px;
	margin-bottom: 15px;
}

.osc-pairing-info {
	font-size: 12px;
	color: #666;
	margin-bottom: 20px;
}

.osc-pairing-info code {
	background: #252525;
	padding: 2px 6px;
	border-radius: 2px;
	color: #4a9eff;
}

.osc-pairing-cancel {
	padding: 8px 20px;
	background: #333;
	border: none;
	border-radius: 2px;
	color: #aaa;
	cursor: pointer;
}

.osc-pairing-cancel:hover {
	background: #444;
	color: #fff;
}
