.flocara-bottom-sheet-scroll-locked {
    overscroll-behavior: none;
}

html.flocara-bottom-sheet-scroll-locked,
body.flocara-bottom-sheet-scroll-locked {
    overflow: hidden;
}

.flocara-bottom-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: flex;
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
    background: rgb(20 20 28 / 46%);
    overscroll-behavior: none;
    touch-action: none;
}

.flocara-navigation-page:has(.flocara-bottom-sheet-backdrop) {
    position: relative;
    z-index: 1090;
}

.flocara-bottom-sheet {
    width: min(100%, 440px);
    max-height: min(80dvh, 720px);
    overflow: auto;
    border-radius: 16px;
    background: var(--mud-palette-surface);
    box-shadow: 0 18px 48px rgb(15 23 42 / 28%);
}

.flocara-bottom-sheet-handle {
    display: none;
}

.flocara-bottom-sheet-header {
    display: flex;
    min-height: 56px;
    padding: 0.6rem 0.75rem 0.5rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.flocara-bottom-sheet-header .mud-typography {
    font-weight: 700;
}

.flocara-bottom-sheet-content {
    padding: 1rem 1.25rem 1.25rem;
}

@media (max-width: 959.98px) {
    .flocara-bottom-sheet-backdrop {
        inset: 0 0 calc(var(--flocara-mobile-bottom-navigation-offset, 0px) + 1px);
        padding: 0;
        align-items: flex-end;
    }

    .flocara-bottom-sheet {
        width: 100%;
        max-height: min(
            82dvh,
            calc(
                100dvh
                - var(--flocara-mobile-bottom-navigation-offset, 0px)
                - 1px
                - env(safe-area-inset-top, 0px)),
            720px);
        padding-bottom: max(0.4rem, env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 22px 22px 0 0;
        touch-action: pan-y;
        animation: flocara-bottom-sheet-enter 220ms cubic-bezier(.2, .85, .25, 1);
    }

    .flocara-bottom-sheet-handle {
        display: block;
        width: 42px;
        height: 5px;
        margin: 0.55rem auto 0.1rem;
        border-radius: 999px;
        background: color-mix(in srgb, var(--mud-palette-text-secondary) 38%, transparent);
        cursor: grab;
        touch-action: none;
    }

    .flocara-bottom-sheet-expandable .flocara-bottom-sheet-handle {
        cursor: ns-resize;
    }

    .flocara-bottom-sheet-expanded {
        height: calc(100% - var(--flocara-safe-area-top, 0px));
        max-height: calc(100% - var(--flocara-safe-area-top, 0px));
    }

    .flocara-bottom-sheet-header {
        min-height: 48px;
        padding-top: 0.2rem;
        touch-action: none;
    }

    @keyframes flocara-bottom-sheet-enter {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .flocara-bottom-sheet {
        animation: none;
    }
}
