body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #000000;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
}

h2 {
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
}

.form-group p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 6px;
    margin-top: 4px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
}

label span {
    display: inline-block;
    font-weight: 600;
    line-height: 24px;
}

label p {
    font-size: 14px;
    color: #666666;
    margin-bottom: 6px;
    margin-top: 4px;
}

input[type="text"],
input[type="url"],
textarea {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 24px;
}

fieldset {
    border: 1px solid #cccccc;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

fieldset p {
    margin: 0px 0px 16px 0px;
    font-size: 14px;
    color: #666666;
}

fieldset label {
    display: inline-block;
    margin-bottom: 4px;
    padding: 8px 16px 8px 8px;
    border-radius: 6px;
    border: 1px solid #cccccc;
}

legend {
    position: relative;
    font-weight: 600;
    padding: 0 10px;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 4px;
}

button[type="submit"] {
    background-color: #EB7353;
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #d46246;
}

input[type="text"],
input[type="url"],
textarea,
input[type="checkbox"],
input[type="radio"],
button[type="submit"] {
    touch-action: manipulation;
}

/* Стили для кнопки в состоянии загрузки */
button[type="submit"].loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    background-color: #cccccc; /* Цвет деактивированной кнопки */
}

button[type="submit"].loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: button-loader 1s linear infinite;
}

@keyframes button-loader {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Стили для модального окна */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 6px;
    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content button {
    background-color: #EB7353;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #d46246;
}

/* Стили для триггера подсказки */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* При наведении на область с заголовком и знаком вопроса */
.tooltip-trigger:hover .question-mark {
    background-color: #EB7353; /* Оранжевый фон */
    color: #ffffff; /* Белый символ вопроса */
}

.tooltip-trigger:hover .legend-title {
    color: #EB7353; /* Оранжевый цвет текста заголовка */
}

/* Стили для иконки вопроса */
.question-mark {
    margin-left: 8px;
    background-color: #cccccc; /* Светло-серый фон */
    color: #000000; /* Чёрный символ вопроса */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}

/* Стили для заголовка */
.legend-title {
    color: inherit; /* Наследуем цвет текста */
    transition: color 0.2s;
}

/* Стили для кнопки закрытия */
.tooltip-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.tooltip-close img {
    width: 32px;
    height: 32px;
}

/* Общие стили для .tooltip-content */
.tooltip-content {
    z-index: 1000; /* Увеличиваем z-index для отображения поверх всего */
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.2s, visibility 0.2s;
    visibility: hidden;
    opacity: 0;
    width: 400px;
    max-width: 90vw; /* Для мобильных устройств */
    position: fixed; /* Позиционирование по окну браузера */
    /* Убираем границу и скругления по умолчанию */
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.tooltip-content img {
    max-width: 100%; /* Картинка не выйдет за пределы ширины контейнера */
    max-height: 100%; /* Картинка не выйдет за пределы высоты контейнера */
    object-fit: contain; /* Картинка сохраняет пропорции и вписывается в контейнер */
    display: block; /* Убираем лишнее пространство вокруг изображения */
    margin: 0 auto; /* Центрируем картинку */
}

/* Для десктопной версии */
@media (min-width: 600px) {
    .tooltip-content {
        bottom: 32px;
        right: 32px;
        top: auto;
        left: auto;
        transform: none; /* Убираем трансформацию */
        width: 400px;
        border: 1px solid #cccccc; /* Серый бордер для десктопа */
        border-radius: 6px; /* Скругления углов для десктопа */
        box-shadow: 0px 0px 10px rgba(0,0,0,0.1); /* Тень для десктопа */
    }

    html {
        overflow-y: scroll;
    }
}

/* Для мобильной версии */
@media (max-width: 599px) {
    .tooltip-content {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        overflow-y: auto; /* Добавляем прокрутку, если контент превышает высоту экрана */
        padding: 20px;
        border: none; /* Убираем границу */
        border-radius: 0; /* Убираем скругления углов */
        box-shadow: none; /* Убираем тень */
        transform: none; /* Убираем трансформацию */
    }

    /* Удаляем затемнение фона, так как тултип занимает весь экран */
    .tooltip-content::before {
        display: none;
    }

    /* Стили для кнопки закрытия на мобильных устройствах */
    .tooltip-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}

/* Увеличение размеров элементов на мобильных устройствах */
@media (max-width: 600px) {
    input[type="text"],
    input[type="url"],
    textarea {
        padding: 15px;
        font-size: 1em;
    }

    label span {
        font-size: 1em;
    }

    label p {
        font-size: 0.9em;
    }

    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
    }

    button[type="submit"] {
        width: 100%;
        padding: 15px;
        font-size: 1.2em;
    }
}

/* Стили для textarea */
textarea {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 24px;
    resize: none; /* Отключаем возможность изменения размера вручную */
    overflow: hidden; /* Скрываем полосу прокрутки */
    min-height: 56px; /* Устанавливаем минимальную высоту */
}