/* TechnAre Chatbot Styles - Professional Light Theme */

.chatbot-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color, #00b9d2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 185, 210, 0.3);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-btn:hover {
    transform: scale(1.05);
    background-color: color-mix(in srgb, var(--accent-color, #00b9d2), black 10%);
    box-shadow: 0 6px 20px rgba(0, 185, 210, 0.4);
}

.chatbot-btn i {
    font-size: 28px;
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    /* Slightly wider for better reading */
    height: 500px;
    /* Taller */
    background-color: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--accent-color, #00b9d2), #009eb3);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--heading-font, "Poppins", sans-serif);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: 0.2s;
}

.chatbot-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f8fafc;
    scrollbar-width: thin;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 10px;
}

/* Message Bubbles */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    background-color: #ffffff;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #e2e8f0;
}

.message.user {
    background-color: var(--accent-color, #00b9d2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.chatbot-input {
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 12px 16px;
    border-radius: 24px;
    outline: none;
    font-size: 14px;
    transition: 0.3s;
}

.chatbot-input input:focus {
    border-color: var(--accent-color, #00b9d2);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 185, 210, 0.1);
}

.chatbot-input button {
    background-color: var(--accent-color, #00b9d2);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0, 185, 210, 0.2);
}

.chatbot-input button:hover {
    background-color: color-mix(in srgb, var(--accent-color, #00b9d2), black 10%);
    transform: translateY(-2px);
}

.chatbot-input button i {
    font-size: 18px;
    margin-left: 2px;
    /* Visual center adjustment */
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100% - 40px);
        height: calc(100% - 140px);
        right: 20px;
        bottom: 90px;
        left: 20px;
    }
}

/* Chatbot Intro Popup */
.chatbot-intro-popup {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9998;
    max-width: 250px;
    background-color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color, #e2e8f0);
    animation: fadeIn 0.5s ease-out;
    display: none;
    /* Hidden by default, shown by JS */
}

.chatbot-intro-popup.show {
    display: block;
}

.chatbot-intro-popup .chatbot-intro-text {
    font-size: 14px;
    color: #334155;
    position: relative;
    padding-right: 20px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-intro-popup .chatbot-intro-close {
    position: absolute;
    top: -8px;
    right: -10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.chatbot-intro-popup .chatbot-intro-close:hover {
    color: #ef4444;
}

/* Add a small arrow pointing down */
.chatbot-intro-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background-color: white;
    border-right: 1px solid var(--border-color, #e2e8f0);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transform: rotate(45deg);
}