/**
 * EYC Product Tooltip - Front Office Styles
 *
 * Copyright since 2019 Enjoycreativ
 * @author Enjoycreativ <contact@enjoycreativ.com>
 */

/* Tooltip container */
.eyc-product-tooltips {
  margin: 10px 0;
}

/* Tooltip wrapper */
.eyc-tooltip-wrapper {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 5px;
}

/* Tooltip trigger */
.eyc-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #1a7d91;
  background-color: #eefcff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  font-size: 0.875rem;
  line-height: 1.4;
}

.eyc-tooltip-trigger:hover,
.eyc-tooltip-trigger:focus {
  background-color: #f0ffd1;
  border-color: #7E9510;
  outline: none;
}

.eyc-tooltip-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Tooltip link */
.eyc-tooltip-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

.eyc-tooltip-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Tooltip image */
.eyc-tooltip-image {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Tooltip title */
.eyc-tooltip-title {
  font-weight: 500;
  color: #1a7d91;
}

/* Tooltip info icon */
.eyc-tooltip-icon {
  font-size: 16px;
  color: #6c757d;
  flex-shrink: 0;
}

/* Popover customization (Bootstrap native) */
.popover {
  max-width: 350px;
}

.popover .popover-body img {
  max-width: 100%;
  height: auto;
}

/* === MODE CSS HOVER === */
.eyc-tooltip-css-mode .eyc-tooltip-wrapper {
  position: relative;
}

.eyc-tooltip-css-mode .eyc-tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1070;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: .375rem;
  padding: .75rem 1rem;
  box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .15);
  min-width: 200px;
  max-width: 350px;
  font-size: .875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Arrow border */
.eyc-tooltip-css-mode .eyc-tooltip-content::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(0, 0, 0, .15);
}

/* Arrow fill */
.eyc-tooltip-css-mode .eyc-tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

/* Show on hover/focus */
.eyc-tooltip-css-mode .eyc-tooltip-wrapper:hover .eyc-tooltip-content,
.eyc-tooltip-css-mode .eyc-tooltip-wrapper:focus-within .eyc-tooltip-content {
  display: block;
}

/* Screen reader only / accessibility */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
