/* Keep product actions in view while only the customization choices scroll. */
dialog.guest-product-dialog {
    --product-dialog-padding: 20px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0;
    overflow: hidden;
}

dialog.guest-product-dialog[open] {
    display: flex;
    flex-direction: column;
}

.guest-product-dialog .guest-product-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: calc(100vh - 26px);
    max-height: calc(100dvh - 26px);
    margin: 0;
    padding: 0;
}

.guest-product-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    padding: var(--product-dialog-padding);
    scroll-padding-block: 16px;
}

.guest-product-actions {
    flex: 0 0 auto;
    padding: 14px var(--product-dialog-padding) max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 -5px 18px #12372d08;
}

.guest-product-actions .dialog-quantity {
    margin: 0 0 12px;
}

.guest-product-actions .dialog-total,
.guest-product-actions .total {
    margin: 0 0 14px;
    align-items: center;
    overflow-wrap: anywhere;
}

.guest-product-actions .notice {
    max-height: 20vh;
    max-height: 20dvh;
    overflow-y: auto;
    margin: 0 0 12px;
    padding: 10px 12px;
}

.guest-product-actions > .button {
    min-height: 48px;
}

@media (max-height: 540px) {
    dialog.guest-product-dialog {
        --product-dialog-padding: 14px;
    }

    .guest-product-actions {
        padding-top: 10px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .guest-product-actions .dialog-quantity,
    .guest-product-actions .dialog-total,
    .guest-product-actions .total {
        margin-bottom: 8px;
    }
}
