@font-face {
  font-family: "UbuntuCustom";
  src: url("fonts/ubuntu-custom.ttf") format("truetype");
}

@font-face {
  font-family: "HkGroteskRegular";
  src: url("fonts/hk-grotesk-regular.ttf") format("truetype");
}

body {
  --bg-color: #f3f3e3;
  --border-color: #000;
  --content-bg-color: #f3f3f3;
  --text-color: #431;
  --link-color: #900;
  --link-hover-color: rgba(0, 0, 0, 0.05);
  --unavailable-bg-color: rgba(0, 0, 0, 0.1);
  --unavailable-color: #999;
  --tab-bg-color: #dedede;
  --tab-color: #ddd;
  --tab-hover-color: #ececec;
  --card-border-color: #ccc;
  --card-bg-color: #ddd;
  font-family: "HkGroteskRegular", serif;
  background-color: var(--bg-color);
  padding: 0;
  line-height: 135%;
  overflow-y: scroll;
  overflow: visible;
}
body.dark-mode {
  --bg-color: #000;
  --border-color: #fff;
  --content-bg-color: #242424;
  --text-color: #efefef;
  --link-color: #ff8080;
  --link-hover-color: rgba(100, 100, 100, 0.1);
  --tab-bg-color: #555555;
  --tab-color: #505050;
  --tab-hover-color: #242424;
  --card-border-color: #4c4c4c;
  --card-bg-color: #3f3f3f;
}
body.dark-mode #content {
  border-style: double;
  border-width: 4px;
  border-color: #888;
}
body.dark-mode .tools {
  border-style: double;
  border-width: 4px;
  border-color: #888;
}
header,
#content,
footer {
  color: var(--text-color);
  max-width: 540px;
  border-radius: 7px;
  margin: 0 auto;
  overflow: auto;
}
#content {
  position: relative;
  background-color: var(--content-bg-color);
  font-size: 1em;
  padding: 1em 1.5em 1.5em 1.5em;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
  overflow: visible;
}
footer {
  margin-top: 1em;
  font-size: 0.8em;
  position: relative;
}
footer a {
  padding-right: 1em;
}
header {
  text-align: right;
}
#header-links {
  text-align: left;
  float: left;
  display: inline-block;
  margin-top: 0.25em;
  margin-bottom: 0.5em;
  padding-top: 0.05em;
  padding-bottom: 0.05em;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  background-color: var(--content-bg-color);
  border-radius: 5px;
}
#header-links a {
  padding-top: 0.375em;
  padding-bottom: 0.375em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  border-radius: 3px;
  font-size: 0.9em;
}
#header-links a:first-of-type {
  padding-left: 1em;
}
#header-links a:last-of-type {
  padding-right: 1em;
}
#header-links a:hover {
  background-color: var(--link-hover-color);
}
header h1,
header h2 {
  display: inline-block;
  font-weight: normal;
  margin: 0;
  font-size: 1em;
}
header h1 {
  font-weight: bold;
}

#content #read-marker {
  border: none;
  border-top: 1px solid var(--border-color);
  height: 1px;
  width: 20%;
  clear: left;
}
#content h1:first-child {
  margin-top: 0.5em;
}
#content h1 {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  margin: 2em 0 1em 0;
  font-size: 1.35em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
    rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
a {
  color: var(--link-color);
  text-decoration: none;
}

a.link {
  color: var(--link-color);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
a.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--link-color);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
a.link:hover::after {
  width: 100%;
}

p {
  margin: 0;
  margin-bottom: 1em;
  text-indent: 1em;
}
p.game-over {
  border: 2px solid #bbb;
  padding: 0.5em;
  margin: 0.5em 0 0 0;
  border-radius: 4px;
  color: #999;
}
ul.choices {
  border: 2px solid #876;
  padding: 0;
  margin: 0.25em 0 0 0;
  list-style-type: none;
  border-radius: 4px;
  clear: left;
}
ul.choices li {
  font-size: 1em;
  border-bottom: 1px solid #876;
  padding: 0.5em;
  background: none;
  transition: background 0.3s;
  position: relative;
  overflow: visible;
}
ul.choices li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--link-hover-color);
  z-index: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
