/* React Tip Magic Styles */

/* variables.css */
/**
 * TipMagic CSS Variables
 *
 * This file contains all customizable CSS variables for theming TipMagic tooltips.
 * Override these variables in your own stylesheet to customize the appearance.
 *
 * ============================================================================
 * HOW TO CUSTOMIZE
 * ============================================================================
 *
 * Option 1: Override globally
 *   :root {
 *     --tip-magic-bg: #your-color;
 *   }
 *
 * Option 2: Override on the tooltip class
 *   .tip-magic-tooltip {
 *     --tip-magic-bg: #your-color;
 *   }
 *
 * Option 3: Create a theme class
 *   .tip-magic-tooltip.my-theme {
 *     --tip-magic-bg: #your-color;
 *   }
 *
 * All three work because the defaults below are declared on `:root`. Declaring them
 * on `.tip-magic-tooltip` instead would silently break Option 1 - a custom property
 * set on the element itself always beats one inherited from an ancestor.
 *
 * ============================================================================
 */

/* ==========================================================================
   TOOLTIP VARIABLES
   ========================================================================== */

:root {
  /* --------------------------------------------------------------------------
     COLORS
     -------------------------------------------------------------------------- */

  /**
   * Background color of the tooltip
   * @default #1f2937 (dark gray)
   */
  --tip-magic-bg: #1f2937;

  /**
   * Text color of the tooltip content
   * @default #f9fafb (off-white)
   */
  --tip-magic-text: #f9fafb;

  /**
   * Box shadow for the tooltip
   * @default Subtle shadow with 25% opacity
   */
  --tip-magic-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.25);

  /* --------------------------------------------------------------------------
     TYPOGRAPHY
     -------------------------------------------------------------------------- */

  /**
   * Font family for tooltip text
   * @default System font stack
   */
  --tip-magic-font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /**
   * Font size for tooltip text
   * @default 13px
   */
  --tip-magic-font-size: 13px;

  /* --------------------------------------------------------------------------
     SPACING
     -------------------------------------------------------------------------- */

  /**
   * Horizontal padding (left and right)
   * @default 10px
   */
  --tip-magic-padding-x: 10px;

  /**
   * Vertical padding (top and bottom)
   * @default 6px
   */
  --tip-magic-padding-y: 6px;

  /**
   * Border radius for rounded corners
   * @default 6px
   */
  --tip-magic-border-radius: 6px;

  /* --------------------------------------------------------------------------
     ARROW
     -------------------------------------------------------------------------- */

  /**
   * Size of the arrow pointer
   * @default 8px
   */
  --tip-magic-arrow-size: 8px;

  /* --------------------------------------------------------------------------
     KEYBOARD SHORTCUTS
     -------------------------------------------------------------------------- */

  /**
   * Background color for keyboard shortcut badges
   * @default Semi-transparent white (15% opacity)
   */
  --tip-magic-shortcut-bg: rgba(255, 255, 255, 0.15);

  /**
   * Text color for keyboard shortcut badges
   * @default #e5e7eb (light gray)
   */
  --tip-magic-shortcut-text: #e5e7eb;
}


/* tooltip.css */
/**
 * TipMagic Tooltip Styles
 *
 * Core styles for tooltip positioning, layout, and behavior.
 * For themable CSS variables, see ./variables.css
 */

/* ==========================================================================
   TOOLTIP CONTAINER
   ========================================================================== */

/**
 * Own the box model so the tooltip measures the same in every host, regardless of
 * whether the app ships a `* { box-sizing: border-box }` reset.
 */
.tip-magic-tooltip,
.tip-magic-tooltip *,
.tip-magic-tooltip *::before,
.tip-magic-tooltip *::after {
  box-sizing: border-box;
}

.tip-magic-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--tip-magic-bg);
  color: var(--tip-magic-text);
  padding: var(--tip-magic-padding-y) var(--tip-magic-padding-x);
  border-radius: var(--tip-magic-border-radius);
  font-size: var(--tip-magic-font-size);
  font-family: var(--tip-magic-font-family);
  line-height: 1.4;
  box-shadow: var(--tip-magic-shadow);
  pointer-events: none;
  white-space: nowrap;
  overflow: visible;

  /* Animation - only opacity, no transform to avoid conflicting with Floating UI positioning */
  opacity: 0;
  transition: opacity var(--animation-duration, 150ms) ease-out;
}

