#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.chat-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0b5cff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-widget-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chat-widget-window {
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-widget-header {
    background: #0b5cff;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-title {
    font-weight: 600;
    font-size: 16px;
}

.chat-widget-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.chat-widget-close:hover {
    opacity: 1;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-widget-message {
    display: flex;
}

.chat-widget-message-user {
    justify-content: flex-end;
}

.chat-widget-message-bot {
    justify-content: flex-start;
}

.chat-widget-message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-widget-message-user .chat-widget-message-bubble {
    background: #0b5cff;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-widget-message-bot .chat-widget-message-bubble {
    background: white;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-widget-message-bubble a {
    color: inherit;
    text-decoration: underline;
}

.chat-widget-image {
    max-width: 100%;
    border-radius: 6px;
    margin-top: 6px;
    display: block;
}

.chat-widget-loading {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-widget-loading span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: chat-loading-bounce 1.4s infinite ease-in-out both;
}

.chat-widget-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-widget-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes chat-loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.chat-widget-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.chat-widget-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-widget-input:focus {
    border-color: #0b5cff;
}

.chat-widget-send {
    background: #0b5cff;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-widget-send:hover {
    background: #0a52e0;
}

.chat-widget-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chat-widget-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
    }
}