.yal-gif-popover {
  position: fixed;
  z-index: 13000;
  width: min(320px, calc(100vw - 16px));
  max-height: min(420px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid #2f3336;
  background: #000;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.yal-gif-popover-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #2f3336;
}

.yal-gif-search {
  flex: 1;
  border: 1px solid #2f3336;
  border-radius: 999px;
  background: #0f1419;
  color: #e7e9ea;
  padding: 8px 12px;
  font: inherit;
}

.yal-gif-close {
  border: none;
  background: transparent;
  color: #71767b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}

.yal-gif-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 8px;
  overflow: auto;
  min-height: 220px;
}

.yal-gif-tile {
  border: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #16181c;
  aspect-ratio: 1;
}

.yal-gif-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yal-gif-tile:hover {
  outline: 2px solid #1d9bf0;
}

.yal-gif-empty {
  grid-column: 1 / -1;
  padding: 24px 12px;
  text-align: center;
  color: #71767b;
  font-size: 13px;
}

.yal-gif-foot {
  padding: 8px 10px 10px;
  border-top: 1px solid #2f3336;
}

.yal-gif-upload {
  width: 100%;
  border: 1px solid #2f3336;
  border-radius: 999px;
  background: transparent;
  color: #e7e9ea;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.yal-gif-upload:hover {
  background: rgba(29, 155, 240, 0.12);
}