/* ==========================================================================
   VISIBILITY STATES
   ========================================================================== */

.tip-magic-tooltip.tip-magic-visible {
  opacity: 1;
}

.tip-magic-tooltip.tip-magic-hidden {
  opacity: 0;
}

/* ==========================================================================
   TRANSITION STATES
   ========================================================================== */

/* Transitioning between targets with 'jump' behavior - instant position change */
.tip-magic-tooltip.tip-magic-transitioning {
  transition: opacity var(--animation-duration, 100ms) ease-out;
}

/* Transitioning between targets with 'move' behavior - smooth position animation */
.tip-magic-tooltip.tip-magic-moving {
  transition:
    opacity var(--animation-duration, 150ms) ease-out,
    transform var(--move-duration, 200ms) ease-out;
}

/* ==========================================================================
   BEHAVIOR MODIFIERS
   ========================================================================== */

/* Interactive tooltip - allows hovering over the tooltip */
.tip-magic-tooltip.tip-magic-interactive {
  pointer-events: auto;
  cursor: auto;
  user-select: text;
}

/* Word wrap - allow text to wrap to multiple lines */
.tip-magic-tooltip.tip-magic-word-wrap {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* When using ellipsis, we need word wrap enabled */
.tip-magic-tooltip.tip-magic-ellipsis {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   CONTENT LAYOUT
   ========================================================================== */

.tip-magic-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ellipsis mode - switch to block layout for line clamping */
.tip-magic-tooltip.tip-magic-ellipsis .tip-magic-content {
  display: block;
}

/* ==========================================================================
   TEXT HANDLING
   ========================================================================== */

/* Text content with ellipsis - truncate text */
.tip-magic-tooltip.tip-magic-ellipsis .tip-magic-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--max-lines, 1);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Text break behavior - break in middle of words */
.tip-magic-tooltip.tip-magic-text-break-break-all {
  word-break: break-all;
}

/* Text break behavior - keep CJK characters together */
.tip-magic-tooltip.tip-magic-text-break-keep-all {
  word-break: keep-all;
}

/* ==========================================================================
   KEYBOARD SHORTCUTS
   ========================================================================== */

.tip-magic-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  margin-left: 4px;
  background: var(--tip-magic-shortcut-bg);
  color: var(--tip-magic-shortcut-text);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   ARROW
   ========================================================================== */

.tip-magic-arrow {
  position: absolute;
  width: var(--tip-magic-arrow-size);
  height: var(--tip-magic-arrow-size);
  background: var(--tip-magic-bg);
  transform: rotate(45deg);
}

/* Arrow positioning based on placement */
.tip-magic-tooltip[data-placement^='top'] .tip-magic-arrow {
  bottom: calc(var(--tip-magic-arrow-size) / -2);
}

.tip-magic-tooltip[data-placement^='bottom'] .tip-magic-arrow {
  top: calc(var(--tip-magic-arrow-size) / -2);
}

.tip-magic-tooltip[data-placement^='left'] .tip-magic-arrow {
  right: calc(var(--tip-magic-arrow-size) / -2);
}

.tip-magic-tooltip[data-placement^='right'] .tip-magic-arrow {
  left: calc(var(--tip-magic-arrow-size) / -2);
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/**
 * `data-tip-magic-motion="always"` is set by the provider when the
 * `respectReducedMotion` option is disabled, opting the tooltip back into animation.
 */
@media (prefers-reduced-motion: reduce) {
  .tip-magic-tooltip:not([data-tip-magic-motion='always']) {
    transition: none;
  }
}


/* tour.css */
/**
 * TipMagic Tour Styles
 * Styles for the useTour hook's built-in navigation, images, and focus backdrop
 */

/* =============================================================================
   CSS Variables (User-Customizable)
   ============================================================================= */

:root {
  /* Tour navigation buttons */
  --tip-magic-tour-btn-bg: rgba(255, 255, 255, 0.15);
  --tip-magic-tour-btn-color: #ffffff;
  --tip-magic-tour-btn-hover-bg: rgba(255, 255, 255, 0.25);
  --tip-magic-tour-btn-primary-bg: #ffffff;
  --tip-magic-tour-btn-primary-color: #1f2937;
  --tip-magic-tour-btn-radius: 4px;
  --tip-magic-tour-btn-padding: 6px 12px;
  --tip-magic-tour-btn-font-size: 12px;
  --tip-magic-tour-btn-font-weight: 500;
  --tip-magic-tour-btn-gap: 8px;

  /* Tour image */
  --tip-magic-tour-image-radius: 8px;
  --tip-magic-tour-image-max-height: 150px;
  --tip-magic-tour-image-margin: 12px 0;

  /* Tour header (title + close) */
  --tip-magic-tour-header-margin: 0 0 8px 0;
  --tip-magic-tour-title-font-size: 15px;
  --tip-magic-tour-title-font-weight: 600;
  --tip-magic-tour-title-color: #ffffff;

  /* Close button */
  --tip-magic-tour-close-size: 24px;
  --tip-magic-tour-close-font-size: 18px;
  --tip-magic-tour-close-color: rgba(255, 255, 255, 0.7);
  --tip-magic-tour-close-hover-color: #ffffff;
  --tip-magic-tour-close-hover-bg: rgba(255, 255, 255, 0.15);

  /* Message */
  --tip-magic-tour-message-font-size: 13px;
  --tip-magic-tour-message-line-height: 1.5;
  --tip-magic-tour-message-color: rgba(255, 255, 255, 0.9);

  /* Navigation container */
  --tip-magic-tour-nav-margin: 12px 0 0 0;
  --tip-magic-tour-nav-padding: 4px 0;

  /* Progress indicator (steps type) */
  --tip-magic-tour-progress-font-size: 12px;
  --tip-magic-tour-progress-color: rgba(255, 255, 255, 0.6);

  /* Progress indicator (ring type) */
  --tip-magic-tour-progress-ring-size: 32px;
  --tip-magic-tour-progress-ring-stroke: 3px;
  --tip-magic-tour-progress-ring-bg: rgba(255, 255, 255, 0.2);
  --tip-magic-tour-progress-ring-fill: #ffffff;
  --tip-magic-tour-progress-ring-text-size: 10px;
  --tip-magic-tour-progress-ring-text-color: rgba(255, 255, 255, 0.9);

  /* Backdrop / Focus */
  --tip-magic-tour-backdrop-blur: 4px;
  --tip-magic-tour-backdrop-bg: rgba(0, 0, 0, 0.3);

  /**
   * Layering. Override --tip-magic-tour-z-base to move the whole tour as a unit;
   * override an individual variable to place one layer by hand.
   *
   * Backdrop: base (9997) < Focus target: base + 1 (9998) < Tooltip: 9999
   *
   * The tooltip sits on top and is set from JS - use the provider's `zIndex` option.
   * Raise both together when the host app has its own high-z surfaces.
   */
  --tip-magic-tour-z-base: 9997;
  --tip-magic-tour-backdrop-z-index: var(--tip-magic-tour-z-base);
  --tip-magic-tour-focus-z-index: calc(var(--tip-magic-tour-z-base) + 1);
}

/* =============================================================================
   Tour Content Wrapper
   ============================================================================= */

.tip-magic-tour-content {
  display: block;
  min-width: 200px;
}

/* =============================================================================
   Header Row (Title + Close Button)
   ============================================================================= */

.tip-magic-tour-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: var(--tip-magic-tour-header-margin);
}

.tip-magic-tour-title {
  flex: 1;
  font-size: var(--tip-magic-tour-title-font-size);
  font-weight: var(--tip-magic-tour-title-font-weight);
  color: var(--tip-magic-tour-title-color);
  margin: 0;
  line-height: 1.3;
}

.tip-magic-tour-close {
  flex-shrink: 0;
  width: var(--tip-magic-tour-close-size);
  height: var(--tip-magic-tour-close-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--tip-magic-tour-close-color);
  font-size: var(--tip-magic-tour-close-font-size);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto; /* Ensure button is always clickable */
  position: relative; /* Ensure proper stacking */
  z-index: 1;
  border-radius: 50%;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.tip-magic-tour-close:hover {
  background: var(--tip-magic-tour-close-hover-bg);
  color: var(--tip-magic-tour-close-hover-color);
}

/* =============================================================================
   Image (Pokemon Card Style)
   ============================================================================= */

.tip-magic-tour-image {
  margin: var(--tip-magic-tour-image-margin);
  border-radius: var(--tip-magic-tour-image-radius);
  overflow: hidden;
}

.tip-magic-tour-image img {
  display: block;
  width: 100%;
  max-height: var(--tip-magic-tour-image-max-height);
  object-fit: cover;
  border-radius: var(--tip-magic-tour-image-radius);
}

/* =============================================================================
   Video
   ============================================================================= */

.tip-magic-tour-video {
  margin: var(--tip-magic-tour-image-margin);
  border-radius: var(--tip-magic-tour-image-radius);
  overflow: hidden;
}

.tip-magic-tour-video video {
  display: block;
  width: 100%;
  max-height: var(--tip-magic-tour-image-max-height);
  object-fit: cover;
  border-radius: var(--tip-magic-tour-image-radius);
}

/* Embed video (YouTube, Vimeo, etc.) - default responsive 16:9 */
.tip-magic-tour-video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
}

.tip-magic-tour-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--tip-magic-tour-image-radius);
}

