/* ========== ИМПОРТ ШРИФТОВ ========== */
/* Подключение шрифта Roboto от Google для улучшения читаемости форм */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

/* Подключение локального шрифта Gotham Pro */
@font-face {
    font-family: "Gotham Pro Regular";
    src: url("https://ci74.ru/rep/styles/GothamProRegular.ttf") format('truetype');
}




/* ========== ОБЩИЕ СТИЛИ ========== */
*, *::after, *::before {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
}

/* ========== СТАРТОВЫЙ ЭКРАН ========== */
/* Контейнер для стартового экрана */
.start-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

/* Стили для кнопок выбора типа отзыва */
.feedback-btn {
    width: 100%;
    padding: 20px;
    margin: 15px 0;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: block;
}

/* Кнопка для отрицательного отзыва (оранжевая) */
.negative-btn {
    background: var(--color-orange);
    color: white;
    box-shadow: 0 4px 6px rgba(241, 112, 54, 0.2);
}

/* Кнопка для положительного отзыва (зеленая) */
.positive-btn {
    background: var(--color-green);
    color: white;
    box-shadow: 0 4px 6px rgba(11, 72, 21, 0.2);
}

/* Эффект при наведении на кнопки */
.feedback-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
/* Кнопки выбора организаций в положительном отзыве */
.positive-org-btn {
    padding: 15px;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
}

.positive-org-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Стили модальных окон */
#positiveModal {
    background-color: white; /* Убедимся, что фон не прозрачный */
}

#positive-org-buttons {
    display: block; /* или flex, в зависимости от вашего макета */
}

/* Затемненный фон для модальных окон */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    z-index: 1001;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Заголовок модального окна */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

/* Кнопка закрытия модального окна */
.close-btn {
    font-size: 56px;
    cursor: pointer;
    color: #666;
    position: absolute;
    top: -10px;
    right: 0;
    line-height: 1;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

/* ========== ЧАТ ДЛЯ ОТРИЦАТЕЛЬНОГО ОТЗЫВА ========== */
/* Контейнер для сообщений чата */
#chat-messages {
    height: 260px; /* Увеличена высота чата для лучшей видимости */
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--color-light_border);
    border-radius: 10px;
    background-color: #fafafa;
}

/* Общие стили для сообщений */
.message {
    margin: 10px 0;
    padding: 14px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Стили для сообщений бота */
.bot-message {
    background: #f1f1f1;
    border: 1px solid var(--color-light_border);
    border-top-left-radius: 4px;
}

/* Стили для сообщений пользователя */
.user-message {
    background: var(--color-highlight);
    margin-left: auto;
    border: 1px solid var(--color-highlight_border);
    border-top-right-radius: 4px;
    color: #333;
}

/* ========== КНОПКИ ВЫБОРА ОРГАНИЗАЦИЙ ========== */
/* Контейнер для кнопок выбора организаций */
.clinic-buttons, .org-buttons {
    display: grid;
    gap: 12px;
    margin: 15px 0;
}

/* Стили для кнопок организаций */
.clinic-btn, .org-btn {
    padding: 15px;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 15px;
}

/* Эффект при наведении на кнопки организаций */
.clinic-btn:hover, .org-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* ========== ПОЛЕ ВВОДА И СОГЛАСИЕ ========== */
/* Контейнер для поля ввода и кнопки отправки */
.input-container {
    display: none;
    gap: 15px;
    flex-direction: column;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background-color: var(--color-light);
    padding: 18px;
}

/* Поле ввода для ответов пользователя */
#user-input {
    width: 100%;
    min-height: 20px;
    padding: 12px 15px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
    margin-bottom: 15px;
}

#user-input:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: 0 0 0 2px rgba(241, 112, 54, 0.2);
}

#user-input::placeholder {
    color: #999;
    font-size: 16px;
}

/* Контейнер для чекбокса согласия */
.consent-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* Стили для кастомного чекбокса */
.custom-checkbox {
    position: relative;
    display: inline-block;
    min-width: 24px;
    height: 24px;
    margin-right: 0;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    transition: border-color 0.2s, background-color 0.2s;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #fff;
    border-color: var(--color-orange);
}

