/* IAM Smart Chatbot Styles */
:root {
    --iam-blue: #3D5561;
    --iam-orange: #E3A14C;
    --iam-white: #ffffff;
    --iam-light-gray: #f8f9fa;
    --iam-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Floating Action Button */
#iam-chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--iam-orange);
    border-radius: 50%;
    box-shadow: var(--iam-shadow);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#iam-chat-fab:hover {
    transform: scale(1.1);
}

#iam-chat-fab svg {
    width: 30px;
    height: 30px;
    fill: var(--iam-white);
}

/* Chat Window Container */
#iam-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    max-height: 80vh;
    background: var(--iam-white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'DM Sans', sans-serif;
    /* Fallback to sans-serif for body */
}

#iam-chat-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.iam-chat-header {
    background: var(--iam-blue);
    color: var(--iam-white);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iam-chat-header h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
}

.iam-chat-close {
    background: transparent;
    border: none;
    color: var(--iam-white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Messages Area */
#iam-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--iam-light-gray);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message Bubbles */
.iam-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iam-message.bot {
    background: var(--iam-white);
    color: #333;
    border-bottom-left-radius: 4px;
    border: 1px solid #e1e1e1;
}

.iam-message.user {
    background: var(--iam-orange);
    color: var(--iam-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Quick Options (Chips) */
.iam-chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.iam-chat-option {
    background: var(--iam-white);
    border: 1px solid var(--iam-orange);
    color: var(--iam-orange);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.iam-chat-option:hover {
    background: var(--iam-orange);
    color: var(--iam-white);
}

/* Input Area */
.iam-chat-input-area {
    padding: 15px;
    background: var(--iam-white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#iam-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#iam-chat-input:focus {
    border-color: var(--iam-blue);
}

#iam-chat-send {
    background: var(--iam-blue);
    color: var(--iam-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#iam-chat-send:hover {
    transform: scale(1.05);
}

#iam-chat-send svg {
    width: 16px;
    height: 16px;
    fill: var(--iam-white);
    margin-left: 2px;
    /* Visual correction */
}