/*!
* Last modified: 2022/05/17 15:21:19
* Part of the WordPress plugin PublishPress Tag Groups
* Plugin URI: https://publishpress.com/tag-groups/
* Author: Christoph Amthor
* License: GNU GENERAL PUBLIC LICENSE, Version 3
*/

.tag-groups-tag-list h3,
.tag-groups-alphabetical-index h3 {
  margin: 0 !important;
}

.tag-groups-tag-list-tags,
.tag-groups-alphabetical-index-tags {
  margin: 10px 0 20px;
  overflow: hidden;
}

.tag-groups-keep-together {
  overflow: hidden;
  /* fix for Firefox */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

/* fixing next tab moving up when selecting last in first row */
.tag-groups-tag-list .tag-groups-tag, .tag-groups-alphabetical-index .tag-groups-tag {
  display: block;
}

.tag-groups-tag-list h3, .tag-groups-alphabetical-index h3 {
  margin: 0;
}

.tag-groups-tag-list-tags, .tag-groups-alphabetical-index-tags {
  margin: 10px 0 20px;
  overflow: hidden;
}

.tag-groups-keep-together {
  overflow: hidden;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.ui-tabs .ui-tabs-nav li {
  margin-bottom: 1px !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active {
  margin-bottom: 0;
}

.tag-groups-cloud-hidden {
  opacity: 0;
}

.tg-box-shadow {
  -webkit-box-shadow: 10px 10px 20px 0px #b5b5b5;
  -moz-box-shadow: 10px 10px 20px 0px #b5b5b5;
  box-shadow: 10px 10px 20px 0px #b5b5b5;
}

.tg-border-radius-10 {
  border-radius: 10px;
  overflow: hidden;
}

.SumoSelect {
  width: auto;
}

/* Accessibility */
/* screen reader only text (inline styles in the markup are the fallback) */
.tag-groups-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* visible keyboard focus; overrides outline:0 of some jQuery UI themes */
.tag-groups-cloud [role=tab]:focus-visible, .tag-groups-cloud .ui-accordion-header:focus-visible, .tag-groups-cloud .tag-groups-accordion-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* opt-in: shortcode attribute target_size="1" */
.tag-groups-target-size .tag-groups-tag a {
  display: inline-block;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 0;
  box-sizing: border-box;
}

/* reflow on narrow screens */
@media (max-width: 480px) {
  .tag-groups-columns {
    column-count: 1 !important;
  }
  .tag-groups-tag a,
  .tag-groups-cloud .ui-tabs-nav .ui-tabs-anchor {
    overflow-wrap: anywhere;
  }
  .tag-groups-cloud .ui-tabs-nav li {
    white-space: normal;
    max-width: 100%;
  }
/* Tag icons (show_icons="1"); inline SVG from Font Awesome Free, sized to the tag text */
.tag-groups-tag .tag-groups-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.3em;
  fill: currentColor;
  vertical-align: -0.125em;
  overflow: visible;
}

/* Letter strip for Alphabetical Tabs (letter_strip="1") */
.tag-groups-letter-strip {
  --tg-strip-ink: #1f1d24;
  --tg-strip-ink-text: #ffffff;
  --tg-strip-border: #d9d6e3;
  --tg-strip-muted: #6b6680;
  --tg-strip-accent: #5b3fa8;
  --tg-strip-size: 2em;
}

.tag-groups-letter-strip.ui-tabs {
  padding: 0;
  border: 0;
  background: none;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav::before,
.tag-groups-letter-strip.ui-tabs .ui-tabs-nav::after {
  display: none;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li {
  float: none;
  margin: 0 !important;
  padding: 0;
  border: 1px solid var(--tg-strip-border);
  border-radius: 5px;
  background: none;
  list-style: none;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li a,
.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li > span {
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  width: var(--tg-strip-size);
  height: var(--tg-strip-size);
  padding: 0;
  color: var(--tg-strip-ink);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li.ui-tabs-active {
  border-color: var(--tg-strip-ink);
  background: var(--tg-strip-ink);
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li.ui-tabs-active a {
  color: var(--tg-strip-ink-text);
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li:not(.ui-tabs-active):not(.tag-groups-letter-empty):hover {
  border-color: var(--tg-strip-accent);
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li a:focus-visible {
  outline: 2px solid var(--tg-strip-accent);
  outline-offset: 2px;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li.tag-groups-letter-empty {
  border-color: transparent;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-nav li.tag-groups-letter-empty > span {
  color: var(--tg-strip-muted);
  opacity: 0.45;
  cursor: default;
}

.tag-groups-letter-strip.ui-tabs .ui-tabs-panel {
  display: grid;
  gap: 0.3em;
  max-width: 22em;
  margin-top: 0.9em;
  padding: 0.1em 0 0.1em 0.9em;
  border: 0;
  border-left: 2px solid var(--tg-strip-accent);
  background: none;
}

.tag-groups-letter-strip .ui-tabs-panel[aria-hidden=true] {
  display: none;
}

.tag-groups-letter-strip .tag-groups-tag,
.tag-groups-letter-strip .tag-groups-tag .tag-groups-label {
  font-size: 1em !important;
}

.tag-groups-letter-strip .tag-groups-tag a {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  text-decoration: none;
}

.tag-groups-letter-strip .tag-groups-tag a:hover .tag-groups-label {
  text-decoration: underline;
}

.tag-groups-letter-strip .tag-groups-count {
  color: var(--tg-strip-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
}

/* Search panel (search_panel="1") */
.tag-groups-search-panel {
  --tg-search-accent: #5b3fa8;
  --tg-search-accent-soft: #ece7fb;
  --tg-search-border: #d9d6e3;
  --tg-search-muted: #6b6680;
  --tg-search-bg: transparent;
  display: grid;
  gap: 0.75em;
  margin-block: 0 1.25em;
  box-sizing: border-box;
  padding: 1em;
  border: 1px solid var(--tg-search-border);
  border-radius: 10px;
  background: var(--tg-search-bg);
}

.tag-groups-search-panel [hidden] {
  display: none !important;
}

.tag-groups-search-label {
  font-weight: 600;
}

.tag-groups-search-panel .tag-groups-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em 0.75em;
  border: 1px solid var(--tg-search-border);
  border-radius: 6px;
  font: inherit;
}

.tag-groups-search-panel .tag-groups-search-input:focus {
  outline: 2px solid var(--tg-search-accent);
  outline-offset: 1px;
}

.tag-groups-search-section {
  display: grid;
  gap: 0.4em;
}

.tag-groups-search-heading {
  color: var(--tg-search-muted);
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-groups-search-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.tag-groups-search-panel .tag-groups-search-chip {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 5px;
  background: var(--tg-search-accent-soft);
  color: var(--tg-search-accent);
  font-size: 0.9em;
  text-decoration: none;
}

.tag-groups-search-panel .tag-groups-search-chip:hover,
.tag-groups-search-panel .tag-groups-search-chip:focus-visible {
  background: var(--tg-search-accent);
  color: #ffffff;
}

.tag-groups-search-panel .tag-groups-search-chip:focus-visible {
  outline: 2px solid var(--tg-search-accent);
  outline-offset: 2px;
}

.tag-groups-search-recent .tag-groups-search-chip {
  border: 1px dashed var(--tg-search-border);
  background: transparent;
  color: var(--tg-search-muted);
}

.tag-groups-search-chip mark {
  background: none;
  color: inherit;
  font-weight: 700;
}

.tag-groups-search-empty {
  margin: 0;
  color: var(--tg-search-muted);
}

/* Tag style: Label Maker (tag_style="label-maker") */
.tag-groups-style-label-maker {
	--tg-label-bg: #1f1d24;
	--tg-label-color: #f4f2f7;
	--tg-label-bg-alt-1: #b4492f;
	--tg-label-bg-alt-2: #0f7c74;
	--tg-label-font: "Courier New", Courier, ui-monospace, monospace;
}
.tag-groups-style-label-maker .tag-groups-tag {
	display: inline-block;
	margin: 0 0.35em 0.55em 0;
	line-height: 1.2;
}
.tag-groups-style-label-maker .tag-groups-tag a,
.tag-groups-style-label-maker .ui-widget-content .tag-groups-tag a {
	display: inline-block;
	padding: 0.2em 0.65em;
	border-radius: 2px;
	background: var(--tg-label-bg);
	color: var(--tg-label-color);
	font-family: var(--tg-label-font);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	text-decoration: none;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.18);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}
.tag-groups-style-label-maker .tag-groups-tag a span {
	font-family: inherit;
}
.tag-groups-style-label-maker .tag-groups-tag:nth-child(3n) a {
	background: var(--tg-label-bg-alt-1);
	transform: rotate(-2deg);
}
.tag-groups-style-label-maker .tag-groups-tag:nth-child(4n) a {
	background: var(--tg-label-bg-alt-2);
	transform: rotate(1.5deg);
}
.tag-groups-style-label-maker .tag-groups-tag:nth-child(5n) a {
	transform: rotate(-1deg);
}
.tag-groups-style-label-maker .tag-groups-tag a:hover,
.tag-groups-style-label-maker .tag-groups-tag a:focus-visible {
	color: var(--tg-label-color);
	transform: rotate(0) translateY(-1px);
}
.tag-groups-style-label-maker .tag-groups-tag a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.tag-groups-style-label-maker .tag-groups-tag a {
		transition: none;
	}
}

/* Tag style: Heat Cloud (tag_style="heat") */
/* All tags share one size; popularity is shown by color strength. --tg-heat (0-100) is set per tag. */
.tag-groups-style-heat {
	--tg-heat-hue: 258;
	--tg-heat-saturation: 48%;
	--tg-heat-size: 15px;
	--tg-heat-color: #1f1d24;
	--tg-heat-color-hot: #ffffff;
}
.tag-groups-style-heat .tag-groups-tag {
	display: inline-block;
	margin: 0 0.3em 0.45em 0;
	font-size: var(--tg-heat-size) !important;
	line-height: 1.3;
}
.tag-groups-style-heat .tag-groups-tag .tag-groups-label,
.tag-groups-style-heat .tag-groups-tag .tag-groups-prepend,
.tag-groups-style-heat .tag-groups-tag .tag-groups-append {
	font-size: var(--tg-heat-size) !important;
}
.tag-groups-style-heat .tag-groups-tag a,
.tag-groups-style-heat .ui-widget-content .tag-groups-tag a {
	display: inline-block;
	padding: 0.3em 0.7em;
	border-radius: 6px;
	background: hsl(var(--tg-heat-hue), var(--tg-heat-saturation), calc(94% - var(--tg-heat, 0) * 0.66%));
	color: var(--tg-heat-color);
	font-weight: 600;
	text-decoration: none;
	transition: filter 0.15s ease;
}
.tag-groups-style-heat .tag-groups-tag.tg-heat-hot a,
.tag-groups-style-heat .ui-widget-content .tag-groups-tag.tg-heat-hot a {
	color: var(--tg-heat-color-hot);
}
.tag-groups-style-heat .tag-groups-tag a:hover,
.tag-groups-style-heat .tag-groups-tag a:focus-visible {
	filter: brightness(0.92);
}
.tag-groups-style-heat .tag-groups-tag a:focus-visible {
	outline: 2px solid hsl(var(--tg-heat-hue), var(--tg-heat-saturation), 35%);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.tag-groups-style-heat .tag-groups-tag a {
		transition: none;
	}
}

/* Tag style: Count Pills (tag_style="count-pills") */
/* Same-size rounded chips with the post count in a badge */
.tag-groups-style-count-pills {
	--tg-pill-size: 14px;
	--tg-pill-bg: #ffffff;
	--tg-pill-color: #1f1d24;
	--tg-pill-border: #d9d6e3;
	--tg-pill-accent: #5b3fa8;
	--tg-pill-badge-bg: #ece7fb;
}
.tag-groups-style-count-pills .tag-groups-tag {
	display: inline-block;
	margin: 0 0.3em 0.45em 0;
	font-size: var(--tg-pill-size) !important;
	line-height: 1.3;
}
.tag-groups-style-count-pills .tag-groups-tag .tag-groups-label,
.tag-groups-style-count-pills .tag-groups-tag .tag-groups-prepend,
.tag-groups-style-count-pills .tag-groups-tag .tag-groups-append {
	font-size: var(--tg-pill-size) !important;
}
.tag-groups-style-count-pills .tag-groups-tag a,
.tag-groups-style-count-pills .ui-widget-content .tag-groups-tag a {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.2em 0.25em 0.2em 0.8em;
	border: 1px solid var(--tg-pill-border);
	border-radius: 999px;
	background: var(--tg-pill-bg);
	color: var(--tg-pill-color);
	font-weight: 500;
	text-decoration: none;
	transition: border-color 0.15s ease;
}
.tag-groups-style-count-pills .tag-groups-count {
	min-width: 1.6em;
	padding: 0.1em 0.5em;
	border-radius: 999px;
	background: var(--tg-pill-badge-bg);
	color: var(--tg-pill-accent);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 0.8em;
	font-variant-numeric: tabular-nums lining-nums;
	text-align: center;
}
.tag-groups-style-count-pills .tag-groups-tag a:hover,
.tag-groups-style-count-pills .tag-groups-tag a:focus-visible {
	border-color: var(--tg-pill-accent);
	color: var(--tg-pill-color);
}
.tag-groups-style-count-pills .tag-groups-tag a:focus-visible {
	outline: 2px solid var(--tg-pill-accent);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.tag-groups-style-count-pills .tag-groups-tag a {
		transition: none;
	}
}

/* Tag style: Image Cards (tag_style="image-cards") */
/* Each tag is a portrait card with its image (Edit Tag screen) behind the name and post count */
.tag-groups-style-image-cards {
	--tg-card-width: 9.5em;
	--tg-card-radius: 10px;
	--tg-card-text: #ffffff;
	--tg-card-placeholder-1: #5b3fa8;
	--tg-card-placeholder-2: #0f7c74;
	--tg-card-placeholder-3: #b4492f;
	--tg-card-focus: #5b3fa8;
}
.tag-groups-style-image-cards .tag-groups-tag {
	display: inline-block;
	width: var(--tg-card-width);
	max-width: 100%;
	margin: 0 0.5em 0.6em 0;
	font-size: 15px !important;
	line-height: 1.25;
	vertical-align: top;
}
.tag-groups-style-image-cards .tag-groups-tag .tag-groups-label,
.tag-groups-style-image-cards .tag-groups-tag .tag-groups-prepend,
.tag-groups-style-image-cards .tag-groups-tag .tag-groups-append {
	font-size: 1em !important;
}
.tag-groups-style-image-cards .tag-groups-tag a,
.tag-groups-style-image-cards .ui-widget-content .tag-groups-tag a {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 3 / 4;
	padding: 0.7em;
	overflow: hidden;
	border-radius: var(--tg-card-radius);
	color: var(--tg-card-text);
	text-decoration: none;
}
.tag-groups-style-image-cards .tag-groups-card-image {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.tag-groups-style-image-cards .tag-groups-card-placeholder {
	background: linear-gradient(150deg, var(--tg-card-placeholder-1), #1f1d24);
}
.tag-groups-style-image-cards .tag-groups-tag:nth-child(3n+2) .tag-groups-card-placeholder {
	background: linear-gradient(150deg, var(--tg-card-placeholder-2), #1f1d24);
}
.tag-groups-style-image-cards .tag-groups-tag:nth-child(3n) .tag-groups-card-placeholder {
	background: linear-gradient(150deg, var(--tg-card-placeholder-3), #1f1d24);
}
.tag-groups-style-image-cards .tag-groups-tag a::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.62));
}
.tag-groups-style-image-cards .tag-groups-tag a > span:not(.tag-groups-card-placeholder) {
	position: relative;
	z-index: 1;
}
.tag-groups-style-image-cards .tag-groups-label {
	font-weight: 700;
}
.tag-groups-style-image-cards .tag-groups-count {
	font-size: 0.75em;
	opacity: 0.9;
}
.tag-groups-style-image-cards .tag-groups-tag a:hover .tag-groups-card-image {
	transform: scale(1.04);
}
.tag-groups-style-image-cards .tag-groups-tag a:hover,
.tag-groups-style-image-cards .tag-groups-tag a:focus-visible {
	color: var(--tg-card-text);
}
.tag-groups-style-image-cards .tag-groups-tag a:focus-visible {
	outline: 3px solid var(--tg-card-focus);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.tag-groups-style-image-cards .tag-groups-card-image {
		transition: none;
	}
}
