#support-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#support-chat-toggle {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

#support-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004085);
}

#support-chat-toggle i {
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.support-chat-attention-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
    animation: support-chat-attention-pulse 2s infinite;
    z-index: 1;
}

.support-chat-has-attention {
    animation: support-chat-attention-bounce 1s ease-in-out infinite alternate;
}

#support-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.support-chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-chat-status-indicator {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: support-chat-pulse 2s infinite;
}

.support-chat-agent-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.support-chat-agent-status {
    font-size: 12px;
    opacity: 0.9;
}

.support-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.support-chat-user-message {
    flex-direction: row-reverse;
}

.support-chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.support-chat-bot-message .support-chat-message-avatar {
    background: transparent;
}

.support-chat-user-message .support-chat-message-avatar {
    background: #6c757d;
}

.support-chat-message-avatar i {
    color: white;
    font-size: 14px;
}

.support-chat-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.support-chat-header-logo {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}

.support-chat-message-content {
    flex: 1;
    max-width: 80%;
}

.support-chat-message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.support-chat-user-message .support-chat-message-text {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.support-chat-bot-message .support-chat-message-text {
    border-bottom-left-radius: 4px;
}

.support-chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

#support-chat-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

.support-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 8px;
}

#support-chat-message-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    max-height: 100px;
    min-height: 44px;
    font-family: inherit;
}

#support-chat-message-input::-webkit-scrollbar {
    display: none;
}

#support-chat-message-input {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#support-chat-message-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#support-chat-send-btn {
    width: 44px;
    height: 44px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#support-chat-send-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: scale(1.05);
}

#support-chat-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.support-chat-char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.support-chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.support-chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.support-chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-style: italic;
}

.support-chat-typing-dots {
    display: flex;
    gap: 4px;
}

.support-chat-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #007bff;
    animation: support-chat-typing-bounce 1.4s infinite ease-in-out both;
}

.support-chat-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.support-chat-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.support-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.support-chat-messages::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.support-chat-messages::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 10px;
}

.support-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8b3ba;
}

@keyframes support-chat-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes support-chat-typing-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes support-chat-attention-pulse {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

@keyframes support-chat-attention-bounce {
    0% { 
        transform: scale(1) translateY(0); 
    }
    100% { 
        transform: scale(1.05) translateY(-2px); 
    }
}

@media (max-width: 767.98px) {
    #support-chat-widget {
        bottom: 15px;
        right: 15px;
    }

    #support-chat-toggle {
        width: 50px;
        height: 50px;
    }


    #support-chat-toggle i {
        font-size: 18px;
    }

    #support-chat-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        z-index: 10000;
    }

    .support-chat-header {
        padding: 15px 20px;
        padding-top: max(15px, env(safe-area-inset-top, 15px));
        flex-shrink: 0;
    }

    .support-chat-messages {
        padding: 12px 16px;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    .support-chat-input-area {
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
        flex-shrink: 0;
        border-top: 1px solid #e9ecef;
    }

    .support-chat-message-text {
        font-size: 16px;
        max-width: 85%;
    }

    .support-chat-attention-dot {
        width: 14px;
        height: 14px;
        top: -1px;
        right: -1px;
    }
}

@media (max-width: 575.98px) {
    #support-chat-toggle {
        width: 48px;
        height: 48px;
    }


    #support-chat-toggle i {
        font-size: 16px;
    }

    .support-chat-messages {
        padding: 12px;
    }

    .support-chat-input-area {
        padding: 12px;
    }

    .support-chat-message {
        gap: 8px;
    }

    .support-chat-message-avatar {
        width: 28px;
        height: 28px;
    }

    .support-chat-message-avatar i {
        font-size: 12px;
    }

    .support-chat-attention-dot {
        width: 12px;
        height: 12px;
        top: 0px;
        right: 0px;
    }
}