/* Papildomi CSS stiliai tooltipams - PATOBULINTAS VARIANTAS */

/* Paprastas naujoviškas tooltipas, kuris tikrai veiks */
.player-skin-item:hover:after {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000000;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 99999;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #4a90e2;
  max-width: 90vw;
  font-family: Arial, sans-serif !important;
  display: block !important;
  width: auto !important;
  min-width: 120px;
  opacity: 1 !important;
  visibility: visible !important;
  text-align: center;
}

/* Rodyklė po tooltipo */
.player-skin-item:hover:before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #000000 transparent transparent transparent;
  z-index: 99999;
}

/* Stilius javascript tooltip elementui */
.js-tooltip {
  position: absolute !important;
  background-color: #000000 !important;
  color: #FFFFFF !important;
  padding: 10px !important;
  border-radius: 4px !important;
  z-index: 99999 !important;
  font-size: 12px !important;
  max-width: 250px !important;
  text-align: center !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #4a90e2 !important;
  pointer-events: none !important;
  white-space: normal !important;
  font-family: Arial, sans-serif !important;
  display: block !important;
  width: auto !important;
  min-width: 120px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Reikalingi stiliai tooltip tėviniam elementui */
.player-skin-item {
  cursor: help !important;
  position: relative !important;
  z-index: 1;
  overflow: visible !important;
}

/* Stilizuotas title tooltipas (atsarginis variantas) */
[title] {
  position: relative;
}

/* Naujausi tooltip nurodymai, kurie turi veikti greičiau */
.player-skin-item .direct-tooltip {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000000;
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 99999;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #4a90e2;
  width: auto;
  min-width: 120px;
  text-align: center;
}

.player-skin-item:hover .direct-tooltip {
  display: block;
}

/* Pašaliname bet kokias scroll juostas iš tooltip */
.js-tooltip,
.player-skin-item:hover:after,
.direct-tooltip {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Papildomas stilius, jei kiti neveikia */
.player-skins-preview {
  position: relative;
  z-index: 1;
}

/* Alternatyvus stilius naudojant title paryškinimui */
[title]:hover {
  position: relative;
  z-index: 5000;
}

/* Pašaliname native tooltip stilių ir naudojame savo */
.player-skin-item img {
  pointer-events: none;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
  z-index: 9999 !important;
}

.tooltip .tooltiptext {
  visibility: visible !important;
  opacity: 1 !important;
  width: auto;
  min-width: 120px;
  max-width: 300px;
  background-color: black;
  color: #fff !important;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 9999 !important;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px !important;
  white-space: nowrap;
  overflow: visible;
  transition: opacity 0.3s;
}

.js-tooltip {
  position: absolute;
  background-color: black;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  z-index: 9999;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
  max-width: 300px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.direct-tooltip {
  display: none;
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.direct-tooltip:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.8);
}

.player-skin-item:hover .direct-tooltip {
  display: block;
}

/* Medijų užklausos mažesniems ekranams */
@media (max-width: 768px) {
  .direct-tooltip {
    font-size: 12px;
    padding: 3px 6px;
    top: -30px;
  }
}

/* Tooltip animacija */
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.direct-tooltip {
  animation: tooltipFadeIn 0.3s ease-in-out;
}