.saas-html-mega-item {
    position: relative;
}

.saas-html-mega-panel {
    --saas-mega-shell-gutter: clamp(16px, 2.2vw, 32px);
    --saas-mega-content-width: min(1560px, calc(100vw - (var(--saas-mega-shell-gutter) * 2)));
    position: fixed;
    left: 0;
    top: var(--saas-mega-top, 100%);
    z-index: 99998;
    width: 100vw;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.saas-html-mega-panel-shell {
    background: var(--saas-mega-shell-bg, #ffffff);
    --saas-mega-shell-bottom-bg: var(--saas-mega-shell-bg, #ffffff);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 34px -24px rgba(15, 23, 42, 0.42);
    padding: var(--saas-mega-shell-gap, 0px);
    position: relative;
    overflow: hidden;
}

.saas-html-mega-panel-shell::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--saas-mega-shell-gap, 0px);
    background: var(--saas-mega-shell-bottom-bg, var(--saas-mega-shell-bg, #ffffff));
    pointer-events: none;
}

.saas-html-mega-panel-inner {
    width: min(var(--saas-mega-content-width), calc(100vw - (var(--saas-mega-shell-gutter) * 2) - (var(--saas-mega-shell-gap, 0px) * 2)));
    max-width: calc(100vw - (var(--saas-mega-shell-gutter) * 2) - (var(--saas-mega-shell-gap, 0px) * 2));
    margin-left: auto;
    margin-right: auto;
    padding: clamp(24px, 3vw, 48px) 0 clamp(28px, 3.4vw, 56px);
    position: relative;
    z-index: 1;
}

.saas-html-mega-item.is-mega-open > .saas-html-mega-panel,
.saas-html-mega-item:focus-within > .saas-html-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.saas-html-mega-panel :where(h1, h2, h3, h4, h5, h6) {
    margin-top: 0;
}

.saas-html-mega-panel :where(p:last-child, ul:last-child, ol:last-child) {
    margin-bottom: 0;
}

.saas-html-mega-panel .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

body.saas-html-mega-open {
    overflow-x: clip;
}

@media (max-width: 768px) {
    .saas-html-mega-panel {
        display: none !important;
    }
}
