/* INFOZONA 9.7.84 — readable actions and article tags.
 * Deliberately color-only: do not modify layout, padding, min-height, sizes,
 * position, display or the reserved geometry of ads. Keep plugin controls
 * outside the selectors except the known TagMate article-tag link.
 */
:root {
  --iz-button-blue: #1b4b91;
  --iz-button-hover: #123a73;
  --iz-button-active: #0b2b57;
  --iz-button-soft: #eaf2ff;
  --iz-button-soft-hover: #dceafd;
  --iz-button-ink: #163d70;
  --iz-button-border: #b8cde8;
  --iz-button-focus: #f4b942;
}

/* Main editorial actions — strong blue with readable white lettering. */
html body :is(
  .atlas-button:not(.atlas-button--ghost):not(.atlas-button--soft),
  .atlas-search-form__button,
  .atlas-category-showcase__button,
  .atlas-more-button,
  .atlas-region-panel__cta:not(.atlas-region-panel__cta--ghost),
  .iz-region-exit__primary,
  .iz-region-article-tip__button
) {
  background-color: var(--iz-button-blue) !important;
  border-color: var(--iz-button-blue) !important;
  color: #fff !important;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
html body :is(
  .atlas-button:not(.atlas-button--ghost):not(.atlas-button--soft),
  .atlas-search-form__button,
  .atlas-category-showcase__button,
  .atlas-more-button,
  .atlas-region-panel__cta:not(.atlas-region-panel__cta--ghost),
  .iz-region-exit__primary,
  .iz-region-article-tip__button
):is(:hover,:focus-visible) {
  background-color: var(--iz-button-hover) !important;
  border-color: var(--iz-button-hover) !important;
  color: #fff !important;
}
html body :is(
  .atlas-button:not(.atlas-button--ghost):not(.atlas-button--soft),
  .atlas-search-form__button,
  .atlas-category-showcase__button,
  .atlas-more-button,
  .atlas-region-panel__cta:not(.atlas-region-panel__cta--ghost),
  .iz-region-exit__primary,
  .iz-region-article-tip__button
):active {
  background-color: var(--iz-button-active) !important;
  border-color: var(--iz-button-active) !important;
}

/* Secondary actions — restrained ice blue, never pale text on pale blue. */
html body :is(
  .atlas-button--ghost,
  .atlas-button--soft,
  .atlas-region-panel__cta--ghost,
  .iz-region-exit__event
) {
  background: var(--iz-button-soft) !important;
  border-color: var(--iz-button-border) !important;
  color: var(--iz-button-ink) !important;
}
html body :is(
  .atlas-button--ghost,
  .atlas-button--soft,
  .atlas-region-panel__cta--ghost,
  .iz-region-exit__event
):is(:hover,:focus-visible) {
  background: var(--iz-button-soft-hover) !important;
  border-color: #91b4e2 !important;
  color: #0b2b57 !important;
}
/* Existing single-post contrast rules would otherwise turn ghost text white. */
html body.single-post .atlas-comments-box :is(.atlas-button--ghost,.atlas-button--soft),
html body.single-post .atlas-premium-article-gate :is(.atlas-button--ghost,.atlas-button--soft) {
  background: var(--iz-button-soft) !important;
  border-color: var(--iz-button-border) !important;
  color: var(--iz-button-ink) !important;
}

/* Tags flagged by Lighthouse: readable text on light blue, blue hover.
 * Match only post-tag links, not videos, ads or general plugin components. */
html body.single-post :is(
  a.tagmate-post-tag__link,
  .atlas-single-page-grid__main a[rel~="tag"],
  .atlas-single-page-grid__main .atlas-tags a,
  .atlas-single-page-grid__main .atlas-post-tags a,
  .atlas-single-page-grid__main .wp-block-post-terms a
) {
  background-color: var(--iz-button-soft) !important;
  color: var(--iz-button-ink) !important;
  border-color: var(--iz-button-border) !important;
  text-decoration: none !important;
}
html body.single-post :is(
  a.tagmate-post-tag__link,
  .atlas-single-page-grid__main a[rel~="tag"],
  .atlas-single-page-grid__main .atlas-tags a,
  .atlas-single-page-grid__main .atlas-post-tags a,
  .atlas-single-page-grid__main .wp-block-post-terms a
):is(:hover,:focus-visible) {
  background-color: var(--iz-button-blue) !important;
  color: #fff !important;
  border-color: var(--iz-button-blue) !important;
}
/* Respect existing pill geometry, but prevent nested text from staying pale. */
html body.single-post a.tagmate-post-tag__link :is(span,strong,small,b),
html body.single-post .atlas-single-page-grid__main a[rel~="tag"] :is(span,strong,small,b) {
  color: inherit !important;
}

/* High-visibility keyboard focus; a visible outline does not move layout. */
html body :is(
  .atlas-button,
  .atlas-search-form__button,
  .atlas-category-showcase__button,
  .atlas-more-button,
  .atlas-region-panel__cta,
  .iz-region-exit__primary,
  .iz-region-exit__event,
  .iz-region-article-tip__button,
  .tagmate-post-tag__link
):focus-visible {
  outline: 3px solid var(--iz-button-focus) !important;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html body :is(.atlas-button,.atlas-search-form__button,.atlas-category-showcase__button,.atlas-more-button,.atlas-region-panel__cta,.iz-region-exit__primary,.iz-region-exit__event,.iz-region-article-tip__button) {
    transition: none !important;
  }
}


/* INFOZONA 9.7.85 – article tags/pills 15% smaller.
 * Scale complete pill (text, icon, border and padding) instead of only the
 * font. `zoom` participates in layout, unlike transform:scale(), so adjacent
 * tags also close up without leaving invisible full-size click targets.
 * Keep the color/contrast and focus styles from 9.7.84 intact.
 */
html body a.tagmate-post-tag__link,
html body.single-post .atlas-single-page-grid__main :is(
  a[rel~="tag"],
  .tags-links a,
  .tagcloud a,
  .wp-block-post-terms a,
  .atlas-post-tags a,
  .atlas-story-tags a,
  .atlas-tags a
) {
  zoom: 85% !important;
}
/* Legacy browser fallback (modern Chromium/Firefox/Safari support zoom). */
@supports not (zoom: 85%) {
  html body a.tagmate-post-tag__link,
  html body.single-post .atlas-single-page-grid__main :is(
    a[rel~="tag"], .tags-links a, .tagcloud a, .wp-block-post-terms a,
    .atlas-post-tags a, .atlas-story-tags a, .atlas-tags a
  ) { font-size: 85% !important; }
}
