/* Preorder panel only: retain the site layout without changing shared styles. */
#preorder-modal {
    min-inline-size: 0;
    max-block-size: 100vh;
    max-block-size: 100dvh;
}

#preorder-modal > .top,
#preorder-modal > .middle,
#preorder-modal > .bottom {
    min-inline-size: 0;
    max-inline-size: 100%;
}

#preorder-modal > .top,
#preorder-modal > .bottom {
    flex-shrink: 0;
}

#preorder-modal > .top > div {
    min-inline-size: 0;
    overflow-wrap: anywhere;
}

#preorder-modal .btn-close {
    flex: 0 0 48px;
}

/* The shared -8px hit-area margin extends this button's scrollable width. */
#preorder-modal .btn-close::before {
    margin: 0;
}

#preorder-modal > .middle {
    flex: 1 1 auto;
    min-block-size: 0;
    height: auto;
    overflow-y: auto;
}

#preorder-form,
#preorder-modal .form-control {
    min-inline-size: 0;
    max-inline-size: 100%;
}

#preorder-modal .bottom,
#preorder-error {
    overflow-wrap: anywhere;
}

/* Shared buttons are nowrap; allow the full-width action to fit narrow/zoomed panels. */
#preorder-modal .bottom .btn {
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Unsized preorder only: retain the upper size-area gap, raise mobile actions. */
@media (max-width: 991.98px) {
    .product-sizes[aria-hidden="true"]:has(+ .preorder-buttons) {
        padding-bottom: 0;
    }
}

/* Preorder PDP only; catalog badges retain the shared white overlay style. */
.product-page .left-col [data-preorder-badge] {
    color: #a7a6a5;
}
