/* FutureXcel Technologies Chatbot Styles - Compact & Modern Design */

/* Chatbot Toggle Button - Using Theme Colors */
#futurexcel-chatbot-toggle {
    position: fixed;
    bottom: 90px;
    right: 18px;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 50%;
    background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 86, 210, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    font-size: 0;
}

.chatbot-toggle-pulse {
    /* Simple pulse removed for cleaner look */
}

.chatbot-notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

#futurexcel-chatbot-toggle:hover {
    background: linear-gradient(90deg, #0066e6 0%, #00a896 100%);
    box-shadow: 0 3px 10px rgba(0, 86, 210, 0.35);
}

#futurexcel-chatbot-toggle:active {
    transform: scale(0.95);
}

#futurexcel-chatbot-toggle.hidden {
    display: none;
}

#futurexcel-chatbot-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Chatbot Container - Simple & Clean */
#futurexcel-chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 18px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 10002;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.25s ease;
    overflow: hidden;
    border: none;
}

#futurexcel-chatbot-container.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #futurexcel-chatbot-container {
        background: #1a1a1a;
        color: #e0e0e0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
    
    #futurexcel-chatbot-input {
        background: #252525;
        color: #e0e0e0;
        border-color: #3a3a3a;
    }
    
    .chatbot-message-user .chatbot-message-content {
        background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    }
    
    .chatbot-message-bot .chatbot-message-content {
        background: #252525;
        color: #e0e0e0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
}

/* Chatbot Header - Using Theme Colors */
#futurexcel-chatbot-header {
    background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    color: white;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 86, 210, 0.2);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.chatbot-avatar svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.chatbot-header-text {
    flex: 1;
    min-width: 0;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.chatbot-status {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
    flex-shrink: 0;
}

#futurexcel-chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

#futurexcel-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

#futurexcel-chatbot-close svg {
    width: 16px;
    height: 16px;
}

/* Messages Container */
#futurexcel-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
    min-height: 0;
}

@media (prefers-color-scheme: dark) {
    #futurexcel-chatbot-messages {
        background: #1a1a1a;
    }
}

/* Scrollbar Styling */
#futurexcel-chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

#futurexcel-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#futurexcel-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 86, 210, 0.3);
    border-radius: 10px;
}

#futurexcel-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 86, 210, 0.5);
}

/* Messages */
.chatbot-message {
    display: flex;
    animation: messageSlideIn 0.25s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message-user {
    justify-content: flex-end;
}

.chatbot-message-bot {
    justify-content: flex-start;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 13px;
    position: relative;
}

.chatbot-message-user .chatbot-message-content {
    background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 86, 210, 0.25);
}

.chatbot-message-bot .chatbot-message-content {
    background: #ffffff;
    color: #1a1a1a;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .chatbot-message-bot .chatbot-message-content {
        background: #2a2a2a;
        color: #e0e0e0;
        border-color: #3a3a3a;
    }
}

/* Typing Indicator */
.chatbot-typing .chatbot-message-content {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typingAnimation 1.2s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Quick Actions */
.chatbot-quick-actions {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 86, 210, 0.1);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

@media (prefers-color-scheme: dark) {
    .chatbot-quick-actions {
        background: #1a1a1a;
        border-color: rgba(0, 86, 210, 0.2);
    }
}

.chatbot-quick-actions.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.chatbot-quick-action {
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid rgba(0, 86, 210, 0.2);
    border-radius: 16px;
    font-size: 12px;
    color: #0056d2;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

.chatbot-quick-action:hover {
    background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    color: white;
    border-color: #0056d2;
}

.chatbot-quick-action:active {
    transform: translateY(0);
}

/* Input Container */
#futurexcel-chatbot-input-container {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 86, 210, 0.1);
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    #futurexcel-chatbot-input-container {
        background: #1e1e1e;
        border-color: rgba(255, 255, 255, 0.1);
    }
}

#futurexcel-chatbot-input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #f8f9fa;
    color: #1a1a1a;
}

#futurexcel-chatbot-input:focus {
    border-color: #0056d2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

#futurexcel-chatbot-input::placeholder {
    color: #999;
    font-size: 13px;
}

#futurexcel-chatbot-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(90deg, #0056d2 0%, #009688 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 86, 210, 0.3);
}

#futurexcel-chatbot-send:hover {
    background: linear-gradient(90deg, #0066e6 0%, #00a896 100%);
    box-shadow: 0 3px 8px rgba(0, 86, 210, 0.4);
}

#futurexcel-chatbot-send:active {
    transform: scale(0.95);
}

#futurexcel-chatbot-send svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 575.98px) {
    #futurexcel-chatbot-container {
        width: auto;
        max-width: none;
        height: min(520px, calc(100vh - 108px));
        bottom: 76px;
        right: 12px;
        left: 12px;
        border-radius: 14px;
    }
    
    #futurexcel-chatbot-toggle {
        bottom: 14px;
        right: 68px;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
    
    #futurexcel-chatbot-toggle svg {
        width: 22px;
        height: 22px;
    }
    
    .chatbot-quick-actions {
        padding: 8px 12px;
        gap: 5px;
    }
    
    .chatbot-quick-action {
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* Position variants */
#futurexcel-chatbot-container.position-left {
    right: auto;
    left: 20px;
}

#futurexcel-chatbot-toggle.position-left {
    right: auto;
    left: 20px;
}
