/* Namespaced so parent themes and other plugins are not modified. */
body.mwpm-body-open { overflow: hidden !important; }
.mwpm-overlay[hidden], .mwpm-open-tab[hidden] { display: none !important; }
.mwpm-overlay, .mwpm-overlay * { box-sizing: border-box; }
.mwpm-overlay { position: fixed; z-index: 2147483000; inset: 0; width: 100vw; height: 100dvh; padding: 2.5vh 2.5vw; background: rgba(8,14,27,.76); display: flex; align-items: center; justify-content: center; color: #162238; font: 14px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif; }
.mwpm-dialog { display: flex; flex-direction: column; width: 100%; max-width: 1660px; height: 94vh; height: 94dvh; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 20px 95px rgba(0,0,0,.38); outline: none; }
.mwpm-maximized { padding: 0; }
.mwpm-maximized .mwpm-dialog { max-width: none; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
.mwpm-overlay .mwpm-topbar { flex: 0 0 auto; min-height: 58px; background: #13233b; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; gap: 12px; }
.mwpm-overlay .mwpm-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mwpm-overlay .mwpm-brand-icon { display: grid; place-content: center; font-size: 24px; width: 34px; height: 34px; background: #36527b; border-radius: 8px; flex: none; }
.mwpm-overlay h2#mwpm-heading { margin: 0 !important; color: inherit !important; font-size: 17px !important; line-height: 1.25 !important; font-weight: 700 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mwpm-overlay .mwpm-toolbar, .mwpm-overlay .mwpm-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.mwpm-overlay button, .mwpm-overlay a { font: inherit; letter-spacing: 0; text-transform: none; }
.mwpm-overlay .mwpm-tool { display: inline-flex; cursor: pointer; border: 1px solid #cad4e4; background: #fff; color: #1a2d49; border-radius: 7px; min-height: 32px; padding: 6px 10px; line-height: 1.2; align-items: center; justify-content: center; white-space: nowrap; box-shadow: none; }
.mwpm-overlay .mwpm-topbar .mwpm-tool { background: #283c58; color: #fff; border: 1px solid #475d7d; }
.mwpm-overlay .mwpm-topbar .mwpm-tool[aria-pressed="true"] { background: #fff; color: #152944; border-color: #fff; }
.mwpm-overlay .mwpm-close { font-size: 26px; padding: 0 8px; min-width: 35px; line-height: 1; }
.mwpm-overlay .mwpm-content { display: flex; min-height: 0; flex: 1 1 auto; background: #eef2f7; }
.mwpm-overlay .mwpm-site-nav { display: flex; flex-direction: column; width: 218px; flex: 0 0 218px; min-width: 0; min-height: 0; background: #fff; border-right: 1px solid #dde5ee; padding: 14px 10px; }
.mwpm-overlay .mwpm-nav-heading { color: #4f627d; font-size: 11px; font-weight: 750; padding: 4px 12px 12px; text-transform: uppercase; letter-spacing: .08em; }
.mwpm-overlay .mwpm-nav-list { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.mwpm-overlay .mwpm-site-button { width: 100%; display: flex; border: 0; border-radius: 8px; background: transparent; cursor: pointer; margin: 2px 0; text-align: left; gap: 9px; align-items: center; color: #1c2d45; font-weight: 550; padding: 10px; font-size: 13px; line-height: 1.35; min-height: 40px; word-break: break-word; }
.mwpm-overlay .mwpm-site-button:hover { background: #eaf0fa; }
.mwpm-overlay .mwpm-site-button.is-active { background: #dceaff; color: #06469d; font-weight: 700; }
.mwpm-overlay .mwpm-site-dot { height: 8px; width: 8px; border-radius: 50%; flex: 0 0 8px; background: #9eafc3; }
.mwpm-overlay .mwpm-site-button.is-active .mwpm-site-dot { background: #086fe3; }
.mwpm-overlay .mwpm-viewer { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 10px 12px 8px; gap: 8px; }
.mwpm-overlay .mwpm-viewer-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mwpm-overlay .mwpm-active-name { font-size: 14px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mwpm-overlay .mwpm-open-tab { display: inline-flex; align-items: center; border: 1px solid #bfd4f4; background: #e1edff; color: #064caa; border-radius: 7px; text-decoration: none !important; padding: 7px 11px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.mwpm-overlay .mwpm-open-tab:hover { background: #d4e4ff; color: #064caa; }
.mwpm-overlay .mwpm-frame-grid { flex: 1; min-height: 0; display: flex; gap: 8px; }
.mwpm-overlay .mwpm-frame-grid.is-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); }
.mwpm-overlay .mwpm-frame-item { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #d4dfe9; border-radius: 8px; }
.mwpm-overlay .mwpm-grid-heading { height: 34px; flex: 0 0 34px; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #eff4fa; border-bottom: 1px solid #dae3ed; padding: 4px 9px; font-size: 12px; }
.mwpm-overlay .mwpm-grid-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mwpm-overlay .mwpm-grid-external { font-size: 16px; color: #1357a5; font-weight: 800; text-decoration: none; }
.mwpm-overlay .mwpm-frame { height: 100%; min-height: 0; width: 100%; flex: 1 1 auto; border: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff; max-width: none !important; display: block; }
.mwpm-overlay .mwpm-notice { flex: 0 0 auto; font-size: 11px; color: #64748b; text-align: center; }
.mwpm-overlay .mwpm-frame-empty { display: flex; justify-content: center; align-items: center; flex: 1; background: #fff; border: 1px dashed #bfc9d5; border-radius: 9px; padding: 24px; text-align: center; }
.mwpm-overlay .mwpm-empty { padding: 10px; font-size: 12px; color: #6a7788; }
.mwpm-overlay button:focus-visible, .mwpm-overlay a:focus-visible { outline: 3px solid #ffb933 !important; outline-offset: 2px; }
.mwpm-shortcode-button { display: inline-block; padding: 10px 16px; background: #1455b5; color: #fff !important; font-weight: 600; border-radius: 7px; text-decoration: none !important; }
@media (max-width: 700px) {
  .mwpm-overlay { padding: 0; }
  .mwpm-dialog { height: 100vh; height: 100dvh; max-width: none; width: 100vw; border-radius: 0; }
  .mwpm-overlay .mwpm-topbar { padding: 8px 9px; min-height: 50px; }
  .mwpm-overlay h2#mwpm-heading { font-size: 14px !important; }
  .mwpm-overlay .mwpm-brand-icon { display: none; }
  .mwpm-overlay .mwpm-toolbar { gap: 4px; }
  .mwpm-overlay .mwpm-topbar .mwpm-tool { font-size: 12px; padding: 6px 8px; }
  .mwpm-overlay .mwpm-topbar .mwpm-close { font-size: 25px; }
  .mwpm-overlay .mwpm-content { flex-direction: column; }
  .mwpm-overlay .mwpm-site-nav { width: 100%; flex: 0 0 auto; height: auto; min-height: 0; padding: 5px 6px; border-right: 0; border-bottom: 1px solid #dfe6f0; }
  .mwpm-overlay .mwpm-nav-heading { display: none; }
  .mwpm-overlay .mwpm-nav-list { display: flex; gap: 5px; white-space: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .mwpm-overlay .mwpm-site-button { width: auto; flex: 0 0 auto; min-height: 32px; margin: 0; padding: 6px 9px; white-space: nowrap; }
  .mwpm-overlay .mwpm-site-label { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mwpm-overlay .mwpm-viewer { padding: 6px; gap: 5px; }
  .mwpm-overlay .mwpm-viewer-head { gap: 5px; min-height: 32px; }
  .mwpm-overlay .mwpm-active-name { font-size: 12px; }
  .mwpm-overlay .mwpm-actions { gap: 5px; }
  .mwpm-overlay .mwpm-actions .mwpm-tool { font-size: 12px; min-height: 29px; padding: 5px 6px; }
  .mwpm-overlay .mwpm-open-tab { font-size: 11px; padding: 6px 7px; }
  .mwpm-overlay .mwpm-frame-grid.is-grid { gap: 4px; }
  .mwpm-overlay .mwpm-grid-heading { height: 26px; flex-basis: 26px; font-size: 11px; }
  .mwpm-overlay .mwpm-notice { font-size: 10px; }
}
@media (max-width: 360px) { .mwpm-overlay .mwpm-expand { display: none; } }

/* v1.2.0: news columns, audio guidance, and admin-only inline editing. */
.mwpm-overlay .mwpm-frame-grid[hidden], .mwpm-overlay .mwpm-news-columns[hidden], .mwpm-overlay .mwpm-audio-tip[hidden], .mwpm-overlay .mwpm-edit-panel[hidden], .mwpm-overlay .mwpm-tool[hidden] { display: none !important; }
.mwpm-overlay .mwpm-dialog { position: relative; }
.mwpm-overlay .mwpm-nav-heading { padding-bottom: 7px; }
.mwpm-overlay .mwpm-add-link { margin: 8px 2px 0; width: calc(100% - 4px); font-weight: 650; }
.mwpm-overlay .mwpm-audio-tip { flex: none; background: #fff7e6; border: 1px solid #f0cc88; border-radius: 7px; font-size: 12px; padding: 9px 12px; color: #624919; }
.mwpm-overlay .mwpm-news-columns { flex: 1; min-height: 0; min-width: 0; display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 9px; align-items: stretch; scrollbar-width: thin; }
.mwpm-overlay .mwpm-news-column { min-width: 270px; width: clamp(275px, 28vw, 380px); max-width: 400px; flex: 0 0 clamp(275px, 28vw, 380px); background: #fff; border: 1px solid #d7e1ed; border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; }
.mwpm-overlay .mwpm-news-heading { flex: none; padding: 10px 12px; border-bottom: 1px solid #e4eaf2; display: flex; gap: 6px; align-items: center; justify-content: space-between; background: #f4f7fc; }
.mwpm-overlay .mwpm-news-heading strong { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; font-size: 13px; }
.mwpm-overlay .mwpm-news-site-link { font-size: 11px; flex: none; color: #0b55a7; text-decoration: none; font-weight: 700; }
.mwpm-overlay .mwpm-category-chip { flex: none; align-self: start; margin: 8px 12px 3px; font-size: 11px; background: #eaf1ff; color: #1458a5; border-radius: 4px; padding: 3px 7px; }
.mwpm-overlay .mwpm-news-list { min-height: 0; overflow: auto; flex: 1; scrollbar-width: thin; padding: 5px 11px 14px; }
.mwpm-overlay .mwpm-news-card { padding: 11px 2px 13px; border-bottom: 1px solid #ecf0f4; }
.mwpm-overlay .mwpm-news-title { display: block; font-size: 13px; font-weight: 750; color: #182f50; text-decoration: none; line-height: 1.43; }
.mwpm-overlay .mwpm-news-title:hover { text-decoration: underline; color: #0d61a7; }
.mwpm-overlay .mwpm-news-meta { margin-top: 5px; color: #64758c; font-size: 10px; }
.mwpm-overlay .mwpm-news-card p { font-size: 11px; line-height: 1.55; margin: 6px 0 0; color: #53647a; }
.mwpm-overlay .mwpm-news-message { padding: 18px 12px; color: #566985; font-size: 12px; line-height: 1.6; }
.mwpm-overlay .mwpm-news-empty { background: #fff; border: 1px dashed #b5c5d6; border-radius: 10px; width: 100%; }
.mwpm-overlay .mwpm-edit-panel { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; background: rgba(9, 17, 33, .78); padding: 16px; overflow: auto; }
.mwpm-overlay .mwpm-edit-form { border-radius: 12px; background: #fff; padding: 22px; width: min(100%, 560px); max-height: 94%; overflow: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.mwpm-overlay .mwpm-edit-form h3 { font-size: 18px; font-weight: 750; color: #13233b; margin: 0 0 2px; }
.mwpm-overlay .mwpm-edit-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: #263f60; }
.mwpm-overlay .mwpm-edit-form input { border: 1px solid #bccadd; min-height: 37px; width: 100%; border-radius: 7px; padding: 8px 10px; background: #fff; color: #172c47; font-size: 13px; }
.mwpm-overlay .mwpm-edit-actions { display: flex; justify-content: flex-end; gap: 10px; }
.mwpm-overlay .mwpm-edit-form .mwpm-save { background: #1363b5; color: #fff; border-color: #1363b5; }
.mwpm-overlay .mwpm-edit-message { color: #9c3518; font-size: 12px; min-height: 1em; }
@media (max-width: 700px) {
  .mwpm-overlay .mwpm-topbar { flex-wrap: wrap; gap: 5px; }
  .mwpm-overlay .mwpm-toolbar { flex-wrap: wrap; justify-content: flex-end; }
  .mwpm-overlay .mwpm-toolbar .mwpm-tool { font-size: 11px; min-height: 29px; }
  .mwpm-overlay .mwpm-nav-list { max-width: 100%; }
  .mwpm-overlay .mwpm-add-link { width: auto; align-self: end; flex: none; font-size: 11px; margin: 2px 0 0; }
  .mwpm-overlay .mwpm-viewer-head { flex-wrap: wrap; }
  .mwpm-overlay .mwpm-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .mwpm-overlay .mwpm-news-column { width: min(88vw, 345px); flex-basis: min(88vw, 345px); min-width: 245px; }
  .mwpm-overlay .mwpm-edit-form { padding: 15px; }
}

.mwpm-overlay .mwpm-news-header-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.mwpm-overlay .mwpm-news-edit-link { display: inline-block; padding: 2px 4px; background: transparent; color: #1654a1; border: 0; font-size: 11px; cursor: pointer; }
.mwpm-overlay .mwpm-news-edit-link:hover { text-decoration: underline; }
