/* Text to Handwriting Tool Custom Styles */

/* Custom Range Slider for Font Size */
.handwriting-slider {
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #e9ecef,
        #e9ecef 5px,
        #d3d6d9 5px,
        #d3d6d9 10px
    );
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.handwriting-slider::-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(0, 0, 0, 0.2);
}

.handwriting-slider::-webkit-slider-thumb:hover {
    background: #041f4a;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.handwriting-slider::-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(0, 0, 0, 0.2);
}

.handwriting-slider::-moz-range-thumb:hover {
    background: #041f4a;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.handwriting-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(to right,
        #052c65 0%,
        #052c65 var(--value, 0%),
        transparent var(--value, 0%)),
        repeating-linear-gradient(
            45deg,
            #e9ecef,
            #e9ecef 5px,
            #d3d6d9 5px,
            #d3d6d9 10px
        );
    border-radius: 4px;
}

.handwriting-slider::-moz-range-track {
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #e9ecef,
        #e9ecef 5px,
        #d3d6d9 5px,
        #d3d6d9 10px
    );
    border-radius: 4px;
}

.handwriting-slider::-moz-range-progress {
    height: 8px;
    background: #052c65;
    border-radius: 4px;
}

/* Dark mode slider */
[data-bs-theme="dark"] .handwriting-slider {
    background: #343a40;
}

[data-bs-theme="dark"] .handwriting-slider::-webkit-slider-thumb {
    background: #6ea8fe;
}

[data-bs-theme="dark"] .handwriting-slider::-webkit-slider-thumb:hover {
    background: #9ec5fe;
}

[data-bs-theme="dark"] .handwriting-slider::-moz-range-thumb {
    background: #6ea8fe;
}

[data-bs-theme="dark"] .handwriting-slider::-moz-range-thumb:hover {
    background: #9ec5fe;
}

[data-bs-theme="dark"] .handwriting-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #6ea8fe 0%, #6ea8fe var(--value, 0%), #343a40 var(--value, 0%), #343a40 100%);
}

[data-bs-theme="dark"] .handwriting-slider::-moz-range-track {
    background: #343a40;
}

[data-bs-theme="dark"] .handwriting-slider::-moz-range-progress {
    background: #6ea8fe;
}

/* Font preview text styling */
#fontPreviewText {
    background-color: var(--bs-body-bg);
    transition: font-family 0.3s ease;
}

[data-bs-theme="dark"] #fontPreviewText {
    border-color: #495057 !important;
}

/* Ink color preset buttons */
.ink-preset {
    border: 2px solid transparent !important;
    transition: all 0.2s ease;
}

.ink-preset:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ink-preset:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Canvas preview container */
#previewSection .border {
    transition: background-color 0.3s ease;
}

[data-bs-theme="dark"] #previewSection .border {
    background-color: #2b3035 !important;
    border-color: #495057 !important;
}