.custom-checkbox input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid var(--color-orange);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Дополнительный отступ между чекбоксом и текстом */
.consent-spacer {
    width: 15px;
    display: inline-block;
}

/* Стили для текста согласия */
.consent-text {
    flex: 1;
    padding-left: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}

.consent-text a {
    color: var(--color-link_blue);
    text-decoration: none;
}

.consent-text a:hover {
    text-decoration: underline;
}

/* Кнопка отправки сообщения (оранжевая) */
.send-btn {
    padding: 12px 25px;
    background: var(--color-orange);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.send-btn:hover {
    background-color: var(--color-orange-dark);
}

/* Стили для неактивной кнопки */
.send-btn[disabled] {
    background: #cccccc;
    cursor: not-allowed;
}

/* Анимированное уведомление о согласии */
.consent-alert {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
    animation: slideDown 0.3s ease-out;
}

.consent-alert-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* Подсветка чекбокса при необходимости согласия */
.consent-highlight {
    animation: pulse 1.5s infinite;
}

/* Анимация для появления уведомления */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Анимация пульсации для привлечения внимания */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

/* ========== МАСКА ДЛЯ ТЕЛЕФОНА ========== */
/* Улучшенная стилизация маски телефона */
#user-input[data-masked="true"] {
    font-size: 18px;
    letter-spacing: 0.5px;
    text-align: left;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}

/* ========== ССЫЛКИ НА ОТЗОВИКИ ========== */
/* Общие стили для блоков с ссылками на отзовики */
.review-links {
    text-align: center;
    padding: 10px 0;
}

/* Стили для ссылок на отзовики */
.review-link {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: 3px solid;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s;
    box-sizing: border-box;
}

/* Адаптивные стили для ссылок на больших экранах */
@media (min-width: 768px) {
    .review-link {
        max-width: 450px;
        margin: 15px auto;
    }
}

/* Эффект при наведении на ссылки */
.review-link:hover {
    transform: scale(0.98);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Цвета для разных платформ */
.yandex-link { border-color: var(--color-yandex); }
.dgis-link { border-color: var(--color-dgis); }
.prodoctorov-link { border-color: var(--color-prodoctorov); }
.google-link { border-color: var(--color-google); }
.vk-link { border-color: var(--color-vk); }
.otzovik-link { border-color: var(--color-otzovik); }
.instagram-link { border-color: var(--color-instagram); }
.flamp-link { border-color: var(--color-flamp); }

/* ========== ЭКРАН БЛАГОДАРНОСТИ ========== */
/* Контейнер для сообщения благодарности */
.thank-you-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    background-color: var(--color-light);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in-out;
    display: none;
}

/* Внутренний контейнер сообщения благодарности */
.thank-you-box {
    padding: 20px;
}

/* Иконка для сообщения благодарности */
.thank-you-icon {
    font-size: 60px;
    color: var(--color-green);
    margin-bottom: 20px;
    background: #e8f5e9;
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

/* Анимация появления благодарности */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */
@media (max-width: 480px) {
    /* Адаптация поля ввода для мобильных */
    .input-container {
        flex-direction: column;
        padding: 15px;
    }
    
    /* Кнопка отправки на всю ширину на мобильных */
    .send-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Адаптация отступа между чекбоксом и текстом */
    .consent-spacer {
        width: 7px;
    }
    
    /* Или альтернативный вариант */
    .consent-text {
        padding-left: 10px;
        font-size: 13px;
    }
    
    /* Уменьшаем размер шрифта маски телефона на мобильных */
    #user-input[data-masked="true"] {
        font-size: 16px;
    }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ ========== */
/* Стили для логотипа */
.logo-container {
    margin-bottom: 25px;
}

.logo {
    max-width: 200px;
    height: auto;
}

/* Стили для приглушенной надписи с сервисом */
.service-credit {
    margin-top: 90px;
    opacity: 0.5;
    font-size: 12px;
}

.service-credit a {
    color: #999;
    text-decoration: none;
}

.service-credit a:hover {
    text-decoration: underline;
}