/* Taxonomy badges + blog filter controls (shared by /blog/ and post layout) */

.post-tags-row,
.post-taxonomy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.taxonomy-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.32rem 0.72rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid rgba(58, 93, 157, 0.14);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  background: linear-gradient(135deg, rgba(58, 93, 157, 0.07) 0%, rgba(58, 93, 157, 0.13) 100%);
  color: #2a4470;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.taxonomy-badge--md {
  font-size: 0.8rem;
  padding: 0.38rem 0.82rem;
  border-radius: 11px;
}

.taxonomy-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(58, 93, 157, 0.12);
  color: #3a5d9d;
  flex-shrink: 0;
}

.taxonomy-badge__icon svg {
  display: block;
}

.taxonomy-badge__label {
  line-height: 1.2;
}

a.taxonomy-badge:hover {
  background: linear-gradient(135deg, #3a5d9d 0%, #2f4a7a 100%);
  color: #fff;
  border-color: #3a5d9d;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 93, 157, 0.22);
}

a.taxonomy-badge:hover .taxonomy-badge__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.taxonomy-badge[data-slug="api-oficial"] {
  color: #0f6b5c;
  border-color: rgba(18, 140, 126, 0.22);
  background: linear-gradient(135deg, rgba(18, 140, 126, 0.08) 0%, rgba(37, 211, 102, 0.12) 100%);
}

a.taxonomy-badge[data-slug="api-oficial"]:hover {
  background: linear-gradient(135deg, #128c7e 0%, #0f6b5c 100%);
  border-color: #128c7e;
  color: #fff;
}

/* Featured / pinned badges — same chip language as taxonomy-badge */
.post-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.32rem 0.72rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.post-highlight-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.post-highlight-badge__icon svg {
  display: block;
}

.post-highlight-badge--pinned .post-highlight-badge__icon svg {
  transform: rotate(-45deg);
}

.post-highlight-badge__label {
  line-height: 1.2;
}

/* Fixado — primary blue (brand) */
.post-highlight-badge--pinned {
  background: linear-gradient(135deg, rgba(58, 93, 157, 0.1) 0%, rgba(58, 93, 157, 0.16) 100%);
  color: #2a4470;
  border-color: rgba(58, 93, 157, 0.2);
}

.post-highlight-badge--pinned .post-highlight-badge__icon {
  background: rgba(58, 93, 157, 0.14);
  color: #3a5d9d;
}

/* Destaque — warning amber (brand) */
.post-highlight-badge--featured {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.14) 0%, rgba(255, 179, 0, 0.22) 100%);
  color: #7a5a00;
  border-color: rgba(255, 193, 7, 0.35);
}

.post-highlight-badge--featured .post-highlight-badge__icon {
  background: rgba(255, 193, 7, 0.28);
  color: #b8860b;
}

/* Frosted chip on card thumbnails */
.post-highlight-badge--overlay {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14);
}

.post-highlight-badge--overlay.post-highlight-badge--pinned {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(58, 93, 157, 0.22);
}

.post-highlight-badge--overlay.post-highlight-badge--featured {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 193, 7, 0.4);
}

/* Blog filter dropdowns */
.filter-selects {
  display: flex;
  gap: 8px;
  width: 100%;
}

.filter-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.filter-select-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 2px;
}

.filter-select-label-icon {
  width: 12px;
  height: 12px;
  opacity: 0.75;
}

.filter-select-shell {
  position: relative;
}

.filter-select-shell::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  opacity: 0.55;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.filter-select-shell--category::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%233A5D9D' viewBox='0 0 16 16'%3E%3Cpath d='M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3zm8 0A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3zm-8 8A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3zm8 0A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3z'/%3E%3C/svg%3E");
}

.filter-select-shell--highlight::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23e6a700' viewBox='0 0 16 16'%3E%3Cpath d='M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z'/%3E%3C/svg%3E");
}

.filter-select-shell--sort::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 2.5a.5.5 0 0 0-1 0v8.793l-1.146-1.147a.5.5 0 0 0-.708.708l2 1.999.007.007a.497.497 0 0 0 .7-.006l2-2a.5.5 0 0 0-.707-.708L3.5 11.293V2.5zm3.5 1a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zM7.5 6a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zm0 3a.5.5 0 0 0 0 1h1a.5.5 0 0 0 0-1h-1z'/%3E%3C/svg%3E");
}

.filter-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 30px 10px 34px;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  background-color: #fff;
  color: #495057;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-select:hover {
  border-color: #ced4da;
  background-color: #f8f9fa;
}

.filter-select:focus {
  border-color: #3a5d9d;
  box-shadow: 0 0 0 3px rgba(58, 93, 157, 0.12);
  outline: none;
  background-color: #fff;
}

.filter-select.is-active {
  border-color: #3a5d9d;
  background-color: rgba(58, 93, 157, 0.04);
  color: #2f4a7a;
  font-weight: 600;
}

.filter-select-shell--highlight .filter-select.is-active {
  border-color: #e6a700;
  background-color: rgba(255, 193, 7, 0.08);
  color: #856404;
}

.tag-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tag-filter-btn:hover {
  background: linear-gradient(135deg, rgba(58, 93, 157, 0.06) 0%, rgba(58, 93, 157, 0.12) 100%);
  border-color: #3a5d9d;
  color: #3a5d9d;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(58, 93, 157, 0.12);
}

.tag-filter-btn.active {
  background: linear-gradient(135deg, #3a5d9d 0%, #2f4a7a 100%);
  border-color: #3a5d9d;
  color: #fff;
  box-shadow: 0 4px 14px rgba(58, 93, 157, 0.24);
}

.tag-filter-btn.active .tag-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.tag-filter-count {
  background: #eef2f7;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

@media (max-width: 768px) {
  .filter-select-wrap:first-child {
    flex: 1.35;
  }

  .filter-select {
    font-size: 0.8rem;
    padding-right: 26px;
    background-position: right 8px center;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  .taxonomy-badge,
  .tag-filter-btn,
  a.taxonomy-badge:hover {
    transition: none;
    transform: none;
  }
}
