/* AI Chatbot Widget Styles */


/* Floating Button */

.chatbot-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(46, 65%, 52%) 0%, #b8860b 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    animation: chatbot-bounce 2s ease-in-out infinite;
}

.chatbot-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.chatbot-floating-btn.hide {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

@keyframes chatbot-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.chatbot-badge {
    display: none;
}

@keyframes chatbot-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}


/* Chat Window */

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.chatbot-window.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}


/* Header */

.chatbot-header {
    background: linear-gradient(135deg, hsl(46, 65%, 52%) 0%, #b8860b 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-left i {
    font-size: 24px;
}

.chatbot-header-left h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.chatbot-header-right {
    display: flex;
    gap: 8px;
}

.chatbot-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* Quick Buttons */

.chatbot-quick-buttons {
    padding: 12px 15px;
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
}

.chatbot-quick-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    color: #333;
}

.chatbot-quick-btn:hover {
    background: #d4b91e;
    color: white;
    border-color: #eaa166;
    transform: translateY(-1px);
}


/* Messages Area */

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    animation: chatbot-message-in 0.3s ease-out;
}

@keyframes chatbot-message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(46, 65%, 52%) 0%, #b8860b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chatbot-message.user .message-avatar {
    background: linear-gradient(135deg, hsl(46, 65%, 52%) 0%, #b8860b 100%);
}

.message-content {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message.user .message-content {
    background: linear-gradient(135deg, hsl(46, 65%, 52%) 0%, #b8860b 100%);
    color: white;
}


/* Typing Indicator */

.chatbot-typing {
    display: none;
    gap: 10px;
}

.typing-indicator {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: chatbot-typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-typing-bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}


/* Input Area */

.chatbot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    border-radius: 0 0 20px 20px;
}

#chatbot-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Settings Modal */

.chatbot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: chatbot-fade-in 0.2s;
}

.chatbot-modal.show {
    display: flex;
}

@keyframes chatbot-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chatbot-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: chatbot-scale-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes chatbot-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chatbot-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.chatbot-modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #667eea;
}

.chatbot-save-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-info-box {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.chatbot-info-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.chatbot-info-box a:hover {
    text-decoration: underline;
}

.chatbot-info-box strong {
    color: #667eea;
}


/* Scrollbar */

.chatbot-messages::-webkit-scrollbar,
.chatbot-modal-content::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track,
.chatbot-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb,
.chatbot-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover,
.chatbot-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}


/* Mobile Responsive */

@media (max-width: 768px) {
    .chatbot-floating-btn {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
    }
    .message-content {
        max-width: 80%;
    }
    .chatbot-modal-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .chatbot-floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 15px;
        border-radius: 15px;
    }
    .chatbot-header {
        padding: 12px 15px;
    }
    .chatbot-header-left h3 {
        font-size: 14px;
    }
    .message-content {
        font-size: 13px;
        max-width: 85%;
    }
}