/* Chatbot Styling System */

/* Floating Launcher Button */
.chatbot-launcher {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #33d1cb 0%, #1fa19c 100%);
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(51, 209, 203, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #ffffff;
}

.chatbot-launcher:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 35px rgba(51, 209, 203, 0.6);
}

.chatbot-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chatbot-launcher.active .chatbot-launcher-icon {
    transform: rotate(90deg);
}

/* Launcher Pulse Effect */
.chatbot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    animation: chatbot-pulse-anim 2s infinite;
}

@keyframes chatbot-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Chatbot Window Container */
.chatbot-window {
    position: fixed;
    bottom: 185px;
    right: 30px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 220px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
}

.chatbot-window.chatbot-hidden {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    pointer-events: none;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, #052e3b 0%, #1a4f5e 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.chatbot-avatar {
    position: relative;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #33d1cb;
    font-size: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.chatbot-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border: 2px solid #052e3b;
    border-radius: 50%;
}

.chatbot-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.chatbot-subtitle {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #a5d8d8;
    line-height: 1.2;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Chat Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f7f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

/* Message Bubbles */
.chatbot-msg-row {
    display: flex;
    width: 100%;
}

.chatbot-msg-row.bot {
    justify-content: flex-start;
}

.chatbot-msg-row.user {
    justify-content: flex-end;
}

.chatbot-msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: chatbot-fade-in 0.3s ease;
}

.chatbot-msg-row.bot .chatbot-msg-bubble {
    background: #ffffff;
    color: #333333;
    border-top-left-radius: 4px;
    border: 1px solid #eef2f3;
}

.chatbot-msg-row.user .chatbot-msg-bubble {
    background: linear-gradient(135deg, #33d1cb 0%, #1fa19c 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
}

/* Styled Hyperlinks inside messages */
.chatbot-msg-bubble a {
    color: #052e3b;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-msg-row.user a {
    color: #ffffff;
}

/* Options / Quick Action Buttons */
.chatbot-options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 5px;
    width: 100%;
}

.chatbot-option-btn {
    background: #ffffff;
    border: 1.5px solid #33d1cb;
    color: #052e3b;
    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 550;
    text-align: left;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(51, 209, 203, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-option-btn:hover {
    background: #33d1cb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(51, 209, 203, 0.25);
}

.chatbot-option-btn i {
    font-size: 16px;
    opacity: 0.8;
}

/* Query Form Fields */
.chatbot-query-form {
    background: #ffffff;
    border: 1px solid #eef2f3;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chatbot-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatbot-form-label {
    font-size: 11px;
    font-weight: 600;
    color: #052e3b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chatbot-form-input {
    border: 1.5px solid #dce4e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fafbfc;
}

.chatbot-form-input:focus {
    border-color: #33d1cb;
    background: #ffffff;
}

.chatbot-form-input.textarea {
    resize: none;
    height: 60px;
}

.chatbot-form-submit {
    background: linear-gradient(135deg, #33d1cb 0%, #052e3b 100%);
    border: none;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.chatbot-form-submit:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.chatbot-form-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Typing Indicators */
.chatbot-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
}

.chatbot-typing-dot {
    width: 7px;
    height: 7px;
    background-color: #7f8c8d;
    border-radius: 50%;
    animation: chatbot-bounce 1.4s infinite ease-in-out both;
}

.chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes chatbot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes chatbot-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Area Container */
.chatbot-input-container {
    padding: 12px 16px;
    border-top: 1px solid #eef2f3;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
}

.chatbot-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333333;
    padding: 8px 0;
}

.chatbot-input-field::placeholder {
    color: #aaa;
}

.chatbot-send-btn {
    background: transparent;
    border: none;
    color: #33d1cb;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.chatbot-send-btn:hover {
    color: #052e3b;
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .chatbot-window {
        bottom: 175px;
        right: 15px;
        left: 15px;
        width: auto;
        height: 480px;
        max-height: calc(100vh - 195px);
        border-radius: 20px;
        box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    }
    .chatbot-window.chatbot-hidden {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    .chatbot-launcher {
        bottom: 95px;
        right: 20px;
        width: 65px;
        height: 65px;
    }
}

/* Custom Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
