/**
 * Frontend styles for ILJ Keyword Importer.
 *
 * @package ILJ_Keyword_Importer
 */

/* Base keyword link styles */
.ilj-keyword-link {
  color: #0073aa;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.ilj-keyword-link:hover {
  color: #00a0d2;
  text-decoration: none;
}

.ilj-keyword-link:focus {
  outline: thin dotted;
  outline-offset: 2px;
}

/* Different link types styling */
.ilj-keyword-link.ilj-product {
  color: #7f54b3; /* WooCommerce purple */
  border-bottom-color: rgba(127, 84, 179, 0.3);
}

.ilj-keyword-link.ilj-post {
  color: #0073aa; /* WordPress blue */
  border-bottom-color: rgba(0, 115, 170, 0.3);
}

.ilj-keyword-link.ilj-category {
  color: #46b450; /* WordPress green */
  border-bottom-color: rgba(70, 180, 80, 0.3);
}

.ilj-keyword-link.ilj-tag {
  color: #ffb900; /* WordPress yellow */
  border-bottom-color: rgba(255, 185, 0, 0.3);
}

/* Optional icon for external links */
.ilj-keyword-link[target="_blank"]::after {
  content: "\2197";
  display: inline-block;
  margin-left: 2px;
  font-size: 0.8em;
  opacity: 0.7;
}

/* CSS class for no-underline option */
.ilj-no-underline .ilj-keyword-link,
.ilj-keyword-link.ilj-no-underline {
  text-decoration: none;
  border-bottom: none;
}

.ilj-no-underline .ilj-keyword-link:hover,
.ilj-keyword-link.ilj-no-underline:hover {
  text-decoration: underline;
  border-bottom: none;
}

/* Tooltip styling */
.ilj-tooltip {
  position: absolute;
  z-index: 1000;
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  pointer-events: none;
  opacity: 0.95;
  line-height: 1.5;
}

.ilj-tooltip-top::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #333 transparent transparent;
}

.ilj-tooltip-bottom::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent #333;
}

/* Optional tooltip styling for enhanced UX */
.ilj-keyword-link[data-tooltip] {
  position: relative;
  cursor: help;
}

.ilj-keyword-link[data-tooltip]:hover:after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 99999;
}
