/* WowLoop Chat UI fixes, 16/11/2026 (Quan). Loaded after the app CSS; Power Ups adds its glass rules later at run time.
   Create Prompt: the description and command fields are one frame (icon, input, counter) holding an input that
   has its own border. The popup glass rule gives that inner input a second frame, and the floating label then sits
   on its border. One frame here: the outer box is the field; the label acts as a placeholder (hidden once there is
   text) so it never has to cut a border on translucent glass.
   The two :not(#…) raise specificity above the glass rule, whose dialog selector carries an id inside :not(). */
[role="dialog"]:not(#wl-fx-a):not(#wl-fx-b) div.rounded-xl.border:has(> div.h-10 > svg + div.relative > input) {
  background-color: var(--wl-field, transparent) !important;
}
[role="dialog"]:not(#wl-fx-a):not(#wl-fx-b) div.h-10:has(> svg) > div.relative > input {
  border-color: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
[role="dialog"]:not(#wl-fx-a):not(#wl-fx-b) div.h-10:has(> svg) > div.relative > input + label {
  background: transparent !important;
  --tw-translate-y: 0.5rem !important;
  --tw-scale-x: 1 !important;
  --tw-scale-y: 1 !important;
  --tw-scale-z: 1 !important;
}
[role="dialog"]:not(#wl-fx-a):not(#wl-fx-b) div.h-10:has(> svg) > div.relative > input:not(:placeholder-shown) + label {
  opacity: 0 !important;
}

/* r2 — MCP Settings filter: like the Tool Library search box. Search icon on the left, the hint stays inside as a
   placeholder (gone once there is text); nothing jumps onto the border. */
#mcp-filter { padding-left: 34px !important; }
div.relative:has(> #mcp-filter)::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  background-color: rgb(var(--text-secondary, 120 124 135)); pointer-events: none; z-index: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
#mcp-filter + label {
  left: 34px !important; top: 50% !important; --tw-translate-y: -50% !important; padding: 0 !important;
  background: transparent !important; font-size: 0.875rem !important; line-height: 1.25rem !important;
}
#mcp-filter:not(:placeholder-shown) + label { opacity: 0 !important; }

/* r2 — Tools menu pins: the pin button shows only while its row is hovered or keyboard-active (always on touch screens), and
   both states use one pin icon: outline when not pinned, filled when pinned (was a crossed-out pin). */
[role="menu"] button:is([aria-label="Pin"], [aria-label="Unpin"]) { position: relative; opacity: 0; transition: opacity 0.15s; }
[role="menu"] [role^="menuitem"]:is(:hover, :focus-visible, [data-active-item]) button:is([aria-label="Pin"], [aria-label="Unpin"]),
[role="menu"] button:is([aria-label="Pin"], [aria-label="Unpin"]):focus-visible { opacity: 1; }
@media (hover: none) { [role="menu"] button:is([aria-label="Pin"], [aria-label="Unpin"]) { opacity: 1; } }
/* r3: any depth (the Artifacts row wraps its icon), so the old icon never shows under ours */
[role="menu"] button:is([aria-label="Pin"], [aria-label="Unpin"]) svg { visibility: hidden; }
[role="menu"] button:is([aria-label="Pin"], [aria-label="Unpin"])::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; background-color: currentColor;
  -webkit-mask: var(--wl-pin) center / contain no-repeat; mask: var(--wl-pin) center / contain no-repeat;
}
[role="menu"] button[aria-label="Pin"] { --wl-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5'/%3E%3Cpath d='M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z'/%3E%3C/svg%3E"); }
[role="menu"] button[aria-label="Unpin"] { --wl-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5'/%3E%3Cpath d='M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z'/%3E%3C/svg%3E"); color: rgb(var(--text-primary, 17 24 39)) !important; }

/* r4 — Model selector "Search models..." (Quan 16/11): the glass field rule framed a 32 px input whose floating label sat on
   the top edge and whose focus ring hugged the frame. Same look as the MCP filter: taller field, search icon, hint centred
   and hidden once typing starts, focus shown on the field's own border (nothing drawn outside it). */
div.relative > #model-search#model-search {
  height: 36px !important; padding: 0 12px 0 34px !important; outline: none !important; box-shadow: none !important;
}
/* r5 (Quan 25/11): no frame around the field, no gold frame on focus; the search icon and the caret show where to type. */
div.relative > #model-search#model-search, div.relative > #model-search#model-search:hover, div.relative > #model-search#model-search:focus, div.relative > #model-search#model-search:focus-visible {
  border-color: transparent !important; background: transparent !important;
}
div.relative:has(> #model-search)::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  background-color: rgb(var(--text-secondary, 120 124 135)); pointer-events: none; z-index: 1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
#model-search + label {
  left: 34px !important; top: 50% !important; transform: translateY(-50%) !important; padding: 0 !important;
  background: transparent !important; font-size: 0.875rem !important; line-height: 1.25rem !important;
}
#model-search:not(:placeholder-shown) + label { opacity: 0 !important; }

/* r6 (Quan 25/11): the submenu searches ("Search My Agents...", "Search Kepler models...") use the same menu markup
   without an id. Same frameless field; the hint hides once typing starts instead of floating onto the top edge.
   :not(#wl-a):not(#wl-b) only lifts specificity above the Power Ups glass field rule. */
div.sticky.top-0 > div.relative > input.peer:not(#wl-a):not(#wl-b),
div.sticky.top-0 > div.relative > input.peer:not(#wl-a):not(#wl-b):hover,
div.sticky.top-0 > div.relative > input.peer:not(#wl-a):not(#wl-b):focus,
div.sticky.top-0 > div.relative > input.peer:not(#wl-a):not(#wl-b):focus-visible {
  border-color: transparent !important; background: transparent !important; outline: none !important; box-shadow: none !important;
}
div.sticky.top-0 > div.relative > input.peer:not(:placeholder-shown) + label { opacity: 0 !important; }

/* r7 (Quan 25/11): after a /skill chip the composer text turns transparent so the chip overlay shows, and the caret
   relies on the class caret-text-primary, which the served Tailwind build never generated: the caret was invisible. */
.caret-text-primary { caret-color: rgb(var(--text-primary)) !important; }