ul.choices li:hover::before {
  width: 100%;
}
ul.choices li div.subtitle {
  margin-left: 2em;
  font-style: italic;
  position: relative;
  z-index: 1;
}
ul.choices li.unavailable {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
}
ul.choices li:hover {
  cursor: pointer;
}
ul.choices li > * {
  position: relative;
  z-index: 1;
}
ul.choices li:last-child {
  border-bottom: none;
}
ul.choices a {
  text-decoration: none;
}
blockquote {
  margin: 1em 2em;
}
blockquote.attribution {
  margin-left: 4em;
}
blockquote + blockquote.attribution {
  margin-top: -1em;
}
/* This is mostly copied from undum. */
#mid_panel {
  margin: 0 16rem;
}
#page {
  margin: 0 auto;
  position: relative;
}
#tools_wrapper {
  position: absolute;
  width: 100%;
  max-width: 69em;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.tools {
  padding: 0.6em;
  width: 14rem;
  color: var(--text-color);
  background-color: var(--content-bg-color);
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
}
.tools.left {
  float: left;
  left: 0.4em;
  border-radius: 7px;
}
.tools.right {
  float: right;
  right: 0.4em;
}
#qualities {
  text-indent: 0;
  padding-left: 0.2em;
  padding-right: 0.2em;
}
#qualities p {
  text-indent: 0;
  margin-bottom: 0.75em;
}
#qualities h1 {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  font-size: 1.1em;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: rgba(255, 255, 255, 0.75) 2px 2px 2px,
    rgba(0, 0, 0, 0.1) -1px -1px 2px;
}
#qualities h1 + p:first-line {
  font-weight: normal;
}

/* tabs */
.tab_container {
  background-color: var(--tab-bg-color);
  margin-top: -0.6em;
  margin-left: -0.6em;
  margin-right: -0.6em;
  border-radius: 7px 7px 0 0;
}
.tab_button {
  font-family: "HkGroteskRegular", serif;
  background-color: var(--tab-color);
  color: var(--text-color);
  /*float: left;*/
  border: none;
  outline: none;
  padding: 10px;
  border-radius: 7px 7px 0 0;
}
.tab_button.active {
  background-color: var(--content-bg-color);
}
.tab_button:not(.active):hover {
  background-color: var(--tab-hover-color);
}
.tab_button:hover::after {
  opacity: 1;
  visibility: visible;
}
.tab_button::after {
  content: attr(data-tooltip);
  position: absolute;
  transform: translateX(-80%) translateY(-155%);
  background-color: var(--tab-hover-color);
  padding-top: 5px;
  padding-bottom: 5px;
  padding-left: 7px;
  padding-right: 7px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #d9d9d9;
  font-size: 1em;
  z-index: 1;
}
.tab_button.active::after {
  background-color: var(--content-bg-color);
}

.status-icon {
  width: 1.3em;
  background-color: transparent;
  margin-bottom: -0.2em;
  margin-right: 0.3em;
  margin-left: 0.3em;
  stroke-width: 1px;
}

.overlay {
  background: rgba(0, 0, 0, 0.25);
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  overflow-y: auto;
}

.overlay_top {
  position: relative;
  max-width: 580px;
  margin: 80px auto;
  background: var(--content-bg-color);
  color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  padding: 8px;
}

#saves_table {
  width: 100%;
  font-size: 1em;
  border-spacing: 0px;
}

#saves_table tr {
  border-radius: 8px;
  height: 2em;
}

#saves_table tr:hover {
  border-radius: 8px;
  background: var(--tab-hover-color);
}

#saves_table td {
  padding: 10px;
  vertical-align: middle;
  border-radius: 8px;
  word-break: break-word;
  border: none;
  width: auto;
}
.save_info {
  min-width: 15em;
  font-size: 0.8em;
  color: var(--unavailable-color);
  font-style: italic;
  line-height: 1.25em;
  white-space: pre-line;
}
.save_info .paren {
  display: block;
}
#saves_table td.saveclose {
  margin-top: -1em;
  padding: 0px 0px 10px 10px;
}
#saves_table tr.saveclose:hover {
  background: none;
}

