/* GIF picker: a frosted bottom sheet over the chat. Search pill and close on
   top, topic chips, two balanced columns of GIFs at their own shape, and the
   GIPHY credit GIPHY's terms ask for. */
.gif-picker { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #f2f3f5; overflow: hidden; }
.gif-picker::backdrop { background: #0000008c; }
.gif-picker[open] { display: flex; align-items: flex-end; justify-content: center; }
.gif-picker-sheet {
  display: flex; flex-direction: column; width: min(560px, 100%); height: min(78dvh, 700px);
  padding: 6px 0 0; overflow: hidden;
  border: .5px solid #ffffff1c; border-bottom: 0; border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #24262bf2, #16171bf7 40%);
  -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5);
  box-shadow: 0 -16px 56px #0009, inset 0 .5px 0 #ffffff26;
  animation: gif-picker-in .3s cubic-bezier(.2, .8, .2, 1);
}
.gif-picker-sheet:focus { outline: none; }
@keyframes gif-picker-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gif-picker-grabber { align-self: center; flex: none; width: 36px; height: 5px; margin: 0 0 8px; border-radius: 99px; background: #ffffff38; }
.gif-picker-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gif-picker-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.gif-picker-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: #ffffff14; box-shadow: inset 0 0 0 .5px #ffffff14; color: #9ea2ab; transition: background .15s; }
.gif-picker-search:focus-within { background: #ffffff1f; }
.gif-picker-search svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.gif-picker-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #f4f5f7; font: 400 16px/1 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; -webkit-appearance: none; appearance: none; }
.gif-picker-search input::placeholder { color: #8f939c; }
.gif-picker-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gif-picker-close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #ffffff14; color: #d6d8dd; cursor: pointer; }
.gif-picker-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.gif-picker-chips { flex: none; display: flex; gap: 6px; padding: 12px 14px 10px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.gif-picker-chips::-webkit-scrollbar { display: none; }
.gif-picker-chips button { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: #ffffff12; color: #d9dbe0; font: 500 14px/1 -apple-system, system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.gif-picker-chips button[aria-pressed="true"] { background: #f2f3f5; color: #16171b; font-weight: 600; }
.gif-picker-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 12px; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(180deg, transparent, #000 10px); mask-image: linear-gradient(180deg, transparent, #000 10px); }
.gif-picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-items: start; }
.gif-picker-col { display: grid; gap: 5px; min-width: 0; }
.gif-picker-tile, .gif-picker-skeleton { position: relative; display: block; width: 100%; aspect-ratio: var(--gif-ratio, 1); padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #ffffff0f; }
.gif-picker-tile { cursor: pointer; -webkit-touch-callout: none; transition: transform .12s ease-out; }
.gif-picker-tile img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-select: none; user-select: none; }
.gif-picker-tile:active { transform: scale(.97); }
.gif-picker-skeleton { background: linear-gradient(100deg, #ffffff0a 30%, #ffffff17 50%, #ffffff0a 70%) 0 0 / 300% 100%; animation: gif-picker-shimmer 1.3s ease-in-out infinite; }
@keyframes gif-picker-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.gif-picker-tile.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; border: 3px solid #ffffff4d; border-top-color: #fff; border-radius: 50%; animation: gif-picker-spin .8s linear infinite; }
.gif-picker-tile.is-loading img { opacity: .45; }
@keyframes gif-picker-spin { to { transform: rotate(1turn); } }
.gif-picker-status { margin: 0; padding: 28px 16px; color: #9a9ea8; font: 400 14px/1.45 -apple-system, system-ui, sans-serif; text-align: center; }
.gif-picker-status:empty { display: none; }
.gif-picker-sentinel { display: block; height: 1px; }
.gif-picker-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 18px max(10px, env(safe-area-inset-bottom, 0px)); background: #16171b; box-shadow: 0 -.5px 0 #ffffff12; }
.gif-picker-file { padding: 4px 0; border: 0; background: transparent; color: #c9ccd2; font: 500 14px/1.3 -apple-system, system-ui, sans-serif; cursor: pointer; }
.gif-picker-credit { color: #6f737c; font: 500 11px/1 -apple-system, system-ui, sans-serif; }
.gif-picker-credit b { color: #a4a7ae; font-weight: 800; letter-spacing: .04em; }
.gif-picker.is-unavailable .gif-picker-file { color: #fff; font-weight: 600; }
.gif-picker :is(.gif-picker-close, .gif-picker-file, .gif-picker-chips button):focus { outline: none; }
.gif-picker :is(.gif-picker-close, .gif-picker-file, .gif-picker-chips button, .gif-picker-tile):focus-visible { outline: 2px solid #ffffff8c; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .gif-picker-chips button:not([aria-pressed="true"]):hover, .gif-picker-close:hover { background: #ffffff1f; } }
@media (prefers-reduced-transparency: reduce) { .gif-picker-sheet { background: #1b1c20; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .gif-picker-sheet, .gif-picker-skeleton { animation: none; } .gif-picker-tile { transition: none; } }
