/* Bounded, role-aware toolkit. The document behind the modal stays in place. */
.clarity-tool-gallery {
  box-sizing:border-box; position:fixed; inset:0; margin:auto;
  width:min(1120px,calc(100vw - 40px)); max-width:none;
  height:min(668px,calc(100vh - 32px)); height:min(668px,calc(100dvh - 32px));
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  padding:0; border:1px solid #e8eaf0; border-radius:18px;
  background:#fff; color:#253044; box-shadow:0 24px 100px #18223826;
  font-family:inherit; overflow:hidden;
}
.clarity-tool-gallery[open] { display:flex; flex-direction:column; }
.clarity-tool-gallery::backdrop { background:#1821355c; backdrop-filter:blur(3px); }
.clarity-tool-gallery *, .clarity-tool-gallery *::before, .clarity-tool-gallery *::after { box-sizing:border-box; }
.clarity-tool-gallery [hidden] { display:none!important; }
.clarity-tool-gallery .icon { display:block; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.tool-gallery-header { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 24px 12px; }
.tool-gallery-eyebrow { display:block; margin:0 0 3px; color:#8c95a6; font-size:10px; line-height:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.tool-gallery-header h2 { margin:0; font-size:21px; font-weight:600; line-height:1.25; letter-spacing:-.55px; color:#263247; }
.tool-gallery-close { display:grid; place-items:center; flex-shrink:0; width:32px; height:32px; min-height:0; margin:0; padding:6px; border:0; border-radius:8px; color:#7a8597; background:transparent; cursor:pointer; }
.tool-gallery-close:hover { color:#263247; background:#f0f2f6; }
.tool-gallery-controls { flex-shrink:0; display:flex; align-items:center; gap:16px; padding:0 24px 14px; }
.tool-gallery-search { display:flex; align-items:center; gap:9px; flex:1 1 240px; max-width:330px; min-width:180px; height:36px; padding:0 11px; margin:0; border:1px solid #e6e9ef; border-radius:8px; background:#f8f9fb; color:#99a2b1; }
.tool-gallery-search .icon { width:16px; height:16px; }
.tool-gallery-search input { appearance:none; box-shadow:none; outline:0; width:100%; min-width:0; height:100%; min-height:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; font:inherit; font-size:12px; color:#27364d; }
.tool-gallery-search input::placeholder { color:#9099a8; }
.tool-gallery-search:focus-within { background:#fff; border-color:#9baee5; box-shadow:0 0 0 3px #4069d30c; }
.tool-gallery-filters { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-left:auto; }
.tool-gallery-filters button { min-height:32px; margin:0; padding:6px 11px; border:1px solid transparent; border-radius:7px; background:transparent; color:#7b8595; font:inherit; font-size:11px; font-weight:500; line-height:18px; white-space:nowrap; cursor:pointer; }
.tool-gallery-filters button:hover { color:#33496c; background:#f5f7fa; }
.tool-gallery-filters button[aria-pressed=true] { border-color:#e6eaf5; background:#f0f3fa; color:#3e5c9a; }
.tool-gallery-body { min-height:0; flex:1 1 auto; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#dbe0e9 transparent; padding:0 24px 12px; }
.tool-gallery-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:25px; }
.tool-gallery-section { min-width:0; margin:0; padding:0; }
.tool-gallery-section[data-legal-menu] { border:0; margin:0; padding:0; }
.tool-gallery-section h3 { display:flex; align-items:center; gap:7px; margin:0 0 8px; padding:0 6px 9px; border-bottom:1px solid #eef0f4; color:#8490a3; font-size:10px; line-height:14px; font-weight:600; letter-spacing:.055em; text-transform:uppercase; }
.tool-gallery-section h3 span { display:inline-grid; place-items:center; min-width:18px; height:17px; padding:0 4px; border-radius:5px; background:#f1f3f7; color:#9aa4b5; font-size:9px; font-weight:500; letter-spacing:0; }
.tool-gallery-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:3px; }
.tool-gallery-card { display:flex; align-items:center; gap:10px; min-width:0; min-height:44px; padding:5px 7px; border:1px solid transparent; border-radius:9px; color:inherit; text-decoration:none; background:transparent; transition:background .12s,border-color .12s; }
.tool-gallery-card:hover { background:#f6f8fb; border-color:#edf0f5; }
.tool-gallery-card[aria-current=page] { background:#f2f5fc; border-color:#e7ecf8; }
.tool-gallery-icon { display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; border-radius:9px; }
.tool-gallery-icon .icon { width:19px; height:19px; }
.tool-gallery-icon.is-violet { color:#8874cb; background:#f1edfc; }
.tool-gallery-icon.is-blue { color:#648bce; background:#edf3ff; }
.tool-gallery-icon.is-teal { color:#50a19f; background:#eaf6f5; }
.tool-gallery-icon.is-green { color:#6c9f7d; background:#edf6ef; }
.tool-gallery-icon.is-amber { color:#c39755; background:#fbf4e8; }
.tool-gallery-icon.is-rose { color:#c98097; background:#fbf0f4; }
.tool-gallery-label { display:flex; flex:1 1 auto; min-width:0; flex-direction:column; gap:2px; }
.tool-gallery-label strong { display:block; color:#39485f; font-size:12px; font-weight:550; line-height:16px; }
.tool-gallery-label small { display:block; color:#637187; font-size:10.5px; font-weight:400; line-height:13px; }
.tool-gallery-arrow { flex:0 0 auto; padding-left:1px; color:#a1aec2; font-size:15px; line-height:1; opacity:0; }
.tool-gallery-card:hover .tool-gallery-arrow,.tool-gallery-card:focus-visible .tool-gallery-arrow,.tool-gallery-card[aria-current=page] .tool-gallery-arrow { opacity:1; }
.tool-gallery-columns.is-filtered { grid-template-columns:minmax(0,1fr); gap:20px; }
.tool-gallery-columns.is-filtered .tool-gallery-cards { grid-template-columns:repeat(3,minmax(0,1fr)); column-gap:18px; row-gap:8px; }
.tool-gallery-empty { padding:48px 16px 60px; text-align:center; }
.tool-gallery-empty h3 { margin:0 0 8px; font-size:16px; font-weight:600; color:#39485f; }
.tool-gallery-empty p { margin:0 0 18px; font-size:12px; color:#8b95a6; }
.tool-gallery-empty button { min-height:32px; padding:6px 12px; border:1px solid #e4e9f3; border-radius:7px; background:#f3f6fb; color:#5874a7; font:inherit; font-size:11px; cursor:pointer; }
.tool-gallery-footer { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 25px; border-top:1px solid #edf0f5; background:#fcfcfd; color:#a1aaba; font-size:10px; line-height:14px; }
.tool-gallery-footer>span:last-child { display:flex; align-items:center; gap:5px; }
.tool-gallery-footer kbd { padding:0 4px; border:1px solid #e7eaf0; border-radius:4px; color:#a1aaba; background:#fff; font:inherit; font-size:9px; }
body.clarity-workspace #clarity-more :is(button,a):focus-visible { outline:2px solid #8ea7e0; outline-offset:2px; }
body.clarity-workspace #clarity-more .tool-gallery-search input:focus-visible { outline:0; box-shadow:none; }
@media (min-width:901px) and (max-height:680px) {
  .tool-gallery-header { padding-block:13px 10px; }
  .tool-gallery-controls { padding-bottom:12px; }
  .tool-gallery-cards { gap:2px; }
  .tool-gallery-card { min-height:40px; padding-block:3px; }
  .tool-gallery-icon { width:28px; height:28px; flex-basis:28px; border-radius:8px; }
  .tool-gallery-icon .icon { width:18px; height:18px; }
}
@media (max-width:900px) {
  .clarity-tool-gallery { width:calc(100vw - 32px); }
  .tool-gallery-controls { flex-wrap:wrap; gap:10px; }
  .tool-gallery-search { max-width:none; flex-basis:100%; }
  .tool-gallery-filters { margin-left:0; }
  .tool-gallery-columns { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
  .tool-gallery-columns.is-filtered .tool-gallery-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .clarity-tool-gallery { width:calc(100vw - 20px); height:calc(100dvh - 20px); max-height:calc(100dvh - 20px); border-radius:14px; }
  .tool-gallery-header { padding:17px 17px 13px; }
  .tool-gallery-header h2 { font-size:20px; }
  .tool-gallery-controls { padding:0 17px 15px; }
  .tool-gallery-filters { gap:2px; }
  .tool-gallery-filters button { padding-inline:7px; font-size:10px; }
  .tool-gallery-body { padding:0 13px 16px; }
  .tool-gallery-columns,.tool-gallery-columns.is-filtered { grid-template-columns:minmax(0,1fr); gap:23px; }
  .tool-gallery-columns.is-filtered .tool-gallery-cards { grid-template-columns:minmax(0,1fr); gap:4px; }
  .tool-gallery-card { min-height:49px; padding:7px 8px; }
  .tool-gallery-label strong { font-size:12px; }
  .tool-gallery-label small { font-size:10.5px; }
  .tool-gallery-arrow { opacity:.65; }
  .tool-gallery-footer { padding-inline:20px; }
}
@media (prefers-reduced-motion:reduce) { .tool-gallery-card { transition:none; } }
