/* One compact selection panel for the existing Semantic popup and modal. */
body.mdh-builder .ui.popup.wishlist-popup { --mdh-wishlist-max-height: min(640px, calc(100dvh - 220px)); position: fixed !important; top: var(--mdh-wishlist-top, 76px) !important; left: var(--mdh-wishlist-left, 16px) !important; right: auto !important; bottom: auto !important; margin: 0 !important; width: min(380px, calc(100vw - 48px)); max-width: 380px; max-height: var(--mdh-wishlist-max-height); padding: 0; border: 1px solid #dce3eb; border-radius: 16px; background: #fff; box-shadow: 0 16px 48px rgb(25 39 55 / 18%); }
body.mdh-builder .ui.popup.wishlist-popup.mdh-wishlist-measuring { display: block !important; visibility: hidden !important; animation: none !important; transform: none !important; }
body.mdh-builder .ui.popup.wishlist-popup::before { display: none; }
body.mdh-builder .ui.modal.wishlist-modal { --mdh-wishlist-max-height: calc(100dvh - 32px); display: none; position: fixed; top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important; transform: translate(-50%, -50%) !important; z-index: 3001; width: min(480px, calc(100vw - 32px)) !important; max-width: 480px !important; max-height: var(--mdh-wishlist-max-height); margin: 0 !important; padding: 0; overflow: hidden; border: 1px solid #dce3eb; border-radius: 16px; background: #fff; }
/* The bundled Semantic stylesheet omits modal/dimmer styles; JS owns visibility. */
body.mdh-builder > .ui.dimmer.modals { display: none; position: fixed !important; inset: 0; z-index: 3000; width: 100%; height: 100%; margin: 0; background: rgb(25 39 55 / 55%); }
body.mdh-builder > .ui.dimmer.modals.active { display: block; }
html:has(body.mdh-builder .wishlist-modal.active),
body.mdh-builder:has(.wishlist-modal.active) { overflow: hidden; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-panel { display: flex; flex-direction: column; width: 100%; max-height: calc(var(--mdh-wishlist-max-height) - 2px); overflow: hidden; border-radius: inherit; text-align: left; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e4e9ef; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-header h2 { margin: 0; color: #202b39; font-size: 22px; font-weight: 700; line-height: 1.25; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-close { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: #f1f5f9; color: #536174; font-size: 28px; line-height: 1; cursor: pointer; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-body { flex: 1 1 auto; width: 100%; min-height: 0; max-height: none; padding: 20px; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-section { margin: 0 0 24px; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-section:last-child { margin-bottom: 0; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-section-header { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-section-header h3 { flex: 1; margin: 0; color: #303d4c; font-size: 16px; font-weight: 700; line-height: 1.4; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 4px; background: #fff0f5; color: #a4003b; font-size: 12px; font-weight: 700; line-height: 1; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-items { display: flex; flex-direction: column; gap: 8px; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-entry { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin: 0; padding: 4px 4px 4px 14px; border: 1px solid #e4e9ef; border-radius: 8px; background: #f8fafc; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .tag-content { grid-column: 1; grid-row: 1; display: block; min-width: 0; min-height: 0; margin: 0; padding: 8px 0; background: transparent; color: #303d4c; font-size: 15px; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .tag-remove { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #697687; font-size: 24px; line-height: 1; cursor: pointer; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .tag-remove::before { content: none; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) :is(.tag-remove, .mdh-wishlist-close):hover { background: #fff0f5; color: #b60042; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) :is(.tag-remove, .mdh-wishlist-close):focus-visible { outline: 2px solid #dc004f; outline-offset: 2px; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .tag-remove[aria-busy='true'] { opacity: .5; cursor: wait; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-footer { flex: 0 0 auto; padding: 16px 20px 20px; border-top: 1px solid #e4e9ef; background: #fff; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .wishlist-popup-action[class] { display: inline-flex !important; width: 100%; min-width: 0; margin: 0; padding-right: var(--mdh-button-padding-inline) !important; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) :is(.mdh-wishlist-empty, .mdh-wishlist-help) { margin: 0; color: #697687; font-size: 14px; font-weight: 400; line-height: 1.5; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) .mdh-wishlist-help { margin-bottom: 12px; font-size: 13px; }
body.mdh-builder :is(.wishlist-popup, .wishlist-modal) [hidden] { display: none !important; }
@media (max-width: 767px) {
    body.mdh-builder :is(.wishlist-popup, .wishlist-modal) :is(.mdh-wishlist-header, .mdh-wishlist-body, .mdh-wishlist-footer) { padding-inline: 16px; }
}