.b {
  background: var(--tab-hover-color);
  border: 1px solid var(--card-border-color);
  border-radius: 5px;
  color: var(--text-color);
  padding: 7px 10px;
  cursor: pointer;
  transition: background-color 0.22s;
  font-size: 0.9em;
  word-break: normal;
}

.b:hover,
.b:focus {
  background: var(--tab-bg-color);
  outline: none;
}

.export_button {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  min-width: 70px;
}

.b.saveclose {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  min-width: 70px;
}

#saves_table input[type="file"] {
  font-size: 0.9em;
  padding: 4px 8px;
}

.background {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: var(--bg-color);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}
/*
 * This is used for overlaying transparencies
 * only transition on fade-in
 * */
#bg2 {
  z-index: -100;
}
#bg1 {
  z-index: -99;
}

.save_button {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  min-width: 70px;
}
.delete_button {
  font-family: "UbuntuCustom", system-ui, -apple-system, BlinkMacSystemFont,
    Ubuntu, Cantarell, sans-serif;
  min-width: 70px;
}
.delete_button:hover {
  background-color: var(--link-color);
  border-color: var(--link-color);
  color: white;
}

/*
 * Card stuff for dendrynexus
 * 
 */

ul.decks,
ul.hand,
ul.pinned-cards {
  list-style: none;
  padding-left: 0;
}

.hand {
  margin-bottom: 0;
}

.pinned-cards {
  margin-bottom: 0;
}

.decks {
  margin-bottom: 0;
}

a.card {
  display: inline-block;
  width: 120px;
  height: 150px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  border: 5px solid var(--card-border-color);
  margin-bottom: 0.5em;
  position: relative;
  border-radius: 7px;
  transition: box-shadow 0.2s, left 0.2s, top 0.2s;
}
a.card:hover {
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
  left: -5px;
  top: -5px;
}
div.blank-card {
  display: inline-block;
  width: 120px;
  height: 150px;
  background-color: var(--card-bg-color);
  border: 5px solid var(--card-border-color);
  margin-bottom: 1.5em;
  border-radius: 7px;
}

.card-in-hand,
.pinned-card,
.deck {
  display: inline-block;
  position: relative;
  max-width: 150px;
  margin-right: 1em;
  margin-bottom: 1em;
  vertical-align: top;
}

/* TODO: unavailable card */
.unavailable-card {
  color: var(--unavailable-color);
  background-color: var(--unavailable-bg-color) !important;
  cursor: default !important;
  border-radius: 7px;
  padding-bottom: 0.25em;
}

.card-caption {
  text-align: center;
  display: block;
  font-size: 1em;
  max-width: 120px;
}

.card-tooltip {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  width: calc(100% - 12px);
  height: calc(100% - 10px);
  font-size: 0.9em;
  font-weight: bold;
  z-index: 2;
  background-color: var(--tab-bg-color);
  left: -5px;
  top: -5px;
  border-radius: inherit;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 12px;
  padding-right: 12px;
  text-wrap: auto;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

a.card:focus .card-tooltip,
a.card:hover .card-tooltip {
  visibility: visible;
  opacity: 0.9;
  position: absolute;
}

.card-img {
  height: 150px;
  width: 120px;
  border-radius: 3px;
  object-fit: cover;
}

a.card:focus .card-tooltip,
a.card:hover .card-tooltip {
  visibility: visible;
  position: absolute;
}

/* Unlike cards, face images can have different sizes. */
.face-figure {
  /*vertical-align: top;*/
  display: inline-block;
  border: 3px solid var(--card-border-color);
  float: left;
  max-width: 35%;
  /*max-height: 180px;*/
  margin-right: 1em;
  margin-bottom: 0.5em;
  overflow: hidden;
  border-radius: 7px;
}
.face-img {
  /*max-width: 150px;*/
  vertical-align: bottom;
  object-fit: cover;
  border-radius: 3px;
}

/*
 * sprite stuff- feel free to comment out/remove if not using
 */
img {
  max-width: 100%;
  max-height: 100%;
}
#contentSpriteContainer {
  position: fixed;
  width: 100%;
  height: 100%;
  max-width: 62em;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: -97;
}
.sprite {
  position: absolute;
  width: 180px;
}
#topLeftSprite {
  float: left;
  top: -1em;
  left: 0.4em;
}
#topRightSprite {
  float: right;
  top: -1em;
  right: 0.4em;
}
#bottomLeftSprite {
  float: left;
  left: 0.4em;
  top: 50%;
}
#bottomRightSprite {
  float: right;
  right: 0.4em;
  top: 50%;
}

