.vincens-mooly-launcher {
    position: fixed;
    z-index: 9998;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: grid;
    width: 76px;
    height: 76px;
    padding: 0;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 22px rgb(20 23 28 / 22%);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px) scale(.96);
    transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease;
}

.vincens-mooly-launcher.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.vincens-product-sticky-launcher {
    right: max(18px, env(safe-area-inset-right));
    left: auto;
    pointer-events: none;
}

.vincens-product-sticky-launcher.is-visible {
    pointer-events: auto;
}

.vincens-product-sticky-launcher .vincens-product-chat__avatar {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    flex: 0 0 auto;
}

.vincens-mooly-launcher:hover,
.vincens-mooly-launcher:focus-visible {
    box-shadow: 0 8px 28px rgb(20 23 28 / 28%);
    transform: translateY(-2px) scale(1.02);
}

.vincens-mooly-launcher:focus-visible,
.vincens-mooly-product-trigger__button:focus-visible {
    outline: 3px solid var(--accent-primary, #bd9656);
    outline-offset: 4px;
}

.vincens-mooly-avatar {
    position: relative;
    display: inline-grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: inherit;
    background: #f2eadc;
    box-shadow: 0 0 0 3px #2878ff, 0 0 0 5px rgb(40 120 255 / 16%);
}

.vincens-mooly-avatar img,
.vincens-mooly-avatar-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    overflow: hidden;
    border-radius: inherit;
    object-fit: cover;
}

.vincens-mooly-avatar-placeholder {
    color: #8f6e3a;
}

.vincens-mooly-avatar-placeholder svg {
    width: 48%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.vincens-mooly-online {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 15px;
    height: 15px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #28b463;
    box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
}

.vincens-mooly-product-trigger {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 12px auto 18px;
    text-align: center;
}

.vincens-mooly-product-trigger__button {
    display: flex;
    max-width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.vincens-mooly-product-trigger .vincens-mooly-avatar {
    width: 62px;
    height: 62px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgb(24 24 24 / 18%);
}

.vincens-mooly-product-trigger .vincens-mooly-online {
    right: 0;
    bottom: 0;
    width: 13px;
    height: 13px;
}

.vincens-mooly-product-trigger__label {
    color: var(--accent-primary, #9d793e);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .vincens-mooly-launcher {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 66px;
        height: 66px;
    }

    .vincens-product-sticky-launcher {
        right: max(14px, env(safe-area-inset-right));
        left: auto;
        bottom: max(14px, env(safe-area-inset-bottom));
    }

    .vincens-mooly-online {
        width: 14px;
        height: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vincens-mooly-launcher {
        transition: none;
    }
}

/* Vincens header around the cross-origin Chatwoot/Mooly conversation iframe. */
#cw-widget-holder.vincens-mooly-chat-shell {
    --vincens-chat-brown: #8b6b4a;
    --vincens-chat-cream: #fffaf2;
    --vincens-chat-cream-deep: #f1e5d2;
    --vincens-mooly-chat-shell-header-height: 82px;
    width: min(430px, calc(100vw - 24px)) !important;
    height: min(700px, calc(100vh - 32px)) !important;
    overflow: hidden !important;
    border: 1px solid rgb(139 107 74 / 22%) !important;
    border-radius: 24px !important;
    background: var(--vincens-chat-cream) !important;
    box-shadow: 0 12px 42px rgb(62 44 35 / 22%);
}

#cw-widget-holder.vincens-mooly-chat-shell > #chatwoot_live_chat_widget {
    position: absolute !important;
    z-index: 1 !important;
    top: -28px !important;
    right: 0 !important;
    bottom: auto !important;
    left: -16px !important;
    width: calc(100% + 32px) !important;
    height: calc(100% + 28px) !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 22px !important;
}

#cw-widget-holder.vincens-mooly-chat-shell .vincens-mooly-chat-shell__header {
    position: absolute;
    z-index: 5;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    box-sizing: border-box;
    height: var(--vincens-mooly-chat-shell-header-height);
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 2px solid #d7b985;
    border-radius: 23px 23px 0 0;
    background: linear-gradient(180deg, #9a7957 0%, var(--vincens-chat-brown) 100%);
    box-shadow: 0 2px 8px rgb(62 44 35 / 18%);
    color: var(--vincens-chat-cream);
    font-family: inherit;
}

#cw-widget-holder.woot--hide .vincens-mooly-chat-shell__header {
    display: none;
}

.vincens-mooly-chat-shell__avatar {
    position: relative;
    display: inline-grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border: 2px solid #e6d0aa;
    border-radius: 50%;
    background: var(--vincens-chat-cream-deep);
    color: var(--vincens-chat-brown);
    font-size: 18px;
    font-weight: 700;
}

.vincens-mooly-chat-shell__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.vincens-mooly-chat-shell__active-dot {
    position: absolute;
    right: -1px;
    bottom: 0;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #27ae60;
}

.vincens-mooly-chat-shell__identity {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}

.vincens-mooly-chat-shell__name {
    overflow: hidden;
    color: var(--vincens-chat-cream);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vincens-mooly-chat-shell__status {
    color: #f4e8d7;
    font-size: 14px;
    line-height: 1.25;
}

.vincens-mooly-chat-shell__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.vincens-mooly-chat-shell__action {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--vincens-chat-cream);
    cursor: pointer;
    text-decoration: none;
}

.vincens-mooly-chat-shell__action:hover,
.vincens-mooly-chat-shell__action:focus-visible {
    background: rgb(255 250 242 / 16%);
    outline: none;
}

.vincens-mooly-chat-shell__action[href] {
    width: 40px;
    height: 40px;
    background: var(--vincens-chat-cream-deep);
    color: #5c422e;
}

.vincens-mooly-chat-shell__action[href]:hover,
.vincens-mooly-chat-shell__action[href]:focus-visible {
    background: #f7eddc;
}

.vincens-mooly-chat-shell__action svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

@media (max-width: 600px) {
    html.vincens-mooly-chat-is-open,
    html.vincens-mooly-chat-is-open body {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    #cw-widget-holder.vincens-mooly-chat-shell {
        position: fixed !important;
        z-index: 1000000 !important;
        top: var(--vincens-mobile-chat-top, 0px) !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        height: var(--vincens-mobile-chat-height, 100vh) !important;
        height: var(--vincens-mobile-chat-height, 100dvh) !important;
        min-height: var(--vincens-mobile-chat-height, 100vh) !important;
        min-height: var(--vincens-mobile-chat-height, 100dvh) !important;
        max-height: none !important;
        margin: 0 !important;
        transform: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: var(--vincens-chat-cream) !important;
        box-shadow: none !important;
    }

    #cw-widget-holder.vincens-mooly-chat-shell > #chatwoot_live_chat_widget {
        left: -6px !important;
        width: calc(100% + 12px) !important;
        border-radius: 0 !important;
    }

    #cw-widget-holder.vincens-mooly-chat-shell .vincens-mooly-chat-shell__header {
        height: calc(var(--vincens-mooly-chat-shell-header-height) + env(safe-area-inset-top));
        padding-top: calc(12px + env(safe-area-inset-top));
        border-radius: 0;
    }
}

