.compose-gif-btn {
  background: none;
  border: 1px solid #2f3b44;
  border-radius: 3px;
  color: #7e8d97;
  font-size: 11px;
  font-weight: bold;
  font-family: inherit;
  padding: 2px 7px;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.compose-gif-btn:hover {
  border-color: #45dd92;
  color: #45dd92;
}

.gif-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gif-modal[hidden] {
  display: none;
}

.gif-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.gif-modal-box {
  position: relative;
  background: #15212b;
  border: 1px solid #2f3b44;
  border-radius: 8px;
  width: 500px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.gif-modal-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #2f3b44;
  flex-shrink: 0;
}

.gif-modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gif-modal-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: bold;
  color: #e7e9ea;
}

.gif-wip-badge {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.06em;
  color: #7f7f7f;
  border: 1px solid #818181;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.4;
  vertical-align: middle;
}

.gif-search-input {
  flex: 1;
  padding: 6px 10px;
  background: #0f1419;
  border: 1px solid #2f3b44;
  border-radius: 4px;
  color: #e7e9ea;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.gif-search-input:focus {
  border-color: #45dd92;
}

.gif-search-input::placeholder {
  color: #5c6b73;
}

.gif-modal-close {
  background: none;
  border: none;
  color: #7e8d97;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-family: inherit;
  flex-shrink: 0;
}

.gif-modal-close:hover {
  color: #e7e9ea;
}

.gif-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  align-content: start;
  min-height: 180px;
}

.gif-result-item {
  cursor: pointer;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #0f1419;
  position: relative;
}

.gif-result-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.1s;
}

.gif-result-item:hover img {
  opacity: 0.8;
}

.gif-result-item.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gif-status {
  color: #7e8d97;
  font-size: 13px;
  text-align: center;
  padding: 32px 16px;
  grid-column: 1 / -1;
  align-self: center;
}

.gif-powered {
  padding: 7px 12px;
  border-top: 1px solid #2f3b44;
  text-align: right;
  font-size: 11px;
  flex-shrink: 0;
}

.gif-powered a {
  color: #5c6b73;
  text-decoration: none;
}

.gif-powered a:hover {
  color: #7e8d97;
}