/* smaller screens: hide left margin */
@media screen and (max-width: 1200px) {
  .tools {
    margin-right: 0.4em;
    margin-left: 0.4em;
  }
  #mid_panel {
    margin-right: 0.4em;
  }
}
/* mobile: move the stat box to the top if the screen is too small,
 * and reduce font size slightly. */
@media screen and (max-width: 560px) {
  #page {
    position: static;
  }
  #content {
    position: static;
    font-size: 1em;
    line-height: 160%;
    padding: 1em 1em 1.5em 1em;
  }
  #qualities {
    font-size: 1em;
    padding-left: 0.1em;
    padding-right: 0.1em;
  }
  #tools_wrapper {
    position: static;
  }
  .tools {
    width: 90%;
    margin: 2em 0 1em 0;
    margin: 0.4em;
  }
  .tools.left {
    float: none;
    left: 0;
    border-radius: 7px;
  }
  .tools.right {
    float: none;
    right: 0;
  }
  #mid_panel {
    margin: 0 auto;
  }

  /* cards are smaller on mobile */
  .card-img {
    height: 125px;
    width: 100px;
  }
  a.card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
    position: relative;
  }
  div.blank-card {
    width: 100px;
    height: 125px;
    border: 8px solid var(--card-border-color);
    margin-bottom: 0.5em;
  }
  .card-in-hand,
  .pinned-card,
  .deck {
    max-width: 120px;
    margin-right: 1em;
    vertical-align: top;
  }
}

/* New stuff just for this game */

/* colored box div */
.box {
  display: inline-block;
  height: 1em;
  width: 1em;
}

table {
  border-spacing: 0.5em;
}

/* hovering and higlighting */
.seat.party-hovered {
  stroke: #000;
  opacity: 1;
  transition: opacity 0.3s;
}

.seat.party-nothovered {
  opacity: 0.5; /* Dim non-hovered seats */
  transition: opacity 0.3s;
}

.seat.party-highlighted:not(.party-nothovered) {
  stroke: #000;
  transition: opacity 0.3s;
}

.parliament-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: var(--content-bg-color);
  color: var(--text-color);
  border-radius: 5px;
  font-size: 14px;
  pointer-events: none; /* Prevents tooltip from interfering with mouse events */
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
  border-bottom: 3px solid;
  line-height: 130%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.parliament-tooltip.visible {
  opacity: 0.97;
}


/* Styles for parties */
/* Use CSS variables for the colors... */
:root {
  --ciu: #002782;
  --cdc: #002782;
  --unio: #0052a3;
  --erc: #FFB232;
  --cup: #ffed00;
  --jxsi: #3ab6a5;
  --jxcat: #ed5975;
  --pdcat: #0081c2;
  --junts: #20c0b2;
  --cs: #EB6109;
  --ppc: #007fff;
  --psc: #e73b39;
  --icv: #67af2f;
  --si: #000000;
  --csqp: #c3113b;
  --cecp: #be3882;
  --ecp: #6e236e;
  --vox: #63be21;
  --pxc: #00ffff;
  --fnc: #55a0d9;
  --pp: #1d84ce;
  --psoe: #da291c;
  --podemos: #9269f5;
  --iu: #732021;
  --dl: #292a6b;
  --pnv: #4aae4a;
  --ehbildu: #00c19f;
  --cc: #ffd700;
  --compromis: #ec8953;
  --mes: #d8de40;
  --bng: #a2c7e4;
  --nos: #ed1c24;
  --amaiur: #0198b3;
  --upyd: #e9008c;
  --mpais: #027665;
  --fac: #0082ca;
  --prc: #b7bf10;
  --sumar: #ef4b91;
  --up: #5a205a;
  --fr: #0a0a0a;
  --gbai: #f75e42;
  --upn: #00599b;
  --nsuma: #2a52be;
  --te: #007351;
}

