/**
 * POE2 Gem Tooltips - AutoArticle Receiver Plugin
 * CSS for PoE2 skill/support gem display with hover tooltips
 */

/* Container principal */
.poe2-skills-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
  font-family: 'Fontin', 'Georgia', serif;
  overflow: visible;
}

/* Ligne de competence */
.poe2-skill-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 15px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #4a4a6a;
  border-radius: 8px;
}

/* Gemme (skill ou support) */
.poe2-gem {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.poe2-gem img {
  width: 47px;
  height: 47px;
  border: 2px solid #8b7355;
  border-radius: 4px;
  transition: all 0.2s ease;
  background: #0d0d0d;
}

/* Gemme de skill (bordure bleue) */
.poe2-gem.skill-gem img {
  border-color: #4a9eff;
  box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

/* Gemme de support (bordure doree) */
.poe2-gem.support-gem img {
  border-color: #8b7355;
}

/* Hover effect */
.poe2-gem:hover img {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Tooltip container */
.poe2-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  padding: 12px;
  background: linear-gradient(180deg, #1c1c1c 0%, #0d0d0d 100%);
  border: 1px solid #4a3c28;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  margin-bottom: 10px;
  text-align: left;
}

/* Tooltip visible au hover */
.poe2-gem:hover .poe2-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Fleche du tooltip */
.poe2-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #4a3c28;
}

/* Header du tooltip */
.poe2-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #4a3c28;
}

.poe2-tooltip-header img {
  width: 40px;
  height: 40px;
  border: none;
  box-shadow: none;
  transform: none;
}

/* Titre du tooltip */
.poe2-tooltip-title {
  color: #af6025;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

.poe2-tooltip-title.skill {
  color: #4a9eff;
}

/* Tags */
.poe2-tooltip-tags {
  color: #7f7f7f;
  font-size: 11px;
  margin-top: 2px;
}

/* Corps du tooltip */
.poe2-tooltip-body {
  color: #c8c8c8;
  font-size: 13px;
  line-height: 1.5;
}

/* Stats (Palier, etc.) */
.poe2-tooltip-stat {
  color: #8888ff;
  margin: 5px 0;
}

/* Effets (texte dore) */
.poe2-tooltip-effect {
  color: #ffd700;
  margin: 8px 0;
  padding: 5px;
  background: rgba(255, 215, 0, 0.1);
  border-left: 2px solid #ffd700;
  font-size: 12px;
}

/* Prerequis */
.poe2-tooltip-req {
  color: #a0a0a0;
  font-size: 11px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #333;
}

/* Labels */
.poe2-skill-label {
  color: #4a9eff;
  font-weight: bold;
  font-size: 14px;
  min-width: 150px;
  align-self: center;
}

.poe2-supports-label {
  color: #7f7f7f;
  font-size: 12px;
  margin-right: 5px;
  align-self: center;
}

/* Lien vers poe2db */
.poe2-link {
  display: block;
  color: #7289da;
  font-size: 11px;
  text-align: right;
  margin-top: 8px;
  text-decoration: none;
}

.poe2-link:hover {
  color: #99aab5;
  text-decoration: underline;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .poe2-skill-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .poe2-skill-label {
    margin-bottom: 10px;
    min-width: auto;
  }

  .poe2-tooltip {
    width: 280px;
    left: 0;
    transform: none;
  }

  .poe2-gem img {
    width: 42px;
    height: 42px;
  }
}

/* Fix pour eviter que les tooltips soient coupes */
.entry-content .poe2-skills-container,
.post-content .poe2-skills-container,
article .poe2-skills-container {
  overflow: visible;
}

/* Fix z-index pour les themes avec sticky headers */
.poe2-tooltip {
  z-index: 9999;
}
