/* chat-widget/style.css */

/* Контейнер иконки */
#chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important; /* Самый высокий слой, поверх всего сайта */
    font-family: 'Lato', sans-serif;
    display: block;
}

/* Кнопка чата */
#chat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #C0A080 0%, #A0845F 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(192, 160, 128, 0.6);
}

#chat-icon svg {
    width: 30px;
    height: 30px;
    fill: #0A0A0A;
}

/* Окно чата */
#chat-box {
    width: 350px;
    height: 500px;
    background: #1A1A1A;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 75px;
    right: 0;
    border: 1px solid rgba(192, 160, 128, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Шапка */
#chat-header {
    background: #0A0A0A;
    color: #C0A080;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(192, 160, 128, 0.2);
}

#chat-header img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #C0A080;
}

#chat-header span {
    font-weight: 700;
    font-size: 15px;
}

#chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #A0A0A0;
    width: 24px;
    height: 24px;
    font-size: 20px;
    cursor: pointer;
}
#chat-close:hover { color: #fff; }

/* Сообщения */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #0A0A0A;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user {
    background: #C0A080;
    color: #0A0A0A;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.bot {
    background: #1A1A1A;
    color: #F5F5F5;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(192, 160, 128, 0.2);
}

/* Ссылки */
.message.bot a {
    color: #D4B896;
    text-decoration: none;
    border-bottom: 1px dashed #C0A080;
}
.message.bot a:hover {
    color: #fff;
}

/* Поле ввода */
#chat-input-area {
    padding: 15px;
    background: #1A1A1A;
    border-top: 1px solid rgba(192, 160, 128, 0.2);
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    border: 1px solid rgba(192, 160, 128, 0.3);
    background: #0A0A0A;
    color: #F5F5F5;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    font-family: 'Lato', sans-serif;
}

#chat-input::placeholder { color: #666; }
#chat-input:focus { border-color: #C0A080; }

#chat-send {
    background: #C0A080;
    color: #0A0A0A;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-send:hover { background: #D4B896; }
#chat-send svg { width: 20px; height: 20px; fill: #0A0A0A; }