/* Chatbot CSS */

/* Chat Button Container */
.gea-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Floating Button */
.gea-chat-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary, #1e3c72) 0%, var(--color-cta, #e84c04) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gea-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gea-chat-btn i {
    transition: transform 0.3s ease;
}

.gea-chat-btn.active i {
    transform: rotate(180deg);
}

/* Chat Window */
.gea-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gea-chat-window.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Chat Header */
.gea-chat-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gea-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gea-chat-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.gea-chat-header-info span {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gea-chat-header-info span::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

.gea-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.gea-chat-close:hover {
    opacity: 1;
}

/* Chat Messages Area */
.gea-chat-messages {
    flex: 1;
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gea-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeInMessage 0.3s ease forwards;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gea-message.user {
    align-self: flex-end;
    background-color: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

.gea-message.bot {
    align-self: flex-start;
    background-color: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.gea-message.bot p {
    margin-bottom: 8px;
}

.gea-message.bot p:last-child {
    margin-bottom: 0;
}

.gea-message.bot a {
    color: #2563eb;
    text-decoration: underline;
}

.gea-message.bot strong {
    font-weight: 600;
    color: #0f172a;
}

/* Typing Indicator */
.gea-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
}

.gea-typing span {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.gea-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.gea-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Chat Input Area */
.gea-chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.gea-chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.gea-chat-input-area input:focus {
    border-color: #2563eb;
}

.gea-chat-input-area button {
    background: #2563eb;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.gea-chat-input-area button:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.gea-chat-input-area button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .gea-chat-window {
        bottom: 80px;
        right: -10px;
        width: calc(100vw - 40px);
    }
}