/**
 * Принудительное переопределение стилей чата
 * Этот файл имеет самый высокий приоритет
 */

/* Только основное окно и кнопка с желтым контуром */
#support-chat-window {
    border: 2px solid #ffc107 !important;
    background-color: #00b8a9 !important;
    display: flex !important;
    flex-direction: column !important;
}

#support-chat-button {
    border: 2px solid #ffc107 !important;
    background-color: #00b8a9 !important;
    color: #ffffff !important;
}

/* Убираем желтые границы у всех остальных элементов */
#support-chat-input,
#support-chat-name,
#support-chat-email,
.support-chat-input-group input,
.support-chat-input-group textarea {
    border: 1px solid #e0e0e0 !important;
    background-color: #ffffff !important;
    color: #00b8a9 !important;
}

/* Кнопка отправки без желтой границы */
#support-chat-send {
    border: none !important;
    background-color: #00b8a9 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    z-index: 1 !important;
    flex: 0 0 40px !important; /* не сжимать и не растягивать */
    flex-shrink: 0 !important;
}

#support-chat-send i {
    display: inline-block !important;
    color: #ffffff !important;
}

/* Форма чата */
#support-chat-form {
    display: flex !important;
    gap: 10px !important;
    flex: 0 0 auto !important; /* не позволяем сжать форму */
    align-items: center !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 2 !important;
    padding: 12px 15px !important;
    border-top: 2px solid #ffc107 !important;
    background: #00b8a9 !important;
}

/* Сообщения чата */
#support-chat-messages {
    flex: 1 1 auto !important;
    min-height: 80px !important; /* меньше, чтобы форма влезала */
    max-height: none !important; /* убираем жёсткий max-height */
    overflow-y: auto !important;
}

/* Заголовок чата */
#support-chat-header {
    background: linear-gradient(135deg, #00b8a9, #009688) !important;
    color: #ffffff !important;
    border: none !important;
}

/* Сообщения пользователя */
.support-chat-message.user {
    background-color: #e3f9f7 !important;
    color: #005a54 !important;
    border: 1px solid #e0e0e0 !important;
}

/* Сообщения администратора */
.support-chat-message.admin {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 4px solid #00b8a9 !important;
}

/* Метки времени */
.message-time,
[class*="time"],
[id*="time"],
.support-chat-message time,
.chat-time {
    background-color: transparent !important;
    color: #7a8c8b !important;
    border: none !important;
}

/* Иконки */
.fa, 
.fas, 
.far, 
.fab,
.svg-inline--fa,
svg,
i {
    background-color: transparent !important;
    color: inherit !important;
}

/* Принудительное переопределение для черных фонов */
[style*="background-color: rgb(0, 0, 0)"],
[style*="background-color: #000"],
[style*="background-color: black"],
[style*="background-color:#000"],
[style*="background: rgb(0, 0, 0)"],
[style*="background: #000"],
[style*="background: black"],
[style*="background:#000"] {
    background-color: transparent !important;
}

/* Принудительное переопределение для желтых границ */
[style*="border: 2px solid #ffc107"],
[style*="border:2px solid #ffc107"],
[style*="border-color: #ffc107"],
[style*="border-color:#ffc107"] {
    border-color: #e0e0e0 !important;
}

/* Исключения для основного окна и кнопки */
#support-chat-window[style*="border"],
#support-chat-button[style*="border"] {
    border: 2px solid #ffc107 !important;
}
