/**
 * Text Formatting Styles
 * Shared styles for formatted text content across all pages
 * Used by: About, Services, FAQ, Modals (Privacy, Services)
 */

/* Tooltip styles */
.tooltip {
  position: relative;
  display: inline;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: help;
  transition: color 0.2s ease;
}

.tooltip:hover {
  color: var(--accent);
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  right: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85em;
  line-height: 1.4;
  white-space: normal;
  width: max-content;
  max-width: 280px;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 12px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Viewport-aware tooltip positioning */

/* Flip vertically when near top of viewport */
.tooltip-text.tooltip-flip-vertical {
  bottom: auto;
  top: 125%;
}

.tooltip-text.tooltip-flip-vertical::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--ink);
}

/* Flip horizontally when near right edge of viewport */
.tooltip-text.tooltip-flip-horizontal {
  right: auto;
  left: 0;
}

.tooltip-text.tooltip-flip-horizontal::after {
  right: auto;
  left: 12px;
}

/* Mobile tooltip adjustments */
@media (max-width: 767px) {
  .tooltip-text {
    font-size: 0.9em;
    max-width: 220px;
    padding: 0.6rem 0.8rem;
  }
}

/* List styles */
.bulleted-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em 0;
}

.bulleted-list li {
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 0.2em;
  padding-left: 1.5rem;
  position: relative;
}

.bulleted-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.15em;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1.6;
}
