#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
#chat-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #056cb8 0%, #0a84e0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(5, 108, 184, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}
#chat-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(5, 108, 184, 0.6);
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(5, 108, 184, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(5, 108, 184, 0.7); }
}
#chat-widget-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}
#chat-widget-window.hidden {
    display: none;
}
#chat-widget-window.minimized {
    height: 60px;
}
#chat-widget-header {
    background: linear-gradient(135deg, #056cb8 0%, #0a84e0 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header-info i {
    font-size: 24px;
}
.chat-header-info div {
    display: flex;
    flex-direction: column;
}
.chat-header-info small {
    opacity: 0.8;
    font-size: 11px;
}
.chat-header-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.chat-header-actions button:hover {
    opacity: 1;
}
#chat-widget-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9f9;
}
.bot-message, .user-message {
    margin-bottom: 12px;
    display: flex;
}
.user-message {
    justify-content: flex-end;
}
.message-content {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.bot-message .message-content {
    background: white;
    border: 1px solid #e1e1e1;
    border-top-left-radius: 4px;
}
.user-message .message-content {
    background: linear-gradient(135deg, #056cb8 0%, #0a84e0 100%);
    color: white;
    border-top-right-radius: 4px;
}
.message-sources {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e1e1;
    font-size: 12px;
}
.message-sources a {
    display: block;
    color: #056cb8;
    text-decoration: none;
    margin-top: 4px;
}
.message-sources a:hover {
    text-decoration: underline;
}
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}
#chat-widget-input {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #e1e1e1;
    gap: 8px;
}
#chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e1e1e1;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}
#chat-input:focus {
    border-color: #056cb8;
}
#chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #056cb8 0%, #0a84e0 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
#chat-send-btn:hover {
    transform: scale(1.05);
}
@media (max-width: 768px) {
    #chat-widget-window {
        width: calc(100vw - 40px);
        height: 70vh;
    }
}