/*
 * Huazotl — popup surface treatment.
 * Geometry/behavior remains owned by Wapuos; this file only paints radius.
 */
:root {
  --huazotl-popup-radius: 16px;
}

/* Canonical WapuOS modal/adaptive popup surfaces. Exclude drawers/fullscreen. */
body .wapu-dialog:not(.wapu-dialog--desktop-drawer):not(.wapu-dialog--fullscreen):not(.wapu-dialog--fullheight) > .wapu-dialog__panel {
  border-radius: var(--huazotl-popup-radius) !important;
  overflow: hidden;
}

/* Huazotl Quick View uses its own dialog surface instead of .wapu-dialog__panel. */
body .wapu-archive-qv__dialog {
  border-radius: var(--huazotl-popup-radius) !important;
  overflow: hidden;
}

/* Legacy/canonical cart editor fallback when rendered without the common dialog panel class. */
body .wapu-cart-edit-modal__panel {
  border-radius: var(--huazotl-popup-radius) !important;
  overflow: hidden;
}

/* Bottom-sheet geometry stays attached to the viewport; only visible top corners are rounded. */
@media (max-width: 47.9375rem) {
  body .wapu-dialog--adaptive:not(.wapu-dialog--desktop-drawer) > .wapu-dialog__panel,
  body .wapu-dialog--sheet:not(.wapu-dialog--fullheight) > .wapu-dialog__panel,
  body .wapu-archive-qv__dialog {
    border-radius: var(--huazotl-popup-radius) var(--huazotl-popup-radius) 0 0 !important;
  }
}
