
/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 8px 25px rgba(0, 212, 255, 0.8); }
    100% { box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4); }
}

.chatbot-icon {
    position: relative;
}

.chat-icon {
    font-size: 24px;
    color: #000;
    font-weight: bold;
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.chatbot-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    border: 1px solid rgba(0, 212, 255, 0.3);
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    color: #000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.status-online {
    font-size: 12px;
    opacity: 0.8;
}

.chatbot-close {
    background: none;
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.chatbot-messages::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 2px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

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

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

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

.message-content {
    background: rgba(0, 212, 255, 0.1);
    padding: 12px 16px;
    border-radius: 18px;
    color: #fff;
    line-height: 1.4;
    max-width: 80%;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.user-message .message-content {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.2);
}

.typing-indicator .message-content {
    padding: 8px 16px;
}

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

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #00d4ff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

.chatbot-quick-actions {
    padding: 15px 20px;
    background: #2a2a2a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-action-btn {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    transform: translateY(-1px);
}

.chatbot-input-area {
    padding: 15px 20px;
    background: #2a2a2a;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 10px 15px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

#chatbot-input::placeholder {
    color: #888;
}

#chatbot-send {
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-popup {
        position: fixed;
        bottom: 80px;
        right: 15px;
        left: 15px;
        width: auto;
        height: 70vh;
        max-height: 500px;
        min-height: 400px;
    }

    .chatbot-toggle {
        width: 55px;
        height: 55px;
    }

    .chat-icon {
        font-size: 22px;
    }

    .message-content {
        max-width: 85%;
        font-size: 14px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
    }

    .quick-action-btn {
        font-size: 11px;
        padding: 8px 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
        flex: 1;
        min-width: 0;
    }

    .chatbot-quick-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .chatbot-header h4 {
        font-size: 14px;
    }

    .status-online {
        font-size: 10px;
    }

    .chatbot-messages {
        padding: 15px;
        gap: 12px;
        max-height: calc(70vh - 200px);
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .chatbot-popup {
        bottom: 70px;
        left: 10px;
        right: 10px;
        height: 75vh;
        max-height: 450px;
        border-radius: 15px;
    }

    .chatbot-messages {
        padding: 12px;
        gap: 10px;
        max-height: calc(75vh - 180px);
    }

    .chatbot-input-area {
        padding: 10px 12px;
    }

    #chatbot-input {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 15px;
    }

    #chatbot-send {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .message-content {
        font-size: 13px;
        padding: 10px 12px;
        max-width: 90%;
        line-height: 1.5;
    }

    .quick-action-btn {
        font-size: 10px;
        padding: 6px 8px;
        max-width: 120px;
        flex: 1;
        min-width: 80px;
    }

    .chatbot-header {
        padding: 10px 12px;
    }

    .chatbot-avatar {
        width: 32px;
        height: 32px;
    }

    .chatbot-header h4 {
        font-size: 13px;
    }

    .status-online {
        font-size: 9px;
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
    }

    .chat-icon {
        font-size: 20px;
    }
}

@media (max-width: 375px) {
    .chatbot-popup {
        bottom: 65px;
        left: 8px;
        right: 8px;
        height: 80vh;
        max-height: 400px;
    }

    .chatbot-messages {
        padding: 10px;
        max-height: calc(80vh - 160px);
    }

    .message-content {
        font-size: 12px;
        padding: 8px 10px;
    }

    .quick-action-btn {
        font-size: 9px;
        padding: 5px 6px;
        max-width: 100px;
        min-width: 70px;
    }

    #chatbot-input {
        font-size: 13px;
        padding: 8px 10px;
    }

    #chatbot-send {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .chatbot-toggle {
        width: 60px;
        height: 60px;
        min-height: 60px;
        min-width: 60px;
        touch-action: manipulation;
    }

    .quick-action-btn {
        min-height: 44px;
        padding: 10px 12px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    #chatbot-send {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    #chatbot-input {
        min-height: 44px;
        touch-action: manipulation;
    }

    .chatbot-close {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .message-content {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .chatbot-popup {
        height: 70vh !important;
        max-height: 500px !important;
    }

    @media (max-width: 480px) {
        .chatbot-popup {
            height: 75vh !important;
            max-height: 450px !important;
        }
    }

    @media (max-width: 375px) {
        .chatbot-popup {
            height: 80vh !important;
            max-height: 400px !important;
        }
    }
}

/* Landscape mode adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .chatbot-popup {
        height: 90vh;
        max-height: 350px;
    }

    .chatbot-messages {
        max-height: calc(90vh - 160px);
    }
}

/* Enhanced visual effects */
.message-content strong {
    color: #00ff88;
}

.message-content br {
    line-height: 1.8;
}

.chatbot-popup {
    backdrop-filter: blur(10px);
}

.quick-action-btn {
    backdrop-filter: blur(5px);
}

/* Animation improvements */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-popup {
    animation: slideUp 0.3s ease;
}
