/**
 * Дополнительные стили для чата с бирюзовым фоном
 */

/* Сброс стилей */
#support-chat-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Убираем возможные черные подложки вокруг групп полей */
#support-chat-user-info .support-chat-input-group,
#support-chat-user-info .support-chat-input-group *:not(input):not(textarea) {
    background: transparent !important;
}

/* Основной контейнер чата */
#support-chat-window {
    background-color: #00b8a9 !important;
    border: 2px solid #ffc107 !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

/* Заголовок чата */
#support-chat-header {
    background: linear-gradient(135deg, #00b8a9, #009688) !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: none !important;
}

/* Контейнер сообщений */
#support-chat-messages {
    background-color: #00b8a9 !important;
    padding: 15px !important;
    overflow-y: auto !important;
    max-height: 400px !important;
    min-height: 200px;
}

/* Сообщения */
.support-chat-message {
    background-color: #ffffff !important;
    color: #333333 !important;
    border: none !important;
    margin: 8px 0 !important;
    padding: 12px 15px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 80%;
    position: relative;
    line-height: 1.4;
}

/* Сообщения пользователя */
.support-chat-message.user {
    margin-left: auto;
    background-color: #e3f9f7 !important;
    border-bottom-right-radius: 4px !important;
}

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

/* Содержимое сообщений */
.support-chat-message .message-content {
    background-color: transparent !important;
    color: #333333 !important;
    margin: 0 !important;
    padding: 0 !important;
    word-wrap: break-word;
}

/* Время сообщения */
.support-chat-message .message-time {
    color: #7a8c8b !important;
    font-size: 0.7em !important;
    margin-top: 4px !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.support-chat-message .message-time:before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%237a8c8b"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.7;
}

/* Имя отправителя */
.support-chat-message .message-name {
    font-weight: 600 !important;
    color: #00796b !important;
    margin-bottom: 4px !important;
    display: block;
}

/* Форма ввода */
#support-chat-form {
    background: #00b8a9 !important;
    padding: 15px 20px !important;
    display: flex;
    gap: 10px;
    border-top: 2px solid #ffc107 !important;
}

/* Поле ввода */
#support-chat-input {
    flex: 1;
    border: 2px solid #e0e0e0 !important;
    border-radius: 20px !important;
    padding: 10px 15px !important;
    font-size: 14px !important;
    transition: all 0.3s ease;
    background-color: #ffffff !important;
    color: #000000 !important;
}

#support-chat-input:focus {
    border-color: #00b8a9 !important;
    box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.2) !important;
    outline: none;
}

/* Кнопка отправки */
#support-chat-send {
    background-color: #00b8a9 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffc107 !important;
}

#support-chat-send:hover {
    background-color: #ffd54f !important;
    transform: translateY(-1px);
}

/* Форма с информацией о пользователе */
#support-chat-user-info {
    background: #00b8a9 !important;
    padding: 15px 20px;
    border-bottom: 2px solid #ffc107 !important;
}

#support-chat-user-info .support-chat-input-group {
    margin-bottom: 10px;
}

#support-chat-user-info label {
    color: #ffffff !important;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

#support-chat-user-info input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* Статус онлайн */
.chat-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-top: 4px;
    gap: 6px;
    color: #ffffff !important;
}

.chat-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4cff00;
    box-shadow: 0 0 8px #4cff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

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

.support-chat-message {
    animation: fadeIn 0.3s ease-out;
}

/* ===== Modern Professional Theme (overrides) ===== */
/* Контейнер виджета: мягкие тени, скругления, аккуратный контур */
#support-chat-window {
    border-radius: 14px !important;
    box-shadow: 0 14px 40px rgba(0,0,0,0.25) !important;
    background: linear-gradient(180deg, rgba(0,184,169,0.95), rgba(0,150,136,0.98)) !important;
}

/* Заголовок: аккуратная панель с полупрозрачностью */
#support-chat-header {
    background: linear-gradient(135deg, rgba(0,184,169,1) 0%, rgba(0,150,136,1) 60%, rgba(0,184,169,1) 100%) !important;
    color: #fff !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.15) !important;
}

/* Статус-пилюля */
.chat-status {
    color: #eafff9 !important;
}
.chat-status-indicator {
    background-color: #6dffbd !important;
    box-shadow: 0 0 10px rgba(109,255,189,0.9) !important;
}

/* Сообщения: аккуратные карточки с тенями и разными цветами */
.support-chat-message {
    border-radius: 14px !important;
    padding: 12px 14px !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}
.support-chat-message.user {
    background: linear-gradient(180deg, #e9fbf8, #d7f6f1) !important;
    border: 1px solid #cdeee9 !important;
}
.support-chat-message.admin {
    background: #ffffff !important;
    border: 1px solid #e9eef0 !important;
    border-left: 4px solid #00b8a9 !important;
}
.support-chat-message .message-content {
    font-size: 14px !important;
}
.support-chat-message .message-time {
    font-size: 11px !important;
    opacity: 0.9 !important;
}

/* Приятный скролл */
#support-chat-messages::-webkit-scrollbar { width: 10px; }
#support-chat-messages::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 10px; }
#support-chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 10px; }

/* Блок с полями пользователя */
#support-chat-user-info label {
    color: #f3fffd !important;
    font-weight: 600 !important;
    background: transparent !important; /* убрать черный фон у надписей */
}
#support-chat-user-info input {
    background: #ffffff !important;
    color: #1f605b !important;
    border: 1px solid #d6e7e5 !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
}

/* Форма отправки внизу: стеклянная панель */
#support-chat-form {
    background: linear-gradient(180deg, rgba(0,184,169,0.95), rgba(0,150,136,0.98)) !important;
    border-top: 1px solid rgba(255,255,255,0.18) !important;
}

/* Поле ввода сообщения: капсула */
#support-chat-input {
    background: #fff !important;
    color: #0b4742 !important;
    border: 1px solid #d6e7e5 !important;
    border-radius: 24px !important;
    padding: 10px 14px !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04) !important;
}
#support-chat-input::placeholder { color: #7aa8a4 !important; }

/* Кнопка отправки: акцентная капсула */
#support-chat-send {
    background: linear-gradient(180deg, #ffd54f, #ffc107) !important;
    color: #0a3e3a !important;
    border: none !important;
    width: 42px !important;
    height: 42px !important;
    box-shadow: 0 6px 16px rgba(255,193,7,0.35) !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease !important;
}
#support-chat-send:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 8px 20px rgba(255,193,7,0.45) !important; }
#support-chat-send:active { transform: translateY(0) scale(0.98); }
#support-chat-send i { color: #0a3e3a !important; }
