﻿/* Button waarmee chatscherm opgeroepen wordt */
#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: visible;
}

    /* --- Ringen --- */
    #chat-toggle::before,
    #chat-toggle::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        /* border: 2px solid rgba(13, 110, 253, 0.4);*/ /* blauwe ring */
        /*border: 2px solid rgba(200, 200, 200, 0.6); *//* lichtgrijs */
        border: 2px solid rgba(255, 255, 255, 0.6); /* wit met lichte transparantie */

        width: 54px;
        height: 54px;
        pointer-events: none;
    }

    /* Buitenste ring */
    #chat-toggle::before {
        border-top-color: transparent;
        animation: spin-cw 4s ease-in-out infinite;
    }

    /* Binnenste ring */
    #chat-toggle::after {
        border-bottom-color: transparent;
        animation: spin-ccw 4s ease-in-out infinite;
    }

/* --- Animaties rondom ChatToggle --- */
@keyframes spin-cw {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spin-ccw {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* Shake tekstvak (bij geen invoer) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-6px);
    }

    40%, 80% {
        transform: translateX(6px);
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* Alleen op desktop: plaats de chat rechtsonder */
@media (min-width: 577px) {
    #chatModal {
        padding: 0 !important; /* verwijder standaard Bootstrap-padding */
    }

        #chatModal .modal-dialog {
            position: fixed;
            bottom: 20px;
            right: 20px;
            margin: 0;
            width: 380px;
            height: 440px; /* vaste hoogte */
            max-width: 90%;
        }

        #chatModal .modal-content {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        #chatModal .modal-body {
            flex: 1 1 auto;
            overflow-y: auto;
        }

}

/* Typing indicator (drie stipjes) */
#typing-indicator {
    margin-bottom: 0.5rem;
    text-align: start;
}

    #typing-indicator > div {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 6px 10px;
        border-radius: 1rem;
        background-color: #e9f3ff;
        color: #0d6efd;
        font-size: 0.9rem;
    }

    #typing-indicator .dot {
        width: 6px;
        height: 6px;
        background-color: #0d6efd;
        border-radius: 50%;
        animation: blink 1.4s infinite both;
    }

        #typing-indicator .dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        #typing-indicator .dot:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}


