/* Complete dialog styles: do not depend on the legacy stylesheet's media queries. */
dialog.amz-order-window:not([open]) { display: none !important; }
dialog.amz-order-window, dialog.amz-order-window * { box-sizing: border-box; font-family: Arial, sans-serif !important; }
dialog.amz-order-window { padding: 0; }
dialog.amz-order-window .amz-order-window-panel {
    display: block; width: min(600px, calc(100% - 32px)); max-width: 600px;
    max-height: calc(100dvh - 32px); height: auto; margin: 0; padding: 0;
    overflow: auto; border: 1px solid #d5d9d9; border-radius: 10px;
    background: #fff !important; color: #0f1111 !important;
    box-shadow: 0 12px 48px #0005 !important; text-align: left; line-height: 1.5;
    animation: none; letter-spacing: normal; font-size: 14px;
}
dialog.amz-order-window .amz-order-window-brand { display: flex; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 4; padding: 18px 22px; color: #fff; background: #131921; }
dialog.amz-order-window .amz-order-window-brand img { display: block; width: 100px; height: 34px; object-fit: contain; }
dialog.amz-order-window .amz-order-window-brand span { flex: 1; font-size: 18px; font-weight: 400; line-height: 1.3; }
dialog.amz-order-window .amz-order-window-close { position: static; display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 5px; color: #fff; background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
dialog.amz-order-window .amz-order-window-close:hover { background: #ffffff24; color: #fff; }
dialog.amz-order-window .amz-order-window-body { padding: 24px; }
dialog.amz-order-window .amz-order-window-primary,
dialog.amz-order-window .amz-order-window-secondary,
#whatsapp-modal .rsi-whatsapp-button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 44px; height: auto; margin: 18px 0 0 !important; padding: 11px 15px;
    border-radius: 22px !important; color: #0f1111 !important; font-size: 14px !important;
    font-weight: 400; line-height: 1.4; text-decoration: none; cursor: pointer;
    animation: none !important; transform: none !important;
}
dialog.amz-order-window .amz-order-window-primary,
#whatsapp-modal .rsi-whatsapp-button { border: 1px solid #fcd200 !important; background: #ffd814 !important; box-shadow: 0 2px 4px #0f111126 !important; }
dialog.amz-order-window .amz-order-window-secondary { border: 1px solid #adb1b8 !important; background: #fff !important; box-shadow: 0 2px 4px #0f111114 !important; margin-top: 12px !important; }
dialog.amz-order-window .amz-order-window-primary:hover,
#whatsapp-modal .rsi-whatsapp-button:hover { filter: brightness(.97); }
dialog.amz-order-window .amz-order-window-secondary:hover { background: #f7fafa !important; }
dialog.amz-order-window :is(button,a):focus-visible { outline: 3px solid #007185; outline-offset: 3px; }
dialog.amz-order-window button svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
#upsell-modal ._rsi-modal-header { display: none; }
#upsell-modal #upsell-catch-title { margin: 0 0 8px; font-size: 23px; font-weight: 700; line-height: 1.3; text-align: left; }
#upsell-modal #upsell-catch-subtitle { margin: 0 0 20px; color: #565959; font-size: 14px; text-align: left; }
#upsell-modal ._rsi-modal-upsell-info { padding: 20px; border: 1px solid #d5d9d9; border-radius: 8px; background: #fff; }
#upsell-modal ._rsi-modal-upsell-images-slider { width: 100%; max-width: 180px; margin: 0 auto 12px; }
#upsell-modal .slider-container { display: block; overflow: hidden; padding: 0; }
#upsell-modal #upsell-product-image { display: block; width: 100%; height: 150px; object-fit: contain; }
#upsell-modal #upsell-product-title { margin: 0 0 8px; color: #2162a1; font-size: 17px; font-weight: 400; line-height: 1.4; }
#upsell-modal #upsell-product-description { margin: 0 0 12px; color: #565959; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
#upsell-modal #upsell-discount-container { margin: 10px 0; }
#upsell-modal #upsell-discount-badge { display: inline-block; width: auto; height: auto; margin: 0; padding: 4px 9px; background: #cc0c39; color: #fff; border-radius: 3px; clip-path: none; font-size: 13px; }
#upsell-modal ._rsi-modal-upsell-prices { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 0; }
#upsell-modal #upsell-compare-price { font-size: 14px; color: #565959; text-decoration: line-through; }
#upsell-modal #upsell-final-price { font-size: 25px; font-weight: 400; color: #0f1111; }
#upsell-modal ._rsi-modal-upsell-countdown:empty,
#upsell-modal ._rsi-modal-upsell-variants:empty { display: none; }
#thank-you-modal .rsi-thank-you-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 0 16px; border: 1px solid #c7e7dc; border-radius: 50%; background: #e7f4ef !important; color: #067d62; animation: none; }
#thank-you-modal .rsi-check-icon { width: 28px; height: 28px; stroke: #067d62 !important; }
#thank-you-modal .rsi-thank-you-title,
#whatsapp-modal .rsi-whatsapp-title { margin: 0 0 12px; font-size: 23px; line-height: 1.3; font-weight: 700; color: #0f1111; text-align: left; }
#thank-you-modal .rsi-thank-you-message,
#whatsapp-modal .rsi-whatsapp-subtitle,
#custom-message-modal .rsi-custom-message-text { margin: 0; color: #565959; font-size: 14px; line-height: 1.7; text-align: left; overflow-wrap: anywhere; }
#whatsapp-modal .rsi-whatsapp-content,
#custom-message-modal .rsi-custom-message-content { margin: 0; padding: 0; }
#loading-modal .amz-order-window-panel { width: min(440px, calc(100% - 32px)); }
#loading-modal .amz-order-window-brand span { font-size: 16px; }
#loading-modal .amz-order-window-body { display: flex; flex-direction: column; align-items: center; padding: 32px 24px; text-align: center; }
#loading-modal .rsi-spinning-loader { width: 42px; height: 42px; color: #007185; }
#loading-modal [data-translate="checkout.loading"] { margin-top: 18px !important; font-size: 20px; color: #0f1111; }
#loading-modal .amz-order-window-body p { margin: 8px 0 0; font-size: 13px; color: #565959; }
@media (prefers-reduced-motion: reduce) { #loading-modal .rsi-spinning-loader { animation: none !important; } }
/* The cart is loaded dynamically; selectors apply each time its contents refresh. */
#cartDrawer .cart-header { background: #131921; color: #fff; padding: 20px; }
#cartDrawer .cart-header__title { color: #fff; font: 700 20px Arial,sans-serif; }
#cartDrawer .cart-header__close { color: #fff; }
#cartDrawer .cart-content-wrapper { font-family: Arial,sans-serif; color: #0f1111; }
#cartDrawer .cart-item__name { color: #2162a1; }
#cartDrawer .cart-reservation-banner { background: #f0f2f2; color: #565959; font-size: 12px; }
#cartDrawer #checkout-button { background: #ffd814 !important; border: 1px solid #fcd200 !important; border-radius: 22px !important; color: #0f1111 !important; box-shadow: 0 2px 4px #0f111126; animation: none !important; }
#cartDrawer #checkout-button svg { fill: currentColor; }
#cartDrawer .cart-checkout-button__main-text { font: 700 14px Arial,sans-serif; letter-spacing: normal; }
#cartDrawer .cart-checkout-button__sub-text { font: 400 12px Arial,sans-serif; letter-spacing: normal; }
/* The target's upsell has a separate scroll region and a persistent action footer. */
#upsell-modal #_rsi-cod-form-modal-upsell.amz-order-window-panel {
    display: flex !important; flex-direction: column; overflow: hidden;
    border-radius: 10px; max-height: calc(100dvh - 32px);
}
#upsell-modal .amz-order-window-brand { flex-shrink: 0; }
#upsell-modal .amz-order-window-body { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
#upsell-modal ._rsi-modal-upsell-scroll { padding: 24px; }
#upsell-modal ._rsi-modal-upsell-footer { flex-shrink: 0; margin: 0; padding: 0 24px 20px; background: #fff; border: 0; box-shadow: none; }
#upsell-modal ._rsi-upsell-ribbon,
#upsell-modal ._rsi-upsell-reassure,
#upsell-modal ._rsi-upsell-oneclick { display: none; }
#upsell-modal ._rsi-modal-upsell-prices { flex-wrap: wrap; justify-content: flex-start; }
#upsell-modal #upsell-image-container { display: block; width: 100%; }
#upsell-modal #upsell-img-badge { border-radius: 3px; transform: none; font-size: 12px; width: auto; height: auto; padding: 4px 7px; }
#upsell-modal #upsell-discount-badge:empty { display: none; }
#whatsapp-modal .rsi-whatsapp-avatar[data-brand-avatar] { background: #131921; border: 1px solid #d5d9d9 !important; border-radius: 8px !important; object-fit: contain !important; padding: 8px; box-shadow: none !important; }
#upsell-modal #upsell-countdown { background: #f7fafa; color: #565959; font-size: 12px; border-radius: 4px; padding: 8px; }
#upsell-modal .amz-order-window-primary { flex-wrap: wrap; white-space: normal; }
#upsell-modal .amz-order-window-secondary { text-decoration: none; }
#upsell-modal ._rsi-upsell-btn-price { font-weight: 700; }
#cartDrawer #cart-drawer-content-container { min-height: 0; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
#cartDrawerContent { height: 100%; overflow: hidden; }
#cartDrawer .cart-content-wrapper { min-height: 0; padding-bottom: 0; overflow: auto; overscroll-behavior: contain; flex: 1; }
#cartDrawer .cart-summary { flex-shrink: 0; position: static; }
#cartDrawer .quantity__input { color: #000; }
#cartDrawer .cart-item__content { min-width: 0; }
#cartDrawer .cart-item__name,
#cartDrawer .cart-item__meta { overflow-wrap: anywhere; }
#cartDrawer :is(button,input):focus-visible { outline: 3px solid #007185; outline-offset: 2px; }
.amz-order-page { background: #f0f2f2; padding: 32px 20px; color: #0f1111; font: 14px Arial,sans-serif; }
.amz-order-page-card { max-width: 1060px; padding: 26px; margin: auto; border: 1px solid #d5d9d9; border-radius: 10px; background: #fff; }
.amz-order-page-heading { display: flex; align-items: flex-start; gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #d5d9d9; }
.amz-order-page-heading h1 { margin: 0 0 8px; color: #067d62; font-size: 25px; }
.amz-order-page-heading p { margin: 0; }
.amz-order-page-check { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: #e7f4ef; color: #067d62; font-size: 28px; }
.amz-order-page-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 28px; }
.amz-order-page-details { display: grid; gap: 20px; }
.amz-order-page-details section, .amz-order-page-summary { padding: 20px; border: 1px solid #d5d9d9; border-radius: 8px; overflow-wrap: anywhere; }
.amz-order-page h2 { font: 700 19px Arial,sans-serif; margin: 0 0 16px; }
.amz-order-page address { font-style: normal; line-height: 1.7; }
.amz-order-page-total { display: flex; justify-content: space-between; gap: 12px; color: #b12704; font-size: 19px; padding: 20px 0; border-top: 1px solid #e7e9ec; }
.amz-order-page-continue { display: block; padding: 12px; border-radius: 22px; border: 1px solid #fcd200; background: #ffd814; color: #0f1111; text-align: center; text-decoration: none; }
@media (max-width: 820px) { .amz-order-page-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 480px) {
    dialog.amz-order-window .amz-order-window-panel { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
    dialog.amz-order-window .amz-order-window-brand { padding: 14px; gap: 12px; }
    dialog.amz-order-window .amz-order-window-brand img { width: 80px; height: 30px; }
    dialog.amz-order-window .amz-order-window-brand span { font-size: 15px; }
    dialog.amz-order-window .amz-order-window-body { padding: 20px; }
    #upsell-modal ._rsi-modal-upsell-info { padding: 16px; }
    #upsell-modal #upsell-catch-title { font-size: 21px; }
    #upsell-modal #upsell-product-image { height: 160px; }
    #upsell-modal ._rsi-modal-upsell-scroll { padding: 20px; }
    #upsell-modal ._rsi-modal-upsell-footer { padding: 0 20px 18px; }
    .amz-order-page { padding: 16px 12px; }
    .amz-order-page-card { padding: 20px 16px; }
    .amz-order-page-heading h1 { font-size: 23px; }
}
