/* Settings menu on the left */
.settings-container {
	display: flex;
	gap: 20px;
	min-height: 200px;
}

/* Left column: menu */
.settings-menu {
	width: 120px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Tabs on the left */
.settings-tab {
	width: 100%;
	padding: 8px 12px;
	background: #333;
	color: white;
	border: none;
	cursor: pointer;
	text-align: left;
	border-radius: 5px;
	transition: background 0.2s ease;
	box-sizing: border-box;
}

.settings-separator {
	border: none;
	height: 1px;
	background: rgba(255, 255, 255, 0.1); /* subtle white */
	margin: 16px 0;
}

.settings-tab:hover {
	background: #555;
}

.settings-tab.active {
	background: #666;
	font-weight: bold;
}

/* Right side content */
.settings-content {
	flex-grow: 1;
}

.settings-section {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.settings-section.active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.settings-section h3 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 1.2em;
}


.settings-sections-wrapper {
	position: relative;
	transition: height 0.3s ease;
	overflow: hidden;
}

/* Each section is absolutely positioned, only one is visible */
.settings-section {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.settings-section.active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.settings-description {
    font-size: 0.95em;
    color: #ccc;
    margin: 4px 0 0 0;
    padding: 0;
}




/* checkbox */
.fancy-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 1rem;
	user-select: none;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

/* Ensures the text spans nicely and wraps */
.fancy-checkbox span {
	flex: 1;
	display: inline-block;
}

.fancy-checkbox input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid white;
	border-radius: 50%;
	background-color: transparent;
	transition: all 0.2s ease;
	cursor: pointer;
	position: relative;
}

.fancy-checkbox input[type="checkbox"]::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 24px;
	/* bigger than the checkbox */
	height: 24px;
	background-color: orange;
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.2s ease;
	z-index: 1;
}

.fancy-checkbox input[type="checkbox"]:checked::before {
	transform: translate(-50%, -50%) scale(1);
}


/* numbers */

.fancy-number {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 1rem;
	user-select: none;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.fancy-number label {
	margin-bottom: 0;
	font-weight: normal;
	color: white;
	flex: unset;         /* Don't stretch the label */
}

.fancy-number input[type="number"] {
	background-color: #1d1d1d;
	border: 1px solid #555;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 1rem;
	color: #fff;
	width: 80px;         /*  Set a clean fixed width */
	height: 32px;
	transition: border-color 0.2s ease;
}



/* Chrome, Safari, Edge */
.fancy-number input::-webkit-outer-spin-button,
.fancy-number input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox */
.fancy-number input[type="number"] {
	-moz-appearance: textfield;
	appearance: textfield;
}

/* Dropdown */

.fancy-select {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 1rem;
	user-select: none;
	flex-wrap: wrap;
}

.fancy-select label {
	margin-bottom: 0;
	color: white;
	font-weight: normal;
}

.fancy-select select {
	background-color: #1d1d1d;
	color: #fff;
	border: 1px solid #555;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 1rem;
	height: 34px;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.fancy-select select:focus {
	outline: none;
	border-color: #fcb800;
	box-shadow: 0 0 0 2px rgba(252, 184, 0, 0.15);
}


/* Fancy range */
.fancy-range {
    width: 100%;
    padding: 8px 0;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

/* Ticks directly on the bar */
.range-ticks {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.range-ticks .tick {
    width: 2px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
}

/* Make the range bar as thick as the thumb */
input[type="range"] {
    width: 100%;
    height: 12px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 1;
}

/* Thumb styling */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffc107;
    border: 2px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: 0px; /* center the thumb */
    position: relative;
    z-index: 2;
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffc107;
    border: 2px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

input[type="range"]::-webkit-slider-thumb:hover,
input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: #ffcd38;
}
