/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Roboto', sans-serif;
}

.chatbot-toggle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #232633;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all .2s ease;
    margin: 5px;
}

.chatbot-toggle:hover {
    transform: scale(1.15);
    background-color: #008aff;

}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #e8e8e8;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    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 {
    padding: 16px 20px;
    background: #222329;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    color: white;
    font-weight: 300;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.chatbot-close-btn:hover {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #e8e8e8;
}

.chatbot-message {
    margin-bottom: 20px;
    display: flex;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: #1E90FF;
    color: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: white;
    color: #333;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-input-container {
    padding: 20px;
    background: #e8e8e8;
    border-top: none;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    resize: none;
    max-height: 100px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-input:focus {
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chatbot-send-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #222329;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    background: #1a252f;
    transform: scale(1.05);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    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% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: 450px;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
}

/* Chatbot Form Styles */
.chatbot-form-container {
    background: white !important;
    color: #333 !important;
    padding: 0 !important;
    max-width: 90% !important;
}

.chatbot-form {
    padding: 20px;
}

.chatbot-form h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: #222329;
}

.chatbot-form input,
.chatbot-form textarea,
.chatbot-form select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.chatbot-form input:focus,
.chatbot-form textarea:focus,
.chatbot-form select:focus {
    outline: none;
    border-color: #1E90FF;
}

.chatbot-form select {
    background-color: white;
    cursor: pointer;
}

.chatbot-form textarea {
    resize: vertical;
    min-height: 60px;
}

.chatbot-form button {
    padding: 14px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    width: calc(50% - 7px);
    margin-right: 8px;
}

.chatbot-form button:last-child {
    margin-right: 0;
}

.chatbot-form-submit {
    background: #363943;
    color: white;
}

.chatbot-form-submit:hover:not(:disabled) {
    background: #007bff;
}

.chatbot-form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chatbot-form-cancel {
    background: #efefef;
    color: #080808;
}

.chatbot-form-cancel:hover {
    background: #007bff;
    color: white;
}

/* Mobile scroll behavior - hide initially on screens below 600px */
@media (max-width: 600px) {
    .chatbot-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }
    
    .chatbot-widget.scroll-visible .chatbot-toggle {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}
