/* Publication Type Badges */
.publication-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.6em;
  margin-bottom: 0.6em;
}

/* Reduced margin on publication pages */
.article-container .publication-badges,
.page-header .publication-badges {
  margin-top: 0.3em;
}

.pub-type-badge {
  display: inline-block !important;
  padding: 0.35em 0.75em;
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1;
  color: #fff !important;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border-radius: 0.4rem;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

a.pub-type-badge,
a.pub-type-badge:visited,
a.pub-type-badge:link {
  color: #fff !important;
}

a.pub-type-badge:hover,
a.pub-type-badge:focus {
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  filter: brightness(1.15);
}

/* Ensure badges work in all contexts including .media containers */
.media .pub-type-badge,
.stream-item .pub-type-badge,
.article-metadata .pub-type-badge {
  display: inline-block !important;
  color: #fff !important;
}

.pub-type-badge i {
  margin-right: 0.25em;
  font-size: 0.75rem;
}

/* Conference paper - Blue */
.pub-type-conf {
  background-color: #2196F3 !important;
}

/* Journal article - Green */
.pub-type-journal {
  background-color: #4CAF50 !important;
}

/* Preprint - Orange */
.pub-type-preprint {
  background-color: #FF9800 !important;
}

/* Report - Orange (same as preprint) */
.pub-type-report {
  background-color: #FF9800 !important;
}

/* Thesis - Dark Blue */
.pub-type-thesis {
  background-color: #1565C0 !important;
}

/* Software - Purple */
.pub-type-software {
  background-color: #9C27B0 !important;
}

/* Book - Brown */
.pub-type-book {
  background-color: #795548 !important;
}

/* Book section - Brown (same as book) */
.pub-type-book-section {
  background-color: #795548 !important;
}

/* Patent - Teal */
.pub-type-patent {
  background-color: #009688 !important;
}

/* Uncategorized - Gray */
.pub-type-uncat {
  background-color: #757575 !important;
}

/* Open Science Badges */
.open-science-badge {
  display: inline-block;
  height: 46.5px !important;
  width: auto !important;
  vertical-align: middle;
  cursor: pointer;
}

/* Larger badges on publication pages */
.article-container .open-science-badge,
.page-header .open-science-badge {
  height: 54px !important;
}

/* Open Science Badge Modal Popup */
#open-science-popup {
  display: none;
  position: absolute;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 15px;
  z-index: 99999;
  text-align: center;
  width: 200px;
}

#open-science-popup img {
  display: block;
  height: 112px;
  width: auto;
  margin: 0 auto 10px;
}

#open-science-popup a {
  display: block;
  font-size: 0.425rem;
  color: #2196F3 !important;
  background-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

#open-science-popup a:hover {
  text-decoration: underline;
  color: #1976D2 !important;
}
