/* Mohsen Highlight v1.3 — scoped styles, no dependency on the theme. */
::highlight(mohsen-saved) { background-color: var(--mh-mark, #fff0a8); color: inherit; }
::highlight(mohsen-target) { background-color: #ffd18d; color: #201910; }
.mh-visual-mark { position: absolute; border-radius: 2px; background: var(--mh-mark, #fff0a8); opacity: .68; pointer-events:none; z-index: 4; mix-blend-mode:multiply; }
.mh-visual-mark.mh-visual-target { background:#ffa95a; opacity:.72; z-index:5; }
.mh-root-ui, .mh-root-ui * { box-sizing:border-box; }
.mh-root-ui { font-family: inherit; font-size:14px; color:#414042; direction:rtl; }
.mh-root-ui button { font-family: inherit; cursor:pointer; }
.mh-floating-toolbar { display:none; position:fixed; z-index:2147483001; background:#414042; color:#fff; padding:5px; gap:4px; border-radius:10px; box-shadow:0 5px 20px rgba(0,0,0,.25); direction:rtl; flex-wrap:nowrap; align-items:center; }
.mh-floating-toolbar.mh-open { display:flex; }
.mh-floating-toolbar button { appearance:none; display:flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; border:0; border-radius:7px; padding:9px 11px; background:transparent; color:#fff; line-height:1.5; font-size:12px; font-weight:650; min-height:36px; }
.mh-floating-toolbar button:hover, .mh-floating-toolbar button:focus-visible { background:rgba(255,255,255,.18); color:#fff; outline:1px solid #fff; }
.mh-floating-toolbar button.mh-save { background:#c92a10; }
.mh-floating-toolbar button.mh-save:hover { background:#b6200a; }
.mh-floating-toolbar svg { width:15px; height:15px; stroke:currentColor; flex:0 0 15px; }
.mh-launcher { appearance:none!important; position:fixed!important; bottom:104px!important; right:18px!important; left:auto!important; z-index:2147482997!important; display:flex!important; gap:7px!important; align-items:center!important; justify-content:center!important; border-radius:99px!important; background:#414042!important; color:#fff!important; border:1px solid rgba(255,255,255,.3)!important; padding:10px 14px!important; line-height:1.45!important; font-weight:700!important; font-size:13px!important; box-shadow:0 3px 14px rgba(0,0,0,.18)!important; width:auto!important; min-width:auto!important; min-height:42px!important; }
.mh-launcher:hover, .mh-launcher:focus-visible { background:#c92a10!important; color:#fff!important; }
.mh-launcher .mh-count { display:inline-flex; align-items:center; justify-content:center; background:#fff; color:#414042; min-width:20px; height:20px; padding:0 4px; border-radius:50px; font:700 11px/1 Arial,sans-serif; }
.mh-launcher svg { width:17px; height:17px; stroke:currentColor; }
.mh-drawer { position:fixed; z-index:2147483002; right:18px; bottom:156px; width:min(400px,calc(100vw - 36px)); max-height:min(72vh,640px); background:#fff; color:#414042; border:1px solid #d9d9d9; border-radius:13px; box-shadow:0 12px 45px rgba(0,0,0,.26); display:none; flex-direction:column; overflow:hidden; font-family:inherit; direction:rtl; }
.mh-drawer.mh-open { display:flex; }
.mh-drawer-head { padding:15px 15px 12px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #e5e5e5; gap:10px; }
.mh-drawer h2 { font-family:inherit; font-size:18px; font-weight:700; line-height:1.5; margin:0; padding:0; border:0; color:#414042; }
.mh-drawer-close { appearance:none; border:0; color:#414042; background:#f4f4f4; border-radius:7px; font-size:24px; line-height:1; width:33px; height:33px; padding:0; }
.mh-tabs { display:flex; padding:10px 14px; gap:9px; border-bottom:1px solid #eee; }
.mh-tabs button { appearance:none; border:1px solid #dedede; color:#414042; background:#fff; border-radius:6px; padding:7px 10px; font-size:12px; font-weight:600; }
.mh-tabs button[aria-selected="true"] { border-color:#c92a10; color:#c92a10; background:#fff8f5; }
.mh-list { padding:12px; overflow:auto; overscroll-behavior:contain; flex:1; min-height:90px; }
.mh-card { border:1px solid #e7e7e7; background:#fff; padding:10px; border-radius:8px; margin-bottom:9px; }
.mh-card-title { font-size:12px; font-weight:600; color:#777; margin:0 0 8px; line-height:1.6; }
.mh-card-quote { display:block; width:100%; font:normal 14px/1.85 inherit; color:#414042; text-align:right; border:0; background:linear-gradient(transparent 66%,var(--mh-mark,#fff0a8) 66%); padding:0; margin:0 0 10px; cursor:pointer; overflow-wrap:anywhere; }
.mh-card-actions { display:flex; gap:7px; flex-wrap:wrap; }
.mh-card-actions button { border:1px solid #ddd; color:#414042; background:#fafafa; border-radius:6px; padding:5px 10px; font-size:12px; }
.mh-card-actions button:hover, .mh-card-actions button:focus-visible { border-color:#414042; }
.mh-card-actions .mh-remove { color:#b62312; border-color:#f2d1cc; background:#fffafa; }
.mh-empty { text-align:center; color:#777; font-size:13px; line-height:2; padding:25px 12px; }
.mh-drawer-foot { padding:11px 14px; color:#858585; font-size:11px; line-height:1.7; border-top:1px solid #eee; }
.mh-toast { position:fixed; z-index:2147483003; bottom:23px; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100vw - 30px); background:#414042; color:#fff; border-radius:9px; padding:11px 16px; box-shadow:0 4px 16px rgba(0,0,0,.22); font-size:13px; text-align:center; line-height:1.7; display:none; }
.mh-toast.mh-show { display:block; }
@media (max-width:600px) {
  .mh-launcher { bottom:93px!important; right:12px!important; padding:9px 12px!important; }
  .mh-drawer { right:9px; bottom:146px; width:calc(100vw - 18px); max-height:min(70vh,600px); }
  .mh-floating-toolbar { max-width:calc(100vw - 12px); }
  .mh-floating-toolbar button { padding:8px 7px; font-size:11px; min-height:38px; }
  .mh-toast { bottom:17px; }
}
@media (prefers-reduced-motion: no-preference) {
  .mh-drawer, .mh-floating-toolbar { animation:mh-appear 120ms ease-out; }
  @keyframes mh-appear { from { opacity:.35; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
}

.mh-clear-all { appearance:none; margin-top:6px; border:0; background:transparent; color:#b62312; padding:0; font:inherit; cursor:pointer; text-decoration:underline; }
.mh-clear-all:focus-visible { outline:2px solid #c92a10; outline-offset:3px; }

/* v1.1 — branded, accessible, explicit social-sharing menu. */
.mh-share-overlay { display:none; position:fixed; inset:0; z-index:2147483004; background:rgba(0,0,0,.44); padding:20px; align-items:center; justify-content:center; direction:rtl; }
.mh-share-overlay.mh-open { display:flex; }
.mh-share-panel { width:min(480px,100%); max-height:min(85vh,760px); overflow:auto; background:#fff; border-radius:14px; box-shadow:0 18px 60px rgba(0,0,0,.3); border:1px solid #dadada; padding:0 0 18px; color:#414042; }
.mh-share-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 20px; border-bottom:1px solid #e7e7e7; }
.mh-share-head h2 { margin:0!important; padding:0!important; font:700 17px/1.6 inherit!important; color:#414042!important; }
.mh-share-close { appearance:none; flex:none; border:0!important; background:#f4f4f4!important; color:#414042!important; padding:0!important; height:34px; width:34px; display:grid; place-items:center; border-radius:8px!important; font-size:24px!important; cursor:pointer; }
.mh-share-quote { display:block; margin:14px 20px!important; padding:7px 12px!important; color:#414042; background:#fff8e6; border:0!important; border-right:3px solid #c92a10!important; font-size:13px; line-height:2; max-height:125px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.mh-share-status { color:#777; font-size:12px; line-height:1.8; padding:0 20px; margin:9px 0!important; }
.mh-share-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:5px 20px 0; }
.mh-share-options .mh-share-item { appearance:none!important; display:flex!important; align-items:center!important; justify-content:center!important; min-width:0; min-height:43px; text-align:center; text-decoration:none!important; border-radius:8px!important; border:1px solid #d8d8d8!important; background:#fff!important; color:#414042!important; padding:10px 8px!important; font:600 13px/1.5 inherit!important; cursor:pointer; box-shadow:none!important; }
.mh-share-options .mh-share-item:hover,.mh-share-options .mh-share-item:focus-visible { color:#c92a10!important; border-color:#c92a10!important; outline:2px solid transparent; background:#fff7f4!important; }
.mh-share-options .mh-share-copy { grid-column:1/-1; background:#414042!important; border-color:#414042!important; color:#fff!important; }
.mh-share-options .mh-share-copy:hover,.mh-share-options .mh-share-copy:focus-visible { color:#fff!important; background:#c92a10!important; }
@media (max-width:600px) {
 .mh-share-overlay { padding:10px; align-items:flex-end; }
 .mh-share-panel { max-height:90vh; border-radius:14px 14px 10px 10px; }
 .mh-share-head { padding:13px 15px; }
 .mh-share-options { padding:6px 14px 0; }
 .mh-share-quote { margin:12px 14px!important; }
 .mh-share-status { padding:0 14px; }
}
.mh-share-panel .mh-share-url { display:block!important; width:calc(100% - 40px)!important; box-sizing:border-box!important; margin:9px 20px 11px!important; padding:9px!important; height:39px!important; background:#f8f8f8!important; border:1px solid #ddd!important; color:#414042!important; direction:ltr!important; text-align:left!important; border-radius:7px!important; font:13px/1.4 Arial,sans-serif!important; }
.mh-share-panel .mh-share-url:focus-visible { border-color:#c92a10!important; outline:1px solid #c92a10!important; }
@media (max-width:600px) { .mh-share-panel .mh-share-url { margin:9px 14px!important; width:calc(100% - 28px)!important; } }

/* v1.2: the source-text action is full width for readability on phones. */
.mh-share-options .mh-share-copy-text { grid-column:1/-1; }

/* v1.3: on touch devices the action bar is anchored below the selected
   paragraph, or docked to the visible viewport bottom when that paragraph
   extends below the screen. Respect iPhone safe areas and narrow screens. */
.mh-floating-toolbar.mh-mobile {
  max-width:calc(100vw - 20px);
  justify-content:space-around;
  border:1px solid rgba(255,255,255,.2);
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.mh-floating-toolbar.mh-mobile-docked {
  border-radius:12px;
  box-shadow:0 8px 30px rgba(0,0,0,.33);
  padding-bottom:max(5px, env(safe-area-inset-bottom))!important;
}
@media (max-width:600px) {
  .mh-floating-toolbar.mh-mobile { padding:4px!important; gap:1px!important; }
  .mh-floating-toolbar.mh-mobile button {
    padding:10px 8px!important;
    min-height:44px!important;
    font-size:12px!important;
  }
  .mh-floating-toolbar.mh-mobile svg { width:15px; height:15px; }
}