.seat.ciu {
  fill: var(--ciu);
}
.seat.cdc {
  fill: var(--cdc);
}
.seat.unio {
  fill: var(--unio);
}
.seat.erc {
  fill: var(--erc);
}
.seat.cup {
  fill: var(--cup);
}
.seat.fr {
  fill: var(--fr);
}
.seat.jxcat {
  fill: var(--jxcat);
}
.seat.jxsi {
  fill: var(--jxsi);
}
.seat.pdcat {
  fill: var(--pdcat);
}
.seat.junts {
  fill: var(--junts);
}
.seat.cs {
  fill: var(--cs);
}
.seat.ppc {
  fill: var(--ppc);
}
.seat.psc {
  fill: var(--psc);
}
.seat.icv {
  fill: var(--icv);
}
.seat.si {
  fill: var(--si);
}
.seat.csqp {
  fill: var(--csqp);
}
.seat.cecp {
  fill: var(--cecp);
}
.seat.ecp {
  fill: var(--ecp);
}
.seat.vox {
  fill: var(--vox);
}
.seat.fnc {
  fill: var(--fnc);
}
.seat.pxc {
  fill: var(--pxc);
}

/* boxes... */
.box.ciu {
  background-color: var(--ciu);
}
.box.cdc {
  background-color: var(--cdc);
}
.box.unio {
  background-color: var(--unio);
}
.box.erc {
  background-color: var(--erc);
}
.box.cup {
  background-color: var(--cup);
}
.box.fr {
  background-color: var(--fr);
}
.box.jxcat {
  background-color: var(--jxcat);
}
.box.jxsi {
  background-color: var(--jxsi);
}
.box.pdcat {
  background-color: var(--pdcat);
}
.box.junts {
  background-color: var(--junts);
}
.box.cs {
  background-color: var(--cs);
}
.box.ppc {
  background-color: var(--ppc);
}
.box.psc {
  background-color: var(--psc);
}
.box.icv {
  background-color: var(--icv);
}
.box.si {
  background-color: var(--si);
}
.box.csqp {
  background-color: var(--csqp);
}
.box.cecp {
  background-color: var(--cecp);
}
.box.ecp {
  background-color: var(--ecp);
}
.box.vox {
  background-color: var(--vox);
}
.box.pxc {
  background-color: var(--pxc);
}
.box.fnc {
  background-color: var(--fnc);
}