/* When explicit dimensions are provided via inline style */
.tip-magic-tour-video-embed[style*='width'],
.tip-magic-tour-video-embed[style*='height'] {
  padding-bottom: 0;
  height: auto;
}

.tip-magic-tour-video-embed[style*='width'] iframe,
.tip-magic-tour-video-embed[style*='height'] iframe {
  position: static;
  width: 100%;
  height: 100%;
}

/* =============================================================================
   Body / Message
   ============================================================================= */

.tip-magic-tour-body {
  margin: 0;
}

.tip-magic-tour-message {
  font-size: var(--tip-magic-tour-message-font-size);
  line-height: var(--tip-magic-tour-message-line-height);
  color: var(--tip-magic-tour-message-color);
  margin: 0;
}

/* =============================================================================
   Navigation Controls
   ============================================================================= */

.tip-magic-tour-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--tip-magic-tour-btn-gap);
  margin: var(--tip-magic-tour-nav-margin);
  padding: var(--tip-magic-tour-nav-padding);
}

.tip-magic-tour-btn {
  padding: var(--tip-magic-tour-btn-padding);
  font-size: var(--tip-magic-tour-btn-font-size);
  font-weight: var(--tip-magic-tour-btn-font-weight);
  border: none;
  border-radius: var(--tip-magic-tour-btn-radius);
  cursor: pointer;
  pointer-events: auto; /* Ensure buttons are always clickable */
  position: relative; /* Ensure proper stacking */
  z-index: 1;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
}

