/* ============================================================
   CHATBOT OVERLAY COMPONENT
   ============================================================ */

:root {
    --chat-button-size: 3.125rem;
    --chat-button-color: #fba616;
    --chat-border-color: #3383bb;
    --chat-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* ── Overlay (semi-transparent achtergrond) ────────────────── */
[id$="-overlay"] {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: none;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.3);
}

/* ── Widget (iframe container) ─────────────────────────────── */
[id$="-widget"] {
    position: fixed;
    bottom: 5rem;
    right: 1.25rem;
    width: 18.25rem;
    height: 23.3125rem;
    display: none;
    background: white;
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: var(--chat-shadow);
    pointer-events: auto;
    border: 0.125rem solid var(--chat-border-color);
    z-index: 3;
}

[id$="-iframe"] {
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Bubble button ────────────────────────────────────────── */
.chatbot-bubble {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    height: var(--chat-button-size);
    background-color: var(--chat-button-color);
    border-radius: 1.5625rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: white;
    box-shadow: var(--chat-shadow);
    z-index: 3;
    user-select: none;
    padding: 0;
    transition: all 0.3s ease;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: none;
    gap: 0;
}

.chatbot-bubble__text {
    white-space: nowrap;
    font-size: 1rem;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-right: 0.625rem;
    display: none;
    font-weight: 500;
}

.chatbot-bubble__icon {
    width: var(--chat-button-size);
    height: var(--chat-button-size);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-bubble__icon svg {
    width: 25px;
    height: 20px;
}

/* ── Bubble extended state ─────────────────────────────────── */
.chatbot-bubble.chatbot-bubble--extended .chatbot-bubble__text {
    opacity: 1;
    max-width: 12.5rem;
    display: block;
}

.chatbot-bubble.chatbot-bubble--extended {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ── Desktop hover state ───────────────────────────────────── */
@media (min-width: 43.75em) {
    .chatbot-bubble:hover {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .chatbot-bubble:hover .chatbot-bubble__text {
        opacity: 1;
        max-width: 12.5rem;
        display: block;
    }
}

/* ── Mobile adjustments ────────────────────────────────────── */
@media (max-width: 43.75em) {
    [id$="-widget"] {
        width: calc(100% - 2.5rem);
        height: calc(100% - 8.75rem);
        bottom: 4.375rem;
        right: 1.25rem;
        left: 1.25rem;
    }

    .chatbot-bubble {
        height: 2.5rem;
        width: 2.5rem;
    }

    .chatbot-bubble__icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .chatbot-bubble__icon svg {
        width: 20px;
        height: 16px;
    }
}

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

[id$="-widget"] {
    animation: chatbot-fade-in 0.3s ease-out;
}