/* Button Cursor */
.btn {
    cursor: pointer;
}

.toolBtn {
    cursor: pointer;
}

/* Merge button disabled state */
#mergeBtn:disabled {
    background-color: var(--bs-primary-text-emphasis);
    border-color: var(--bs-primary-text-emphasis);
    opacity: 0.65;
}

/* Form Controls Styling */
.form-check-input[type="radio"] {
    width: 1.1em;
    height: 1.1em;
    border: 1.5px solid #d1d5db;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-input[type="radio"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
    transform: scale(1.05);
}

.form-check-input[type="radio"]:hover {
    transform: scale(1.08);
    border-color: #3b82f6;
}

.form-check {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--bs-primary-text-emphasis);
    border-radius: 0.5rem;
    background-color: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check:hover {
    transform: translateY(-0.5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.form-check-label {
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    display: flex;
    align-items: center;
}

.form-check-label img {
    opacity: 0.7;
    transition: all 0.2s ease;
}

.form-check:hover .form-check-label img {
    opacity: 1;
    transform: scale(1.05);
}

/* Range Slider Styling */
.form-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #052c65;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(5, 44, 101, 0.3);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(5, 44, 101, 0.4);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #052c65;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(5, 44, 101, 0.3);
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(5, 44, 101, 0.4);
}

[data-bs-theme="dark"] .form-check {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-bs-theme="dark"] .form-check:hover {
    background-color: #374151;
}

[data-bs-theme="dark"] .form-check-label {
    color: #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {

    .form-check {
        padding: 0.75rem;
    }
}

/* ===== Color Picker Styling ===== */

/* Color Picker Container */
.input-group {
    display: flex;
    flex-wrap: nowrap;
}

/* Color Picker Button */
.form-control-color {
    width: 60px;
    min-width: 60px;
    height: 38px;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out;
}

.form-control-color:hover {
    border-color: #86b7fe;
}

.form-control-color:focus {
    border-color: #86b7fe;
    box-shadow: none;
    outline: none;
}

/* Color Picker - Actual Color Display */
.form-control-color::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.form-control-color::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.form-control-color::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}

/* HEX Input Field */
.input-group .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    flex: 1;
}

/* Focus state for entire input-group */
.input-group:focus-within .form-control-color {
    border-color: #86b7fe;
}

.input-group:focus-within .form-control {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Label styling */
.form-label.fw-bold {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Dark Mode Support for Color Picker */
[data-bs-theme="dark"] .form-control-color {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-bs-theme="dark"] .input-group .form-control {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .input-group:focus-within .form-control-color {
    border-color: #63b3ed;
}

[data-bs-theme="dark"] .input-group:focus-within .form-control {
    border-color: #63b3ed;
    box-shadow: 0 0 0 0.25rem rgba(99, 179, 237, 0.25);
}

[data-bs-theme="dark"] .form-label.fw-bold {
    color: #e2e8f0;
}

/* Placeholder styling for HEX input */
.input-group .form-control::placeholder {
    color: #adb5bd;
    opacity: 0.6;
}

/* Download button styling - matches other buttons exactly */
#downloadLink {
    color: white !important;
    text-decoration: none !important;
}

#downloadLink:hover {
    color: white !important;
    text-decoration: none !important;
}

#downloadLink:visited {
    color: white !important;
    text-decoration: none !important;
}

#downloadLink:focus {
    color: white !important;
    text-decoration: none !important;
}

#downloadLink:active {
    color: white !important;
    text-decoration: none !important;
}

/* Override Bootstrap button hover effects completely */
#downloadLink.btn:hover {
    color: white !important;
}

#downloadLink.btn:focus {
    color: white !important;
    box-shadow: none !important;
}

#downloadLink.btn:active {
    color: white !important;
}

#downloadLink.btn:focus-visible {
    color: white !important;
    box-shadow: none !important;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