.tip-magic-tour-btn:active {
  transform: scale(0.97);
}

/* Back button (secondary style) */
.tip-magic-tour-btn-back {
  background: var(--tip-magic-tour-btn-bg);
  color: var(--tip-magic-tour-btn-color);
}

.tip-magic-tour-btn-back:hover {
  background: var(--tip-magic-tour-btn-hover-bg);
}

/* Next/Finish button (primary style) */
.tip-magic-tour-btn-next {
  background: var(--tip-magic-tour-btn-primary-bg);
  color: var(--tip-magic-tour-btn-primary-color);
}

.tip-magic-tour-btn-next:hover {
  opacity: 0.9;
}

/* =============================================================================
   Footer (Progress + Navigation)
   ============================================================================= */

.tip-magic-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: var(--tip-magic-tour-nav-margin);
  padding: var(--tip-magic-tour-nav-padding);
}

/* When footer has both progress and nav */
.tip-magic-tour-footer .tip-magic-tour-nav {
  margin: 0;
  padding: 0;
}

/* =============================================================================
   Progress Indicator
   ============================================================================= */

.tip-magic-tour-progress {
  font-size: var(--tip-magic-tour-progress-font-size);
  color: var(--tip-magic-tour-progress-color);
  white-space: nowrap;
}

/* Ring Progress Indicator */
.tip-magic-tour-progress-ring {
  position: relative;
  width: var(--tip-magic-tour-progress-ring-size);
  height: var(--tip-magic-tour-progress-ring-size);
  flex-shrink: 0;
}

.tip-magic-tour-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tip-magic-tour-progress-ring-bg {
  fill: none;
  stroke: var(--tip-magic-tour-progress-ring-bg);
  stroke-width: var(--tip-magic-tour-progress-ring-stroke);
}

