/* bug-widget.css — the "Report a bug" floating widget.
 *
 * Lifted out of components/bug-report-widget.php in v10.172. That file's own
 * note explains why the CSS was inline: Phase 0.5 wanted the widget droppable
 * into the public, owner and admin layouts with "no shared asset/build-
 * pipeline changes", so it could not collide with any of their design
 * systems.
 *
 * That still holds, and nothing about it required the bytes to be re-sent
 * with every page. Every selector is unchanged and still scoped under
 * #gdirBugWidget, so it cannot reach anything else; it is simply fetched
 * once now instead of 4 KB per page view, on all three layouts.
 */
#gdirBugWidget{all:initial}
  #gdirBugWidget *{box-sizing:border-box;font-family:inherit}
  #gdirBugWidgetOpen{
    position:fixed;right:18px;bottom:18px;z-index:2147483000;
    width:46px;height:46px;border-radius:999px;border:none;cursor:pointer;
    background:#1F2937;color:#fff;font-size:19px;display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 14px rgba(0,0,0,.25);opacity:.55;transition:opacity .15s ease,transform .15s ease,bottom .15s ease;
  }
  #gdirBugWidgetOpen:hover{opacity:1;transform:translateY(-1px)}
  /* v5.77 — on mobile widths the public site's bottom nav bar
     (components/mobile-bottombar.php) occupies a fixed 58px + the device's
     safe-area inset along the whole bottom edge, right where this button
     used to sit at bottom:18px — directly on top of that bar's own
     right-most "Profile" avatar tab. Lifting the button above the bar's
     height (plus its own 18px margin) on the same max-width:991.98px
     breakpoint the bar itself uses removes the collision without moving
     the button at all on desktop, where the bar never renders. body's own
     .has-mobile-bottombar class (set by the bar's script) is not relied on
     here since this component can render before or without that script;
     the width-only media query is the correct source of truth for "is a
     bottom bar even possible here". */
  @media(max-width:991.98px){
    #gdirBugWidgetOpen{bottom:calc(58px + env(safe-area-inset-bottom) + 14px)}
    /* v9.75 — the SAME reasoning one bar further up. A detail page stacks
       its own action row (Call / WhatsApp / Add) on top of the site nav,
       so on those pages this button has to clear both or it sits on the
       action a visitor came to tap. Measured at 390x844 with the row
       visible: the button covered its right-hand end. Keyed off the page's
       own wrapper class, which is on the <body>'s subtree exactly when
       that row exists. */
    .lp-editorial ~ #gdirBugWidgetOpen,
    body:has(.lp-editorial) #gdirBugWidgetOpen{bottom:calc(58px + 64px + env(safe-area-inset-bottom) + 14px)}
  }
  /* ── v10.108 · and out of the block panel's way ────────────────────────
     The same rule, for the other place something is pinned to this corner:
     with the block settings docked to the right of the article, this button
     sat on top of its Cancel and Done. Seen in a screenshot the moment the
     rail first rendered. It slides left by the rail's own width rather than
     hiding, because a writer who has just broken something is exactly the
     person who wants to report it. */
  body:has(.blgf-back.is-docked:not([hidden])) #gdirBugWidgetOpen{right:calc(340px + 16px)}
  #gdirBugWidgetOverlay{
    position:fixed;inset:0;z-index:2147483001;background:rgba(0,0,0,.45);
    display:flex;align-items:center;justify-content:center;padding:16px;
  }
  #gdirBugWidgetOverlay[hidden]{display:none}
  #gdirBugWidgetModal{
    background:#fff;color:#1a1a1a;border-radius:14px;max-width:420px;width:100%;
    padding:22px 22px 18px;box-shadow:0 20px 60px rgba(0,0,0,.3);font-size:14px;
  }
  #gdirBugWidgetModal h3{margin:0 0 4px;font-size:17px}
  #gdirBugWidgetModal p{margin:0 0 14px;color:#6b7280;font-size:13px}
  #gdirBugWidgetModal label{display:block;font-size:12.5px;font-weight:600;margin:10px 0 5px;color:#374151}
  #gdirBugWidgetModal label span{font-weight:400;color:#9ca3af}
  #gdirBugWidgetModal textarea,#gdirBugWidgetModal input[type=text]{
    width:100%;border:1px solid #d1d5db;border-radius:8px;padding:8px 10px;font-size:13.5px;color:#1a1a1a;background:#fff;resize:vertical;
  }
  #gdirBugWidgetModal textarea:focus,#gdirBugWidgetModal input[type=text]:focus{outline:2px solid #1F2937;outline-offset:1px}
  .gdirBugWidgetActions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
  .gdirBugWidgetActions button{border-radius:8px;padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid transparent}
  #gdirBugWidgetCancel{background:#fff;border-color:#d1d5db;color:#374151}
  .gdirBugWidgetActions button[type=submit]{background:#1F2937;color:#fff}
  @media (prefers-reduced-motion: reduce){#gdirBugWidgetOpen{transition:none}}
