#textControls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.box-3-text.hidden {
    display: none;
}

.icon-container {
    display: flex;
    justify-content: center; /* Центрирует кнопки по горизонтали */
    align-items: center; /* Центрирует кнопки по вертикали */
    margin: 5px 0;
}

#textColor, #lineHeight, #charSpacing, #strokeWidth, #strokeColor, #shadowColor, #shadowBlur, #shadowOffsetX, #shadowOffsetY {
    margin: 5px 0;
}

/* Слайдер */
.slider-container {
    position: relative;
    width: 90%;
    display: flex;
    justify-content: center; /* Центрирование содержимого по горизонтали */
    margin: 5px 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 30px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    margin: 0;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 30px;
    background: #4CAF50;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 30px;
    background: #4CAF50;
    cursor: pointer;
}

.slider-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: #000;
    white-space: nowrap;
    pointer-events: none;
}

/* Метка слайдера */
.slider-label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    white-space: nowrap;
    pointer-events: none;
}

/* Стили для шрифтов */
#controlShowFonts {
    cursor: pointer;
    display: inline-block;
    padding: 5px;
    margin: 5px 0;
    background-color: #e0e0e0;
    flex-grow: 1;
}


/* Стили для выпадающего меню */
.font_popup {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 20vw;
    height: 100vh;
    text-align: center;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.font_popup .vmenu {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    margin-top: 40px;
}

.font_popup .vmenu li {
    padding: 10px;
    cursor: pointer;
}

.font_popup .vmenu li:hover {
    background-color: #f0f0f0;
}

/* Добавляем класс для скрытия выпадающего списка, пока шрифты не загрузятся */
.font_loading .font_popup {
    display: none;
}


/*вертикальная прокрутка блока со шрифтами*/
.scroll-container {
    overflow-y: scroll; /* Вертикальная прокрутка */
    overflow-x: hidden; /* Отключение горизонтальной прокрутки */
    scroll-behavior: smooth; /* Плавная прокрутка */
    border: 1px solid #ccc; /* Опциональная рамка для видимости контейнера */
}

/* Дополнительные стили для кастомизации scrollbar (опционально) */
.scroll-container::-webkit-scrollbar {
    width: 8px; /* Ширина скроллбара */
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: #888; /* Цвет скроллбара */
    border-radius: 10px; /* Скругленные углы */
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* Цвет при наведении */
}






/* Стили для кнопки закрытия */
.font_popup .close_button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    opacity: 0.5;
}

.font_popup .close_button:hover {
    opacity: 1;
}

.color-and-font-container {
    display: flex;
    align-items: center;
    width: 90%;
}

#textColor {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    min-width: 25px;
    min-height: 25px;
    max-width: 25px;
    max-height: 25px;
}

/* Новый стиль для размещения цветового ввода и слайдера вместе */
.color-and-slider-container {
    display: flex;
    align-items: center;
    width: 90%;
}

#strokeColor {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    min-width: 25px;
    min-height: 25px;
    max-width: 25px;
    max-height: 25px;
}

#shadowColor {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    min-width: 25px;
    min-height: 25px;
    max-width: 25px;
    max-height: 25px;
}

#gradientControls {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

#gradientColor1 {
    width: 25px;
    height: 25px;
    margin-right: 5px;
    min-width: 25px;
    min-height: 25px;
    max-width: 25px;
    max-height: 25px;
}

#gradientColor2 {
    width: 25px;
    height: 25px;
    margin-left: 5px;
    min-width: 25px;
    min-height: 25px;
    max-width: 25px;
    max-height: 25px;
}


@media (max-width: 1024px) {
    .font_popup {
        width: 50vw;
    }
    .box-3 .scrollbar-thumb {
        width: 5px!important; /* Ширина полосы прокрутки */
        left: 3px!important;
    }
}