/* CODE-Art.nl site-wide placeholder chat assistant. No external provider is loaded. */
.codeart-chat {
    --chat-green: #25d366;
    --chat-green-dark: #075e54;
    --chat-green-deep: #054c44;
    --chat-paper: #efeae2;
    --chat-ink: #17211d;
    --chat-muted: #66736d;
    position: fixed;
    z-index: 99990;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    font: inherit;
}

.codeart-chat *,
.codeart-chat *::before,
.codeart-chat *::after {
    box-sizing: border-box;
}

.codeart-chat__launcher {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    min-height: 64px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .22));
}

.codeart-chat__launcher-label {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(7, 94, 84, .96);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease;
}

.codeart-chat__launcher-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 50%;
    background: var(--chat-green);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 10px 30px rgba(7, 94, 84, .3);
    transition: transform .18s ease, box-shadow .18s ease;
}

.codeart-chat__launcher-icon::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 4px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--chat-green-dark);
}

.codeart-chat__launcher svg {
    width: 34px;
    height: 34px;
    fill: #fff;
}

.codeart-chat__launcher:hover .codeart-chat__launcher-icon,
.codeart-chat__launcher:focus-visible .codeart-chat__launcher-icon {
    transform: translateY(-2px) scale(1.025);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 15px 34px rgba(7, 94, 84, .38);
}

.codeart-chat__launcher:hover .codeart-chat__launcher-label,
.codeart-chat__launcher:focus-visible .codeart-chat__launcher-label {
    transform: translateY(-1px);
    background: var(--chat-green-dark);
}

.codeart-chat__launcher:focus-visible,
.codeart-chat__close:focus-visible,
.codeart-chat__action:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .45);
    outline-offset: 3px;
}

.codeart-chat__panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    display: flex;
    flex-direction: column;
    width: min(382px, calc(100vw - 24px));
    max-height: min(640px, calc(100vh - 118px));
    overflow: hidden;
    border: 1px solid rgba(7, 94, 84, .28);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
    transform-origin: bottom right;
    animation: codeart-chat-in .2s ease both;
}

.codeart-chat__panel[hidden] {
    display: none;
}

@keyframes codeart-chat-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.codeart-chat__header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 38px;
    gap: 11px;
    align-items: center;
    min-height: 76px;
    padding: 12px 12px 12px 14px;
    background: linear-gradient(135deg, var(--chat-green-dark), var(--chat-green-deep));
    color: #fff;
}

.codeart-chat__avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
}

.codeart-chat__avatar svg {
    width: 31px;
    height: 31px;
}

.codeart-chat__avatar svg path:first-child {
    fill: var(--chat-green);
}

.codeart-chat__avatar svg path:last-child {
    fill: #fff;
}

.codeart-chat__heading {
    min-width: 0;
}

.codeart-chat__heading strong,
.codeart-chat__heading span {
    display: block;
}

.codeart-chat__heading strong {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.codeart-chat__heading span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.codeart-chat__heading i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: #ffd15c;
}

.codeart-chat__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.codeart-chat__close:hover {
    background: rgba(255, 255, 255, .2);
}

.codeart-chat__conversation {
    position: relative;
    flex: 1 1 auto;
    min-height: 320px;
    overflow-y: auto;
    padding: 17px 15px 18px;
    background:
        radial-gradient(circle at 20% 15%, rgba(7, 94, 84, .035) 0 2px, transparent 2.5px) 0 0 / 31px 31px,
        radial-gradient(circle at 76% 72%, rgba(7, 94, 84, .03) 0 2px, transparent 2.5px) 0 0 / 37px 37px,
        var(--chat-paper);
    color: var(--chat-ink);
}

.codeart-chat__date {
    width: max-content;
    margin: 0 auto 13px;
    padding: 5px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    color: #6f7c76;
    font-size: 11px;
    font-weight: 750;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.codeart-chat__message {
    position: relative;
    width: min(92%, 315px);
    margin: 0 0 16px;
    padding: 12px 13px 20px;
    border-radius: 0 10px 10px 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.codeart-chat__message::before {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    border-top: 9px solid #fff;
    border-left: 9px solid transparent;
}

.codeart-chat__message p {
    margin: 0 0 9px;
    color: #28322e;
    font-size: 14px;
    line-height: 1.5;
}

.codeart-chat__message p:last-of-type {
    margin-bottom: 0;
}

.codeart-chat__message time {
    position: absolute;
    right: 8px;
    bottom: 5px;
    color: #89938f;
    font-size: 10px;
}

.codeart-chat__actions {
    display: grid;
    gap: 8px;
}

.codeart-chat__action {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid rgba(7, 94, 84, .17);
    border-radius: 10px;
    background: rgba(255, 255, 255, .88);
    color: #185449;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.codeart-chat__action span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e5f7eb;
    color: var(--chat-green-dark);
    font-size: 14px;
}

.codeart-chat__action:hover {
    transform: translateY(-1px);
    border-color: rgba(7, 94, 84, .34);
    background: #fff;
}

.codeart-chat__action--whatsapp {
    border-color: transparent;
    background: var(--chat-green);
    color: #073d2b;
}

.codeart-chat__action--whatsapp span {
    background: rgba(255, 255, 255, .72);
}

.codeart-chat__action--whatsapp:hover {
    background: #20c55e;
}

.codeart-chat__composer {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 7px;
    align-items: center;
    min-height: 64px;
    padding: 9px 10px;
    border-top: 1px solid #e6e6e6;
    background: #f6f6f6;
}

.codeart-chat__composer button,
.codeart-chat__composer input {
    border: 0;
}

.codeart-chat__composer button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: #a0aaa6;
    font-size: 23px;
}

.codeart-chat__composer input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #7b8681;
    font-size: 13px;
}

.codeart-chat__composer input:disabled {
    opacity: 1;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .codeart-chat {
        right: 12px;
        bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .codeart-chat__launcher-label {
        display: none;
    }

    .codeart-chat__launcher-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .codeart-chat__panel {
        position: fixed;
        right: 10px;
        bottom: calc(148px + env(safe-area-inset-bottom));
        width: calc(100vw - 20px);
        max-height: min(610px, calc(100svh - 172px));
        border-radius: 14px;
    }

    .codeart-chat__conversation {
        min-height: 265px;
    }
}

@media (max-width: 390px) {
    .codeart-chat__panel {
        right: 6px;
        width: calc(100vw - 12px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .codeart-chat__panel {
        animation: none;
    }
    .codeart-chat__launcher-icon,
    .codeart-chat__launcher-label,
    .codeart-chat__action {
        transition: none;
    }
}
