/* Scope only the product dialog adopted by cart-custom-dialog.js. */
body .tingle-modal.cart-custom-dialog,
body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) {
  padding: 16px; overflow-y: auto; align-items: center; justify-content: center;
  background: rgba(24, 27, 25, .62); backdrop-filter: blur(5px);
}
body .tingle-modal.cart-custom-dialog.tingle-modal--visible,
body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal).tingle-modal--visible { display: flex; }
body .cart-custom-dialog .tingle-modal-box,
body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) .tingle-modal-box {
  position: relative; width: min(720px, 100%); max-width: 720px;
  margin: auto; padding: 0; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: hidden; border-radius: 20px; background: #fff; box-sizing: border-box;
}
body .cart-custom-dialog .tingle-modal-box__content,
body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) .tingle-modal-box__content { padding: 0; }
body .cart-custom-dialog .tingle-modal__close,
body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) .tingle-modal__close {
  position: absolute; display: flex; align-items: center; justify-content: center;
  top: 12px; right: 12px; left: auto; margin: 0; padding: 10px;
  width: 44px; height: 44px; min-height: 44px; box-sizing: border-box; border: 1px solid #e8e5dd; border-radius: 50%;
  background: #fff; color: #262826; z-index: 2; cursor: pointer;
}
body .cart-custom-dialog .tingle-modal__closeIcon { display: flex; align-items: center; margin: 0; width: 18px; height: 18px; }
body .cart-custom-dialog .tingle-modal__closeIcon svg { width: 18px; height: 18px; }
body .cart-custom-dialog .tingle-modal__closeLabel { display: none; }
body .cart-custom-dialog #card_article_custom_modal {
  display: flex; flex-direction: column; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
}
body .cart-custom-dialog #card_article_custom_modal .cart-custom-modal__header { flex-shrink: 0; padding-right: 70px; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-modal__form { min-height: 0; max-height: none; flex: 1; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-modal__content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-modal__footer { flex-shrink: 0; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-quantity__control { grid-template-columns: 44px 48px 44px; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-quantity__button { display: grid; visibility: visible; opacity: 1; width: 44px; height: 44px; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-quantity__input { width: 48px; height: 44px; }
body .cart-custom-dialog #card_article_custom_modal .cart-custom-modal__title { overflow-wrap: anywhere; }
body .cart-custom-dialog .cart-custom-dialog__state {
  padding: 24px; padding-top: 28px; overflow-y: auto; max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px); box-sizing: border-box;
}
body .cart-custom-dialog__state h2 { margin: 0 56px 22px 0; font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
body .cart-custom-dialog__state p { margin: 0 0 24px; line-height: 1.6; overflow-wrap: anywhere; }
body .cart-custom-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
body .cart-custom-dialog__actions button {
  min-height: 44px; padding: 11px 18px; border: 1px solid #e8e5dd; border-radius: 12px;
  font: inherit; font-weight: 700; background: #f7f6f2; color: #262826; cursor: pointer;
}
body .cart-custom-dialog__actions .cart-custom-dialog__retry { background: #d72e43; color: #fff; border-color: #d72e43; }
body .cart-custom-dialog .cart-custom-dialog__feedback {
  padding: 12px 14px; margin: 0 0 16px; border-radius: 12px; background: #fff5e6;
  border: 1px solid #ebdec5; color: #705b38; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}
body .cart-custom-dialog :focus-visible,
body .cart-custom-dialog #card_article_custom_modal :focus-visible { outline: 3px solid #a92034; outline-offset: 3px; }
body .cart-custom-dialog button:disabled { opacity: .55; cursor: default; }
@media (max-width: 600px) {
  body .tingle-modal.cart-custom-dialog,
  body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) { padding: 8px; }
  body .cart-custom-dialog .tingle-modal-box,
  body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) .tingle-modal-box,
  body .cart-custom-dialog #card_article_custom_modal,
  body .cart-custom-dialog .cart-custom-dialog__state { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  body .cart-custom-dialog .tingle-modal-box,
  body .tingle-modal.cart-custom-dialog:has(#card_article_custom_modal) .tingle-modal-box { width: 100%; margin: auto; border-radius: 18px; }
  body .cart-custom-dialog .cart-custom-dialog__state { padding: 22px 18px; }
  body .cart-custom-dialog__actions button { flex: 1; }
}

body .cart-custom-dialog .cart-custom-dialog__review,
body .right-menu .cart-custom-recovery button {
  display: block; min-height: 44px; margin: 14px 0 0; padding: 10px 14px;
  border: 1px solid #a92034; border-radius: 10px; background: #fff; color: #8b2635;
  font: inherit; font-weight: 700; line-height: 1.4; cursor: pointer; white-space: normal;
}
body .right-menu .cart-custom-recovery {
  margin: 12px 0; padding: 16px; border: 1px solid #ebdec5; border-radius: 12px;
  background: #fff5e6; color: #705b38; font-size: 13px; line-height: 1.5; text-align: left;
}
body .right-menu .cart-custom-recovery__title { margin: 0 0 10px; font-size: 17px; line-height: 1.4; }
body .right-menu .cart-custom-recovery p { margin: 0 0 14px; }
body .right-menu .cart-custom-recovery__decision { display: flex; align-items: flex-start; gap: 10px; margin: 0; font: inherit; cursor: pointer; }
body .right-menu .cart-custom-recovery input {
  position: static; display: block; flex: 0 0 20px; width: 20px; height: 20px; margin: 1px 0 0;
  opacity: 1; appearance: auto; accent-color: #a92034;
}
body .right-menu .cart-custom-recovery button:disabled { opacity: .55; cursor: default; }
body .right-menu .cart-custom-recovery :focus-visible { outline: 3px solid #a92034; outline-offset: 3px; }
