/* Chatbot Widget Styles */

/* Chat Button - Floating */
.chatbot-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #c3151c 0%, #991b1b 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(195, 21, 28, 0.4);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(195, 21, 28, 0.5);
}

.chatbot-button i {
    font-size: 24px;
    color: white;
}

.chatbot-button .chat-icon {
    display: block;
}

.chatbot-button .close-icon {
    display: none;
}

.chatbot-button.active .chat-icon {
    display: none;
}

.chatbot-button.active .close-icon {
    display: block;
}

/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #10B981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    left: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a1a 100%);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #c3151c 0%, #991b1b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.chatbot-info {
    flex: 1;
}

.chatbot-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.chatbot-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
}

/* Chat Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #F9FAFB;
}

/* Message Bubbles */
.chat-message {
    display: flex;
    gap: 0.5rem;
    max-width: 85%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.bot {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.chat-message.bot .message-avatar {
    background: linear-gradient(135deg, #c3151c 0%, #991b1b 100%);
    color: white;
}

.chat-message.user .message-avatar {
    background: #E5E7EB;
    color: #374151;
}

.message-bubble {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.bot .message-bubble {
    background: white;
    color: #374151;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #c3151c 0%, #991b1b 100%);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* Message Content Formatting */
.message-bubble strong {
    font-weight: 600;
}

.message-bubble p {
    margin: 0 0 0.5rem 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.875rem 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #9CA3AF;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

/* Chat Input */
.chatbot-input {
    padding: 1rem;
    border-top: 1px solid #E5E7EB;
    background: white;
    display: flex;
    gap: 0.75rem;
}

.chatbot-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chatbot-input input:focus {
    outline: none;
    border-color: #c3151c;
}

.chatbot-input input::placeholder {
    color: #9CA3AF;
}

.chatbot-input button {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #c3151c 0%, #991b1b 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chatbot-input button:hover {
    transform: scale(1.05);
}

.chatbot-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chatbot-input button i {
    color: white;
    font-size: 1rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.quick-action {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action:hover {
    border-color: #c3151c;
    color: #c3151c;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .chatbot-button {
        bottom: 16px;
        left: 16px;
        width: 54px;
        height: 54px;
    }
}