/* Same highlight language in the Newsroom editor and on the public article. */
.mpc-rich-editor .mpc-highlight,
.mp-article-content .mpc-highlight{
  --unv-highlight-accent:#91375f;
  --unv-highlight-bg:#f7f1f4;
  display:block;
  margin:1.25em 0;
  padding:16px 18px;
  border:0;
  border-inline-start:4px solid var(--unv-highlight-accent);
  border-radius:10px;
  background:var(--unv-highlight-bg);
  color:inherit;
  line-height:1.9;
  text-align:start;
  box-shadow:none;
}
.mpc-rich-editor .mpc-highlight strong,
.mp-article-content .mpc-highlight strong{color:var(--unv-highlight-accent)}

.unv-highlight--rose{--unv-highlight-accent:#91375f!important;--unv-highlight-bg:#f7f1f4!important}
.unv-highlight--sand{--unv-highlight-accent:#946126!important;--unv-highlight-bg:#faf2e6!important}
.unv-highlight--gold{--unv-highlight-accent:#a77a14!important;--unv-highlight-bg:#fff7dc!important}
.unv-highlight--teal{--unv-highlight-accent:#26776f!important;--unv-highlight-bg:#edf8f6!important}
.unv-highlight--blue{--unv-highlight-accent:#456d9f!important;--unv-highlight-bg:#eef4fb!important}
.unv-highlight--violet{--unv-highlight-accent:#72529a!important;--unv-highlight-bg:#f4f0f9!important}
.unv-highlight--red{--unv-highlight-accent:#a33b43!important;--unv-highlight-bg:#fbefef!important}
.unv-highlight--graphite{--unv-highlight-accent:#565c64!important;--unv-highlight-bg:#f1f2f3!important}
.unv-highlight--custom{--unv-highlight-accent:#91375f;--unv-highlight-bg:#f7f1f4}

.unv-highlight-palette{
  position:fixed;z-index:10050;width:min(360px,calc(100vw - 24px));
  padding:12px;border:1px solid #e6ddd4;border-radius:14px;background:#fffdfa;
  box-shadow:0 18px 50px rgba(33,25,27,.18);direction:rtl;color:#21191b;
}
.unv-highlight-palette[hidden]{display:none!important}
.unv-highlight-palette-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.unv-highlight-palette-head strong{font-size:13px}.unv-highlight-palette-head span{font-size:11px;color:#817873}
.unv-highlight-ruler{display:grid;grid-template-columns:repeat(8,1fr);gap:7px;align-items:center}
.unv-highlight-swatch{appearance:none;width:100%;aspect-ratio:1;border-radius:9px;border:1px solid rgba(20,20,20,.10);background:var(--swatch);cursor:pointer;box-shadow:inset 0 0 0 3px rgba(255,255,255,.55);transition:transform .15s ease,box-shadow .15s ease}
.unv-highlight-swatch:hover,.unv-highlight-swatch:focus-visible{transform:translateY(-2px);box-shadow:inset 0 0 0 3px rgba(255,255,255,.72),0 5px 14px rgba(0,0,0,.12);outline:none}
.unv-highlight-custom-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:11px;padding-top:10px;border-top:1px solid #eee6df}
.unv-highlight-custom-row label{font-size:12px;font-weight:750}.unv-highlight-color-input{width:54px;height:30px;padding:2px;border:1px solid #ded4ca;border-radius:8px;background:#fff;cursor:pointer}
.unv-highlight-hint{margin-top:8px;font-size:10px;line-height:1.6;color:#8a817c}

/* Mobile article editor toolbar: keep every control readable without collisions. */
@media(max-width:620px){
  .unv-highlight-palette{left:12px!important;right:12px!important;bottom:14px!important;top:auto!important;width:auto}
  .unv-highlight-ruler{gap:6px}

  .mpc-editor-toolbar{
    top:72px!important;
    display:flex!important;
    flex-wrap:wrap!important;
    overflow:visible!important;
    align-items:center!important;
    gap:6px!important;
    padding:8px!important;
    border-radius:13px 13px 0 0!important;
  }
  .mpc-editor-toolbar .mpc-toolbar-sep,
  .mpc-editor-toolbar .mpc-toolbar-spacer{display:none!important}
  .mpc-editor-toolbar .mpc-toolbar-group{
    display:flex!important;
    align-items:center!important;
    gap:3px!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .mpc-editor-toolbar .mpc-toolbar-group:nth-of-type(1),
  .mpc-editor-toolbar .mpc-toolbar-group:nth-of-type(2){
    flex:0 1 auto!important;
  }
  .mpc-editor-toolbar .mpc-toolbar-group:nth-of-type(3){
    flex:1 1 100%!important;
    width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:2px 0!important;
  }
  .mpc-editor-toolbar .mpc-toolbar-group:nth-of-type(3)::-webkit-scrollbar{display:none}
  .mpc-editor-toolbar .mpc-toolbar-group:nth-of-type(4){
    flex:1 1 100%!important;
    justify-content:flex-end!important;
  }
  .mpc-editor-toolbar .mpc-tool{
    flex:0 0 auto!important;
    height:32px!important;
    min-width:30px!important;
    padding:0 7px!important;
    border-radius:8px!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
  }
  .mpc-editor-toolbar .mpc-tool-icon{font-size:13px!important}
  .mpc-editor-toolbar .mpc-tool-link{padding-inline:10px!important}
  .mpc-editor-toolbar .mpc-tool-media{padding-inline:9px!important}
  .mpc-rich-editor{border-top:0!important}
}
