/* =========================
   Posts
   ========================= */

.post-taxonomy-picker {
  position: relative;
}

.post-taxonomy-picker-shell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: #fff;
  cursor: text;
}

.post-taxonomy-picker-shell:focus-within,
.post-taxonomy-picker-shell.is-open {
  border-color: #111;
}

.post-taxonomy-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-taxonomy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f1f1;
  font-size: 13px;
  line-height: 1;
}

.post-taxonomy-pill-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.post-taxonomy-search {
  flex: 1 1 160px;
  min-width: 120px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 4px 0;
}

.post-taxonomy-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  max-height: 240px;
  overflow: auto;
}

.post-media-picker,
.post-gallery-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-media-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #fff;
}

.post-media-card-meta {
  min-width: 0;
}

.post-media-preview-image {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.post-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.post-gallery-item {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d7d7d7;
  background: #fff;
}

.post-gallery-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.post-gallery-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.post-gallery-remove:hover {
  opacity: 0.9;
}

.post-media-open-button,
.post-gallery-open-button,
.post-open-featured-image-button {
  appearance: none;
  border: 1px solid #1f1f1f;
  background: #1f1f1f;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
}

.post-media-open-button:hover,
.post-gallery-open-button:hover,
.post-open-featured-image-button:hover {
  opacity: 0.92;
}