/*
 * Local, privacy-first placeholder for the Fengo chat widget.
 * The remote widget is loaded only after an explicit user activation.
 */
.fengo-chat-launcher {
    --fengo-chat-color: #2563eb;
    position: fixed;
    right: 30px;
    bottom: 150px;
    z-index: 10000;
    display: flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    color: #fff;
    background: var(--fengo-chat-color);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 12px #999;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.fengo-chat-launcher[data-theme="agencja"] {
    --fengo-chat-color: #40405a;
}

.fengo-chat-launcher[data-theme="biuro"] {
    --fengo-chat-color: #2563eb;
}

.fengo-chat-launcher[data-theme="obsluga"] {
    --fengo-chat-color: #f58220;
}

.fengo-chat-launcher[hidden] {
    display: none !important;
}

.fengo-chat-launcher svg {
    display: block;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
}

.fengo-chat-launcher__hover-icon {
    display: none !important;
    color: var(--fengo-chat-color);
}

.fengo-chat-launcher:hover,
.fengo-chat-launcher:focus-visible,
.fengo-chat-launcher.is-loading {
    background: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.fengo-chat-launcher:hover .fengo-chat-launcher__normal-icon,
.fengo-chat-launcher:focus-visible .fengo-chat-launcher__normal-icon,
.fengo-chat-launcher.is-loading .fengo-chat-launcher__normal-icon {
    display: none;
}

.fengo-chat-launcher:hover .fengo-chat-launcher__hover-icon,
.fengo-chat-launcher:focus-visible .fengo-chat-launcher__hover-icon,
.fengo-chat-launcher.is-loading .fengo-chat-launcher__hover-icon {
    display: block !important;
}

.fengo-chat-launcher:focus-visible,
#fengo-chat-launcher[role="button"]:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.fengo-chat-launcher[aria-disabled="true"] {
    cursor: wait;
}

.fengo-chat-launcher.is-loading {
    z-index: 10002;
}

.fengo-chat-launcher__badge {
    position: absolute;
    top: -5px;
    right: 0;
    z-index: 2;
    display: flex;
    width: 18px;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: linear-gradient(90deg, #22c55e 50%, #3b82f6 50%);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
    transition: all 0.3s ease;
}

.fengo-chat-launcher__dot {
    animation: fengo-chat-dot 1.2s infinite;
}

.fengo-chat-launcher__dot--2 {
    animation-delay: 0.2s;
}

.fengo-chat-launcher__dot--3 {
    animation-delay: 0.4s;
}

.fengo-chat-launcher__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fengo-chat-dot {
    0%,
    80%,
    100% {
        opacity: 1;
        r: 8;
    }

    40% {
        opacity: 0.6;
        r: 13;
    }
}

@media (max-width: 480px) {
    .fengo-chat-launcher {
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fengo-chat-launcher,
    .fengo-chat-launcher__badge {
        transition: none;
    }

    .fengo-chat-launcher__dot {
        animation: none;
    }
}
