#vikivik-widget {
    position: fixed !important;
    left: auto !important;
    top: auto !important;
    right: max(18px, env(safe-area-inset-right)) !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    z-index: 2147483000;
}

.ede-chat-visible .floating-actions {
    margin-bottom: calc(var(--ede-chat-height) + max(16px, env(safe-area-inset-bottom)));
}

/* VikiVik reads its own placement preferences when the iframe becomes ready. */
:host(#vikivik-widget) .panel {
    right: 0 !important;
    left: auto !important;
    top: auto !important;
    bottom: calc(100% + 10px) !important;
    max-width: calc(100vw - 36px);
    max-height: calc(100dvh - var(--ede-chat-height, 58px) - max(18px, env(safe-area-inset-bottom)) - 18px);
}
