
    .chat-widget {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1050;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    }

    .chat-toggle-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chat-toggle-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    .chat-window {
        position: absolute;
        bottom: 80px;
        right: 0;
        width: 360px;
        max-width: calc(100vw - 40px);
        height: 500px;
        max-height: calc(100vh - 120px);
        background: white;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .chat-window.hidden {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        pointer-events: none;
    }

    .chat-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .chat-header-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .chat-avatar {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 14px;
    }

    .chat-title {
        font-weight: 600;
        font-size: 16px;
    }

    .chat-status {
        font-size: 12px;
        opacity: 0.9;
    }

    .chat-status.online {
        color: #90EE90;
    }

    .chat-status.offline {
        color: #ffcccb;
    }

    .chat-close-btn {
        background: none;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        opacity: 0.8;
        transition: opacity 0.2s;
    }

    .chat-close-btn:hover {
        opacity: 1;
    }

    .chat-queue-status {
        background: #FFF3CD;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid #eee;
    }

    .chat-queue-status.hidden {
        display: none;
    }

    .queue-icon {
        font-size: 24px;
    }

    .queue-text {
        font-size: 13px;
        color: #856404;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .chat-welcome {
        text-align: center;
        padding: 30px 20px;
        color: #666;
    }

    .welcome-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .welcome-text {
        font-size: 14px;
        line-height: 1.5;
    }

    .message-bubble {
        max-width: 80%;
        padding: 10px 14px;
        border-radius: 16px;
        font-size: 14px;
        line-height: 1.4;
        word-break: break-word;
    }

    .message-bubble.sent {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 4px;
    }

    .message-bubble.received {
        background: #f0f2f5;
        color: #333;
        align-self: flex-start;
        border-bottom-left-radius: 4px;
    }

    .message-time {
        font-size: 11px;
        opacity: 0.7;
        margin-top: 4px;
        text-align: right;
    }

    .chat-typing {
        padding: 8px 16px;
        font-size: 13px;
        color: #888;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .chat-typing.hidden {
        display: none;
    }

    .typing-dots span {
        animation: typingBounce 1.4s infinite ease-in-out both;
    }

    .typing-dots span:nth-child(1) {
        animation-delay: 0s;
    }

    .typing-dots span:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dots span:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingBounce {

        0%,
        80%,
        100% {
            opacity: 0.3;
        }

        40% {
            opacity: 1;
        }
    }

    .chat-input-container {
        padding: 12px 16px;
        border-top: 1px solid #eee;
        display: flex;
        gap: 8px;
        background: #fafafa;
    }

    .chat-input {
        flex: 1;
        padding: 10px 14px;
        border: 1px solid #ddd;
        border-radius: 24px;
        font-size: 14px;
        outline: none;
        transition: border-color 0.2s;
    }

    .chat-input:focus {
        border-color: #667eea;
    }

    .chat-input:disabled {
        background: #f5f5f5;
    }

    .chat-send-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border: none;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .chat-send-btn:hover:not(:disabled) {
        transform: scale(1.05);
    }

    .chat-send-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .chat-login-prompt {
        padding: 16px;
        text-align: center;
        background: #f8f9fa;
        border-top: 1px solid #eee;
    }

    .chat-login-prompt.hidden {
        display: none;
    }

    .chat-login-prompt a {
        color: #667eea;
        font-weight: 600;
    }

    .hidden {
        display: none !important;
    }

    @media (max-width: 480px) {
        .chat-window {
            width: calc(100vw - 20px);
            height: calc(100vh - 100px);
            bottom: 70px;
            right: -10px;
        }
    }

    #chat-toggle-btn {
  display: flex;
}

#chat-window.hidden {
  display: none;
}
