/* AI Chatbot Styles */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #d4521f 0%, #8b4513 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 82, 31, 0.5);
    z-index: 9999;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(212, 82, 31, 0.6);
}

.chatbot-toggle-icon {
    font-size: 2rem;
    color: white;
}

.chatbot-toggle-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffa500;
    color: #1a1a1a;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.chatbot-container {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 550px;
    max-width: calc(100vw - 60px);
    height: 700px;
    max-height: calc(100vh - 180px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #d4521f 0%, #8b4513 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-title {
    flex: 1;
}

.chatbot-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.chatbot-title p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ffa500;
    border-radius: 3px;
}

.chatbot-message {
    display: flex;
    gap: 0.8rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chatbot-message.bot .message-avatar {
    background: linear-gradient(135deg, #d4521f, #8b4513);
    color: white;
}

.chatbot-message.user .message-avatar {
    background: #ffa500;
    color: #1a1a1a;
}

.message-content {
    max-width: 75%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chatbot-message.bot .message-content {
    background: #f5f5f5;
    color: #333;
    border-bottom-left-radius: 3px;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, #d4521f, #8b4513);
    color: white;
    border-bottom-right-radius: 3px;
}

.message-content p {
    margin: 0;
}

.message-content ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
}

.message-content li {
    margin: 0.3rem 0;
}

.chatbot-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.8rem;
    background: white;
}

.chatbot-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: border 0.3s;
    outline: none;
}

.chatbot-input:focus {
    border-color: #ffa500;
}

.chatbot-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #d4521f, #8b4513);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chatbot-send:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(212, 82, 31, 0.4);
}

.chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quick-replies {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem 1rem 1rem;
}

.quick-reply-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

.quick-reply-btn:hover {
    background: #ffa500;
    border-color: #ffa500;
    color: #1a1a1a;
}

.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.8rem 1rem;
    background: #f5f5f5;
    border-radius: 15px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

/* Tablet */
@media (max-width: 768px) {
    .chatbot-toggle {
        width: 54px;
        height: 54px;
        bottom: 18px;
        right: 14px;
    }
    .chatbot-toggle-icon { font-size: 1.4rem; }
    .chatbot-container {
        bottom: 84px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: calc(100vw - 16px);
        height: 68vh;
        max-height: calc(100vh - 110px);
        border-radius: 16px;
    }
    .chatbot-header { padding: 0.9rem 1rem; }
    .chatbot-avatar { width: 36px; height: 36px; font-size: 1.2rem; }
    .chatbot-title h3 { font-size: 0.95rem; }
    .chatbot-title p { font-size: 0.72rem; }
    .chatbot-messages { padding: 0.8rem; gap: 0.7rem; }
    .message-content { font-size: 0.88rem; padding: 0.6rem 0.8rem; max-width: 80%; }
    .message-avatar { width: 28px; height: 28px; font-size: 0.85rem; }
    .chatbot-input-area { padding: 0.6rem 0.8rem; gap: 0.5rem; box-sizing: border-box; width: 100%; }
    .chatbot-input { padding: 0.6rem 0.8rem; font-size: 0.88rem; min-width: 0; }
    .chatbot-send { width: 38px; height: 38px; font-size: 1rem; flex-shrink: 0; }
    .quick-replies { padding: 0 0.8rem 0.8rem; gap: 0.4rem; }
    .quick-reply-btn { font-size: 0.78rem; padding: 0.4rem 0.7rem; }
}

/* Small phones */
@media (max-width: 480px) {
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 14px;
        right: 12px;
    }
    .chatbot-toggle-icon { font-size: 1.3rem; }
    .chatbot-container {
        bottom: 76px;
        right: 6px;
        left: 6px;
        max-width: calc(100vw - 12px);
        height: 65vh;
    }
    .chatbot-input-area { padding: 0.5rem 0.6rem; gap: 0.4rem; }
    .chatbot-input { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
    .chatbot-send { width: 34px; height: 34px; font-size: 0.9rem; }
}
