

/* Chat Widget Base */
#chat-widget {
    position: fixed;
    bottom: 30px;
    right: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1000;
}

/* Minimized Circle */
#chat-icon {
    --size: 60px;
    /* adjust between 50px–100px */
    width: var(--size);
    height: var(--size);
    background-image: url('../images/icon-white.svg');
    background-size: cover;
    /* fill the circle */
    background-position: center;
    /* center the icon */
    background-repeat: no-repeat;
    border-radius: 50%;
    /* make it a circle */
    position: relative;
    /* for the label positioning */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* move the text below the circle */
#chat-icon span {
    position: absolute;
    top: calc(100% + 2px);
    /* 6px gap below the circle */
    left: 50%;
    transform: translateX(-50%);
    display: block;
    font-size: 1em;
    color: var(--c-charcoal);
    font-weight: bold;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    user-select: none;
    pointer-events: none;
}



/* Toggle visibility */
#chat-widget.collapsed .chat-container {
    display: none;
}

#chat-widget.collapsed #chat-icon {
    display: flex;
}

#chat-widget:not(.collapsed) #chat-icon {
    display: none;
}

/* Expanded Chat Container */
.chat-container {
    width: 360px;
    height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Toolbar */
.chat-toolbar {
    /*background: #0056b3;
    color: #fff;
    */
    /*background: var(--c-sky);*/
    background: linear-gradient(135deg, #0056b3, var(--c-sky));
    color: var(--c-sand);
    padding: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.chat-toolbar button {
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
}

/* Message List */
.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #eef1f5;
}

/* Chat Bubbles */
.bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 20px;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards, bounce 0.5s ease-out;
    font-size: 14px;
    line-height: 1.4;
}

.bubble.user {
    align-self: flex-end;
    background: #d2f8d2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bubble.bot {
    align-self: flex-start;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Typing Indicator */
.bubble.typing {
    opacity: 1;
    animation: none;
    background: transparent;
    box-shadow: none;
    padding: 6px;
    max-width: none;
    display: flex;
    align-self: flex-start;
    gap: 4px;
}

.bubble.typing .dot {
    width: 8px;
    height: 8px;
    background: #bbb;
    border-radius: 50%;
    opacity: 0.3;
    animation: blink 1s infinite ease-in-out;
}

.bubble.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.bubble.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Input Area */
.input-area {
    display: flex;
    border-top: 1px solid #ddd;
    background: #fafafa;
}

#inp {
    flex: 1;
    border: none;
    padding: 16px;
    font-size: 14px;
    outline: none;
}

#inp::placeholder {
    color: #aaa;
}

#send {
    border: none;
    background: linear-gradient(135deg, #0056b3, var(--c-sky));
    color: var(--c-sand);
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

#send:hover {
    filter: brightness(1.1);
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0% {
        transform: translateY(10px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes blink {

    0%,
    80%,
    100% {
        opacity: 0.3;
    }

    40% {
        opacity: 1;
    }
}