.tip-magic-tour-progress-ring-fill {
  fill: none;
  stroke: var(--tip-magic-tour-progress-ring-fill);
  stroke-width: var(--tip-magic-tour-progress-ring-stroke);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.tip-magic-tour-progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--tip-magic-tour-progress-ring-text-size);
  font-weight: 600;
  color: var(--tip-magic-tour-progress-ring-text-color);
}

/* =============================================================================
   Backdrop / Focus Mode
   ============================================================================= */

.tip-magic-tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--tip-magic-tour-backdrop-z-index);
  background: var(--tip-magic-tour-backdrop-bg);
  backdrop-filter: blur(var(--tip-magic-tour-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--tip-magic-tour-backdrop-blur));
  pointer-events: none; /* Allow clicks through to target */
}

/**
 * Set when the tour is configured with `focus: { block: true }` or
 * `focus: { dismissOnClick: true }` - the backdrop then swallows clicks aimed at the
 * app behind it, so the target cannot be unmounted from under a running tour.
 */
.tip-magic-tour-backdrop[data-tip-magic-backdrop-interactive] {
  pointer-events: auto;
}

/**
 * Target element when focus is active - above the backdrop, below the tooltip.
 *
 * Keyed on the data attribute rather than the class alone: React rewrites the whole
 * `class` attribute when a component re-renders (a CSS-in-JS theme switch generates a
 * new hash, for instance), which would drop a library-applied class and silently
 * un-elevate the highlighted element. React never touches attributes it does not
 * render, so the attribute survives. The class is still applied as a styling hook.
 */
.tip-magic-tour-focus-target,
[data-tip-magic-focus] {
  position: relative;
  z-index: var(--tip-magic-tour-focus-z-index) !important;
}

/**
 * Elements marked with data-tip-always-visible remain visible during tour focus.
 * Useful for headers, sidebars, and other persistent UI elements that should
 * not be masked during a tour.
 */
.tip-magic-tour-always-visible,
[data-tip-magic-elevated] {
  position: relative;
  z-index: var(--tip-magic-tour-focus-z-index) !important;
}

/* =============================================================================
   Accessibility
   ============================================================================= */

/**
 * The tour renders inside the tooltip element, so scoping to it covers every
 * animated surface the tour owns. `data-tip-magic-motion="always"` is set by the
 * provider when `respectReducedMotion` is disabled.
 */
@media (prefers-reduced-motion: reduce) {
  .tip-magic-tooltip:not([data-tip-magic-motion='always']) .tip-magic-tour-close,
  .tip-magic-tooltip:not([data-tip-magic-motion='always']) .tip-magic-tour-btn,
  .tip-magic-tooltip:not([data-tip-magic-motion='always']) .tip-magic-tour-progress-ring-fill {
    transition: none;
  }

  .tip-magic-tooltip:not([data-tip-magic-motion='always']) .tip-magic-tour-btn:active {
    transform: none;
  }
}


