#uwc-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Toggle Button */
#uwc-chat-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none !important;
}

#uwc-chat-toggle:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.uwc-chat-icon {
    font-size: 32px;
}

/* Chat Window */
#uwc-chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 600px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

.uwc-chat-closed #uwc-chat-window {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
}

/* Header */
#uwc-chat-header {
    background: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.uwc-bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uwc-bot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    background: white;
}

.uwc-bot-details {
    display: flex;
    flex-direction: column;
}

.uwc-bot-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.uwc-bot-status {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.uwc-bot-status::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #4cd137;
    border-radius: 50%;
    display: inline-block;
}

.uwc-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#uwc-chat-reset {
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
    color: white !important;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 !important;
}

#uwc-chat-reset:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: rotate(-45deg);
}

#uwc-chat-close {
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
    color: white !important;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

#uwc-chat-close:hover {
    background: rgba(255,255,255,0.2) !important;
}

/* Messages Area */
#uwc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px 20px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.uwc-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
    position: relative;
    animation: uwc-fade-in 0.3s ease-out forwards;
}

@keyframes uwc-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.uwc-message-bot {
    align-self: flex-start;
    background: #f0f2f5;
    color: #1c1e21;
    border-bottom-left-radius: 4px;
}

.uwc-message-user {
    align-self: flex-end;
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,123,255,0.2);
}

.uwc-message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* Typing Indicator */
.uwc-typing-indicator {
    align-self: flex-start;
    padding: 12px 16px;
    background: #f0f2f5;
    border-radius: 18px;
    font-size: 12px;
    color: #65676b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.uwc-typing-dot {
    width: 4px;
    height: 4px;
    background: #90949c;
    border-radius: 50%;
    animation: uwc-bounce 1.4s infinite ease-in-out;
}

.uwc-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.uwc-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes uwc-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Input Area */
#uwc-chat-input-area {
    padding: 15px 20px 20px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

#uwc-chat-input {
    flex: 1;
    border: 1px solid #e4e6eb !important;
    border-radius: 24px !important;
    padding: 10px 18px !important;
    resize: none !important;
    font-size: 14px !important;
    max-height: 120px !important;
    outline: none !important;
    background: #f0f2f5 !important;
    transition: all 0.2s;
    box-shadow: none !important;
}

#uwc-chat-input:focus {
    background: #fff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1) !important;
}

#uwc-chat-send {
    background: #007bff !important;
    color: white !important;
    border: none !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    padding: 0 !important;
    box-shadow: 0 4px 10px rgba(0,123,255,0.2) !important;
}

#uwc-chat-send:hover {
    transform: scale(1.1) !important;
    filter: brightness(1.1) !important;
}

#uwc-chat-send:disabled {
    background: #e4e6eb !important;
    color: #bcc0c4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.uwc-send-icon {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    pointer-events: none !important;
}

/* Loading Spinner */
.uwc-btn-loading .uwc-send-icon {
    display: none !important;
}

.uwc-btn-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: uwc-spin 0.6s linear infinite;
    display: block !important;
}

@keyframes uwc-spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
#uwc-chat-messages::-webkit-scrollbar {
    width: 5px;
}
#uwc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#uwc-chat-messages::-webkit-scrollbar-thumb {
    background: #e4e6eb;
    border-radius: 10px;
}
#uwc-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #ccd0d5;
}
