/*
Theme Name: JNews - Child Theme
Version: 1.0.0
Theme URI: http://themeforest.net/?ref=jegtheme
Description: A basic starter child theme for customization purpose of JNews theme.
Author: Jegtheme
Author URI: http://themeforest.net/user/jegtheme?ref=jegtheme
Template: jnews
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ------------------------------------------------------------------------- *
 *  Theme customization starts here
/* ------------------------------------------------------------------------- */


/* === Tooltips personalizados dinámicos (CSS + JS) === */

.tooltip {
  position: relative;
  display: inline-block;
}

/* Elemento que activa el tooltip */
.tooltip-trigger {
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
  cursor: help;
}

/* Caja base (oculta por defecto) */
.tooltip-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 550px;
  max-width: 600px;
  padding: 10px 14px;
  background: #ffe5d9;
  color: #000000;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  z-index: 999;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  text-transform: none;
}

/* Flecha base (se ajusta según top/bottom) */
.tooltip-content::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
}

/* Estado visible (JS añade esta clase al hacer hover/focus) */
.tooltip.is-visible .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* === Posiciones controladas por clases === */

/* Tooltip por defecto: arriba */
.tooltip--top .tooltip-content {
  bottom: 125%;
  transform: translateX(-50%) translateY(0);
}

.tooltip--top .tooltip-content::after {
  top: 100%;
  border-color: #111827 transparent transparent transparent;
}

/* Tooltip abajo */
.tooltip--bottom .tooltip-content {
  top: 125%;
  transform: translateX(-50%) translateY(0);
}

.tooltip--bottom .tooltip-content::after {
  bottom: 100%;
  border-color: transparent transparent #111827 transparent;
}

/* Pequeña animación hacia arriba/abajo cuando aparece */
.tooltip--top.is-visible .tooltip-content {
  transform: translateX(-50%) translateY(-4px);
}

.tooltip--bottom.is-visible .tooltip-content {
  transform: translateX(-50%) translateY(4px);
}

/* === Variantes de tamaño / color === */

/* Tooltip pequeño */
.tooltip--small .tooltip-content {
  font-size: 12px;
  padding: 6px 10px;
  min-width: 120px;
  max-width: 200px;
}

/* Esquema claro */
.tooltip--light .tooltip-content {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.tooltip--light.tooltip--top .tooltip-content::after {
  border-color: #ffffff transparent transparent transparent;
}

.tooltip--light.tooltip--bottom .tooltip-content::after {
  border-color: transparent transparent #ffffff transparent;
}
