/* Social embed alignment and styling */
.bluesky-embed,
.reddit-embed-bq,
.reddit-embed-bq iframe,
.twitter-tweet,
.youtube-embed,
.instagram-embed {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 550px;
}

/* Ensure post content embeds are left-aligned */
.post-summary-content .bluesky-embed,
.post-summary-content .reddit-embed-bq,
.post-summary-content .reddit-embed-bq iframe,
.post-summary-content .twitter-tweet,
.post-summary-content .youtube-embed,
.post-summary-content .instagram-embed,
.content .bluesky-embed,
.content .reddit-embed-bq,
.content .reddit-embed-bq iframe,
.content .twitter-tweet,
.content .youtube-embed,
.content .instagram-embed {
  display: block;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* YouTube embed responsive aspect ratio */
.youtube-embed {
  position: relative !important;
  width: 100% !important;
  max-width: 550px !important;
  padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
  height: 0 !important;
  overflow: hidden !important;
}

.youtube-embed iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Override Reddit's centering - target all Reddit elements */
iframe[src*="reddit.com"],
iframe[src*="redd.it"] {
  margin-left: 0 !important;
  margin-right: auto !important;
  display: block !important;
}

/* Reddit blockquote wrapper */
.reddit-embed-bq {
  text-align: left !important;
}

/* Twitter/X embed alignment */
.twitter-tweet-rendered {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Inverted tag colors - light theme gets dark tags, dark theme gets light tags */
:root .tag-chip {
  background: var(--fg) !important;
  color: var(--bg) !important;
  border-color: var(--fg) !important;
}

:root .tag-chip::before {
  color: var(--bg) !important;
  opacity: 0.7;
}

:root .tag-chip:hover {
  background: var(--muted) !important;
  color: var(--bg) !important;
  border-color: var(--muted) !important;
}

:root .tag-chip:hover::before {
  color: var(--bg) !important;
  opacity: 1;
}

/* Current/active tag highlighting - must come after hover to override */
:root .tag-chip.tag-current,
:root .tag-chip.tag-current:hover {
  background: var(--link) !important;
  color: var(--bg) !important;
  border-color: var(--link) !important;
  font-weight: bold !important;
  opacity: 1 !important;
}

:root .tag-chip.tag-current::before,
:root .tag-chip.tag-current:hover::before {
  color: var(--bg) !important;
  opacity: 1 !important;
}

/* Bigger site title/brand */
header .brand,
a.brand {
  font-size: 2rem !important;
  font-weight: 800 !important;
}

/* Site description below title */
.site-description {
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
}

/* Keep share button aligned with title */
.site-header__left {
  align-items: center !important;
}

.site-header__left > div {
  display: flex;
  flex-direction: column;
}

.share-button {
  /* margin-top: -.5rem; */
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.share-button:hover {
  color: var(--link);
  background: none !important;
  border: none !important;
}

.share-button .icon {
  display: block;
}

/* Pagination styling */
.pagination {
  margin: 2rem 0;
  text-align: center;
}

.pagination ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination li {
  display: inline-block !important;
  list-style: none !important;
  margin: 0 !important;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: var(--link);
  color: var(--bg);
  border-color: var(--link);
}

.pagination .active span {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  font-weight: bold;
}

.pagination .active a {
  background: var(--fg) !important;
  color: var(--bg) !important;
  border-color: var(--fg) !important;
  font-weight: bold !important;
  pointer-events: none;
}

.pagination li.ellipsis {
  padding: 0.5rem 0.75rem !important;
  color: var(--muted) !important;
  list-style: none !important;
}
