/* Minimal Color Picker Specific Styles 
   All existing reusable styles:
   - .overlay - from help.js for overlay structure 
   - .overlay-content - from help.js for modal container
   - .close-button - from help.js for close button
   - .section - from styles.css for content grouping
   - .inline-controls - from styles.css for horizontal layout
   - .slider-with-value - from styles.css for slider + input + label
   - button - from styles.css for action buttons
*/

/* Color Preview - No suitable existing component for this specific style */
.color-preview {
	width: 60px;
	height: 60px;
	border-radius: 5px;
	border: 1px solid #444;
	box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.color-hex {
	font-family: monospace;
	font-size: 14px;
	color: #ccc;
	margin-left: 10px;
}

/* Custom Sliders - Need specific background gradients */
.hue-slider {
	background: linear-gradient(to right, 
		#ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.sat-slider {
	/* Dynamic background set by JavaScript */
}

.val-slider {
	/* Dynamic background set by JavaScript */
}

/* Color Area - No existing component for this 2D picker */
.color-area-container {
	position: relative;
	margin: 20px auto;
	width: 256px;
	height: 256px;
}

#colorArea {
	border: 1px solid #444;
	border-radius: 5px;
	cursor: crosshair;
}

#colorCursor {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid white;
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Color Button Customization - No existing element for color swatches */
.custom-color-button {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	border: 1px solid #444;
	cursor: pointer;
	transition: all 0.2s ease;
}

.custom-color-button:hover {
	transform: scale(1.05);
	box-shadow: 0 0 5px rgba(75, 163, 255, 0.5);
}

.hidden-color-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	padding: 0;
	margin: 0;
	pointer-events: none;
}

/* Color picker container specific sizing */
.color-picker-container {
	max-width: 400px;
}

/* Apply button styling - extends the standard button */
#colorPickerApply {
	background-color: #4ba3ff;
	color: #fff;
}

#colorPickerApply:hover {
	background-color: #3a8bea;
}

.color-picker-container .slider-with-value {
	/* Keep the flex layout but adjust to prevent wrapping */
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 5px;
	margin-bottom: 10px;
	width: 100%;
}

.color-picker-container .slider-with-value label {
	/* Adjust label to stay on one line */
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	white-space: nowrap;
	width: 100%;
}

.color-picker-container .slider-with-value input[type="range"] {
	/* Adjust slider width to be proportional but not too large */
	flex: 1;
	min-width: 150px;
	max-width: 200px;
}

.color-picker-container .slider-with-value input[type="number"] {
	/* Keep number input compact */
	width: 50px;
	margin-left: 5px;
	margin-right: 5px;
}

.color-picker-container .slider-with-value span {
	/* Ensure value display has enough room */
	min-width: 35px;
	text-align: left;
}

.color-hex {
    font-family: monospace;
    font-size: 14px;
    color: #ccc;
    margin-left: 10px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 3px 6px;
    width: 80px;
}

/* Fix for color picker popup height */
#colorPickerOverlay.overlay {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5%;
    overflow-y: auto;
}

#colorPickerOverlay .overlay-content {
    max-height: 90vh;
    overflow-y: auto;
    margin-top: 0;
    margin-bottom: 5%;
}

/* Responsive adjustments */
@media (max-width: 576px) {
	.color-area-container {
		width: 200px;
		height: 200px;
	}
	
	#colorArea {
		width: 200px;
		height: 200px;
	}
	
	.color-picker-container .slider-with-value input[type="range"] {
		min-width: 100px;
	}
}
