/* ============================================================
   tool-guide.css — Suggested Tool
   ─────────────────────────────────────────
   PURPOSE : Marks the dock tool(s) to try for the current condition
             ([data-suggested], set by js/eye-simulator/tool-guide/) and
             styles the hint under the eyes
             (html-templates/exam/tool-hint.html).
             Amber is the brand's catchlight — used here, sparingly, as
             "look here".
   ============================================================ */

/* ── Highlight in the dock ────────────────────────────────────── */
.tool-dock-container [data-suggested] {
  position: relative;
  border-color: var(--mark-catch);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--mark-catch);
}

.tool-dock-container .tool-slot[data-suggested] {
  border-style: solid;
}

@media (prefers-reduced-motion: no-preference) {
  /* A few pulses when the suggestion appears, then a steady ring. */
  .tool-dock-container [data-suggested]::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 2px solid var(--mark-catch);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: tool-suggest-pulse 1.6s ease-out 3;
  }
}

@keyframes tool-suggest-pulse {
  0%   { opacity: 0.75; transform: scale(0.94); }
  100% { opacity: 0;    transform: scale(1.3); }
}

/* ── Hint under the eyes ──────────────────────────────────────── */
.tool-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 680px;
  margin: 18px auto 0;
  padding: 10px 8px 10px 12px;
  border: 1px solid color-mix(in srgb, var(--mark-catch) 45%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--mark-catch) 9%, var(--surface));
}

.tool-hint[hidden] {
  display: none;
}

.tool-hint__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--mark-catch);
  color: var(--mark-disc);
}

.tool-hint__icon svg {
  width: 18px;
  height: 18px;
}

.tool-hint__body {
  flex: 1;
  padding-top: 5px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.tool-hint__label {
  margin-inline-end: 4px;
  font-weight: 600;
  color: var(--text-soft);
}

.tool-hint__tools {
  font-weight: 700;
}

.tool-hint__tools::after {
  content: " — ";
  font-weight: 400;
  color: var(--text-faint);
}

.tool-hint__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.tool-hint__close svg {
  width: 14px;
  height: 14px;
}

.tool-hint__close:hover {
  background: color-mix(in srgb, var(--mark-catch) 18%, transparent);
  color: var(--text);
}

.tool-hint__close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

html[dir="rtl"] .tool-hint {
  padding: 10px 12px 10px 8px;
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', 'Inter', system-ui, sans-serif;
}