/* same, but the extras for the congreso */
.seat.pp {
  fill: var(--pp);
}
.box.pp {
  background-color: var(--pp);
}
.seat.psoe {
  fill: var(--psoe);
}
.box.psoe {
  background-color: var(--psoe);
}
.seat.podemos {
  fill: var(--podemos);
}
.box.podemos {
  background-color: var(--podemos);
}
.seat.iu {
  fill: var(--iu);
}
.box.iu {
  background-color: var(--iu);
}
.seat.dl {
  fill: var(--dl);
}
.box.dl {
  background-color: var(--dl);
}
.seat.pnv {
  fill: var(--pnv);
}
.box.pnv {
  background-color: var(--pnv);
}
.seat.ehbildu {
  fill: var(--ehbildu);
}
.box.ehbildu {
  background-color: var(--ehbildu);
}
.seat.cc {
  fill: var(--cc);
}
.box.cc {
  background-color: var(--cc);
}
.seat.compromis {
  fill: var(--compromis);
}
.box.compromis {
  background-color: var(--compromis);
}
.seat.mes {
  fill: var(--mes);
}
.box.mes {
  background-color: var(--mes);
}
.seat.bng {
  fill: var(--bng);
}
.box.bng {
  background-color: var(--bng);
}
.seat.nos {
  fill: var(--nos);
}
.box.nos {
  background-color: var(--nos);
}
.seat.amaiur {
  fill: var(--amaiur);
}
.box.amaiur {
  background-color: var(--amaiur);
}
.seat.upyd {
  fill: var(--upyd);
}
.box.upyd {
  background-color: var(--upyd);
}
.seat.mpais {
  fill: var(--mpais);
}
.box.mpais {
  background-color: var(--mpais);
}
.seat.fac {
  fill: var(--fac);
}
.box.fac {
  background-color: var(--fac);
}
.seat.prc {
  fill: var(--prc);
}
.box.prc {
  background-color: var(--prc);
}
.seat.sumar {
  fill: var(--sumar);
}
.box.sumar {
  background-color: var(--sumar);
}
.seat.up {
  fill: var(--up);
}
.box.up {
  background-color: var(--up);
}
.seat.fr {
  fill: var(--fr);
}
.box.fr {
  background-color: var(--fr);
}
.seat.gbai {
  fill: var(--gbai);
}
.box.gbai {
  background-color: var(--gbai);
}
.seat.upn {
  fill: var(--upn);
}
.box.upn {
  background-color: var(--upn);
}
.seat.nsuma {
  fill: var(--nsuma);
}
.box.nsuma {
  background-color: var(--nsuma);
}
.seat.te {
  fill: var(--te);
}
.box.te {
  background-color: var(--te);
}

.mytooltip {
  position: relative;
  cursor: pointer;
  padding: 2px 5px;
  margin-right: -5px;
  margin-left: -5px;
  border-bottom: 0px;
  transition: color 0.2s;
  color: var(--mytooltip-color);
}

/*
.mytooltip:hover {
  background-color: var(--hover-color, #ded7d719);
  border-radius: 5px;
}
  */

.mytooltip:after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 0;
  height: 1.5px;
  background: var(--mytooltip-color);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mytooltip:hover::after {
  width: calc(100% - 10px);
}

.mytooltiptext {
  position: absolute;
  z-index: 999999;
  background: var(--content-bg-color);
  border-radius: 7px;
  border-top: none;
  padding: 12px 20px 12px 14px;
  font-size: 14px !important;
  line-height: 135%;
  font-weight: 500 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  width: max-content;
  max-width: 500px;
  border-bottom: 3px solid var(--mytooltip-color);
  font-family: "HkGroteskRegular", sans-serif;
  text-transform: none;
  letter-spacing: normal;

  /* Position above the element */
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  
  /* Hidden by default - use visibility + opacity for smooth transitions */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

/* Show on hover */
.mytooltip:hover .mytooltiptext {
  opacity: 1;
  visibility: visible;
}

/* Show when clicked (active state) */
.mytooltiptext.active {
  opacity: 1;
  visibility: visible;
}

/* Tooltip content layout with flexbox */
.mytooltip-content {
  display: flex;
  gap: 1.25em;
  align-items: center;
}

.mytooltip-content img {
  width: 80px;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.mytooltip-text {
  flex: 1;
  text-indent: 0;
  text-align: left;
  color: var(--text-color);
}

.mytooltip-main-text {
  font-size: inherit;
  font-weight: bold;
  color: var(--mytooltip-color);
}
.mytooltip-sub-text {
  font-style: italic;
  display: flex;
  margin-bottom: -0.95em;
}
.mytooltip-ledby {
  color: var(--mytooltip-color);
}
.mytooltip-ideology {
  font-size: 0.9em;
}
.mytooltip-allegiances {
  display: flex;
  margin-top: 0.5em;
  gap: 2px;
}
/* Arrow pointing down from tooltip */
.mytooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: inherit;
}