/* tip-advisor.css */
/**
 * TipAdvisor Styles
 *
 * Styles for the optional TipAdvisor menu component that displays
 * all tooltips with keyboard shortcuts for discoverability.
 *
 * All colors and sizing are controlled via CSS custom properties.
 * Override these in your own stylesheet to customize the appearance.
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* --------------------------------------------------------------------------
     BACKGROUND COLORS
     -------------------------------------------------------------------------- */

  /**
   * Background color of the menu panel
   * @default Semi-transparent dark gray
   */
  --tip-advisor-bg: rgba(24, 24, 27, 0.95);

  /**
   * Background color of the backdrop overlay
   * @default Semi-transparent black
   */
  --tip-advisor-backdrop-bg: rgba(0, 0, 0, 0.5);

  /**
   * Background color of menu items (default state)
   * @default Transparent
   */
  --tip-advisor-item-bg: transparent;

  /**
   * Background color of menu items on hover
   * @default Semi-transparent white
   */
  --tip-advisor-item-hover-bg: rgba(255, 255, 255, 0.1);

  /**
   * Background color of menu items on keyboard focus
   * @default Slightly more opaque white
   */
  --tip-advisor-item-focus-bg: rgba(255, 255, 255, 0.15);

  /* --------------------------------------------------------------------------
     TEXT COLORS
     -------------------------------------------------------------------------- */

  /**
   * Primary text color
   * @default Near-white
   */
  --tip-advisor-text: #fafafa;

  /**
   * Secondary/muted text color
   * @default Light gray
   */
  --tip-advisor-text-secondary: #a1a1aa;

  /**
   * Text color for shortcut badges
   * @default Light gray
   */
  --tip-advisor-shortcut-text: #e5e7eb;

  /**
   * Background color for shortcut badges
   * @default Semi-transparent white
   */
  --tip-advisor-shortcut-bg: rgba(255, 255, 255, 0.15);

  /* --------------------------------------------------------------------------
     BORDER & SHAPE
     -------------------------------------------------------------------------- */

  /**
   * Border style for the menu panel
   * @default Subtle white border
   */
  --tip-advisor-border: 1px solid rgba(255, 255, 255, 0.1);

  /**
   * Border radius for the menu panel
   * @default 12px (rounded corners)
   */
  --tip-advisor-border-radius: 12px;

  /**
   * Border radius for menu items
   * @default 8px
   */
  --tip-advisor-item-border-radius: 8px;

  /* --------------------------------------------------------------------------
     SHADOWS
     -------------------------------------------------------------------------- */

  /**
   * Box shadow for the menu panel
   * @default Large soft shadow
   */
  --tip-advisor-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* --------------------------------------------------------------------------
     SIZING
     -------------------------------------------------------------------------- */

  /**
   * Width of the menu panel
   * @default 320px
   */
  --tip-advisor-width: 320px;

  /**
   * Maximum height of the menu panel (scrollable if exceeded)
   * @default 400px
   */
  --tip-advisor-max-height: 400px;

  /**
   * Padding inside the menu panel
   * @default 8px
   */
  --tip-advisor-padding: 8px;

  /**
   * Padding inside menu items
   * @default 10px 12px
   */
  --tip-advisor-item-padding: 10px 12px;

  /**
   * Gap between menu items
   * @default 0px
   */
  --tip-advisor-gap: 0px;

  /* --------------------------------------------------------------------------
     ANIMATION
     -------------------------------------------------------------------------- */

  /**
   * Duration of show/hide animations
   * @default 150ms
   */
  --tip-advisor-animation-duration: 150ms;

  /* --------------------------------------------------------------------------
     SEARCH INPUT
     -------------------------------------------------------------------------- */

  /**
   * Background color for the search input
   * @default Semi-transparent white
   */
  --tip-advisor-search-bg: rgba(255, 255, 255, 0.1);

  /**
   * Border color for the search input
   * @default Semi-transparent white
   */
  --tip-advisor-search-border: rgba(255, 255, 255, 0.15);

  /**
   * Border color for the search input when focused
   * @default Semi-transparent white (more visible)
   */
  --tip-advisor-search-focus-border: rgba(255, 255, 255, 0.3);

  /**
   * Text color for the search input
   * @default Near-white
   */
  --tip-advisor-search-text: #fafafa;

  /**
   * Placeholder text color for the search input
   * @default Light gray
   */
  --tip-advisor-search-placeholder: #71717a;

  /* --------------------------------------------------------------------------
     HIGHLIGHT (SEARCH MATCH)
     -------------------------------------------------------------------------- */

  /**
   * Background color for highlighted/matched text
   * @default Semi-transparent yellow
   */
  --tip-advisor-highlight-bg: rgba(250, 204, 21, 0.4);

  /**
   * Text color for highlighted/matched text
   * @default Inherit (same as surrounding text)
   */
  --tip-advisor-highlight-text: inherit;
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */

