/* OUTFIZ Chatbot Trigger Button */
.chatbot-trigger {
    animation: outfiz-chatbot-pulse 2s infinite;
    transition: all 0.3s ease !important;
}

@keyframes outfiz-chatbot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(252, 52, 65, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(252, 52, 65, 0); }
    100% { box-shadow: 0 0 0 0 rgba(252, 52, 65, 0); }
}

/* OUTFIZ Chatbot Popup */
.chatbot-popup {
    position: fixed;
    bottom: 20px;
    right: 30px;
    left: 20px;
    z-index: 9999;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chatbot-window {
    display: flex;
    position: absolute;
    bottom: 130px;
    right: 80px;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.chatbot-window.minimized {
    height: 70px;
    overflow: hidden;
}

.chatbot-window.minimized .chatbot-messages,
.chatbot-window.minimized .chatbot-typing,
.chatbot-window.minimized .chatbot-input {
    display: none;
}

.chatbot-header {
    background: linear-gradient(135deg, #fc3441, #ff6600);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 2px 10px rgba(252, 52, 65, 0.2);
}

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

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
}

.chatbot-header-info p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #FFFFFF;
    opacity: 0.9;
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
}

.chatbot-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.chatbot-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.chatbot-btn.close:hover {
    background: rgba(255, 71, 87, 0.8);
}

.chatbot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #fc3441;
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 100%;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #fc3441;
    box-shadow: 0 2px 8px rgba(252, 52, 65, 0.1);
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #fc3441, #ff6600);
}

.user-message .message-avatar svg {
    fill: white;
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.message-text {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    background: white;
    border: 1px solid #f0f0f0;
}

.user-message .message-text {
    background: linear-gradient(135deg, #fc3441, #ff6600);
    color: white;
    border: none;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    text-align: right;
    padding: 0 4px;
}

.user-message .message-time {
    text-align: left;
}

.chatbot-typing {
    display: flex;
    gap: 12px;
    padding: 0 24px 20px;
    align-items: center;
}

.typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fc3441;
    box-shadow: 0 2px 8px rgba(252, 52, 65, 0.1);
}

.typing-content {
    background: white;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fc3441;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.chatbot-input {
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.input-wrapper input:focus {
    border-color: #fc3441;
    background: white;
    box-shadow: 0 0 0 3px rgba(252, 52, 65, 0.1);
}

.input-wrapper input::placeholder {
    color: #999;
}

.send-btn {
    background: linear-gradient(135deg, #fc3441, #ff6600);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(252, 52, 65, 0.3);
}

.send-btn:hover {
    background: linear-gradient(135deg, #ff0112, #e55100);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(252, 52, 65, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        bottom: 80px;
        height: calc(100vh - 160px);
        max-height: 500px;
    }
    
    .chatbot-messages {
        padding: 16px;
    }
    
    .chatbot-input {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .chatbot-window {
        width: 340px;
    }
}