.tip-advisor {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   BACKDROP
   ========================================================================== */

.tip-advisor-backdrop {
  position: absolute;
  inset: 0;
  background: var(--tip-advisor-backdrop-bg);
  animation: tip-advisor-fade-in var(--tip-advisor-animation-duration) ease-out;
}

@keyframes tip-advisor-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================================================
   MENU PANEL
   ========================================================================== */

.tip-advisor-menu {
  position: relative;
  width: var(--tip-advisor-width);
  max-height: var(--tip-advisor-max-height);
  background: var(--tip-advisor-bg);
  border: var(--tip-advisor-border);
  border-radius: var(--tip-advisor-border-radius);
  box-shadow: var(--tip-advisor-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: tip-advisor-scale-in var(--tip-advisor-animation-duration) ease-out;
}

@keyframes tip-advisor-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   POSITION VARIANTS
   ========================================================================== */

/* Center (default) - already centered via flexbox */
.tip-advisor-menu--center {
  /* No additional styles needed */
}

/* Bottom right */
.tip-advisor-menu--bottom-right {
  position: fixed;
  bottom: 20px;
  right: 20px;
  top: auto;
  left: auto;
}

/* Bottom left */
.tip-advisor-menu--bottom-left {
  position: fixed;
  bottom: 20px;
  left: 20px;
  top: auto;
  right: auto;
}

/* Top right */
.tip-advisor-menu--top-right {
  position: fixed;
  top: 20px;
  right: 20px;
  bottom: auto;
  left: auto;
}

/* Top left */
.tip-advisor-menu--top-left {
  position: fixed;
  top: 20px;
  left: 20px;
  bottom: auto;
  right: auto;
}

/* Top (centered horizontally) */
.tip-advisor-menu--top {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  right: auto;
  animation: tip-advisor-scale-in-centered var(--tip-advisor-animation-duration) ease-out;
}

/* Bottom (centered horizontally) */
.tip-advisor-menu--bottom {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  right: auto;
  animation: tip-advisor-scale-in-centered var(--tip-advisor-animation-duration) ease-out;
}

/* Animation for horizontally centered positions (preserves translateX) */
@keyframes tip-advisor-scale-in-centered {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.tip-advisor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: var(--tip-advisor-border);
  flex-shrink: 0;
}

/* ==========================================================================
   SEARCH INPUT
   ========================================================================== */

.tip-advisor-search {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: var(--tip-advisor-search-bg);
  border: 1px solid var(--tip-advisor-search-border);
  border-radius: 8px;
  color: var(--tip-advisor-search-text);
  font-size: 13px;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  outline: none;
  transition:
    border-color 150ms ease,
    background-color 150ms ease;
}

.tip-advisor-search:focus {
  border-color: var(--tip-advisor-search-focus-border);
  background: rgba(255, 255, 255, 0.15);
}

.tip-advisor-search::placeholder {
  color: var(--tip-advisor-search-placeholder);
}

.tip-advisor-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--tip-advisor-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.tip-advisor-close:hover {
  background: var(--tip-advisor-item-hover-bg);
  color: var(--tip-advisor-text);
}

.tip-advisor-close:focus {
  outline: none;
  background: var(--tip-advisor-item-focus-bg);
  color: var(--tip-advisor-text);
}

/* ==========================================================================
   LIST CONTAINER
   ========================================================================== */

.tip-advisor-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--tip-advisor-padding);
  display: flex;
  flex-direction: column;
  gap: var(--tip-advisor-gap);
}

/* Custom scrollbar */
.tip-advisor-list::-webkit-scrollbar {
  width: 6px;
}

.tip-advisor-list::-webkit-scrollbar-track {
  background: transparent;
}

.tip-advisor-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.tip-advisor-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   MENU ITEMS
   ========================================================================== */

.tip-advisor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--tip-advisor-item-padding);
  background: var(--tip-advisor-item-bg);
  border-radius: var(--tip-advisor-item-border-radius);
  cursor: pointer;
  transition: background-color 150ms ease;
  user-select: none;
}

.tip-advisor-item:hover,
.tip-advisor-item--hover {
  background: var(--tip-advisor-item-hover-bg);
}

.tip-advisor-item--focus {
  background: var(--tip-advisor-item-focus-bg);
}

.tip-advisor-item-content {
  font-size: 13px;
  color: var(--tip-advisor-text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tip-advisor-item-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  margin-left: 12px;
  background: var(--tip-advisor-shortcut-bg);
  color: var(--tip-advisor-shortcut-text);
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.tip-advisor-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--tip-advisor-text-secondary);
  font-size: 13px;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   SEARCH HIGHLIGHT
   ========================================================================== */

.tip-advisor-item-content mark,
.tip-advisor-item-shortcut mark {
  background: var(--tip-advisor-highlight-bg);
  color: var(--tip-advisor-highlight-text);
  border-radius: 2px;
  padding: 0 1px;
}

/* ==========================================================================
   NO BACKDROP VARIANT
   ========================================================================== */

.tip-advisor--no-backdrop {
  pointer-events: none;
}

.tip-advisor--no-backdrop .tip-advisor-menu {
  pointer-events: auto;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .tip-advisor-backdrop,
  .tip-advisor-menu {
    animation: none;
  }

  .tip-advisor-item,
  .tip-advisor-close {
    transition: none;
  }
}


