/* Interpretation actions: coloured pearl surface, luminous orbit and jewel icon.
   Shared by every existing entry point; disabled controls retain their own style. */
@property --interpretation-orbit {
  syntax: "<angle>";
  initial-value: 135deg;
  inherits: false;
}
:is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) {
  --interpretation-ink: color-mix(in srgb, var(--accent, #465faa) 25%, var(--text, #17213a));
  --interpretation-violet: color-mix(in srgb, var(--accent, #465faa) 65%, #9561dc);
  --interpretation-sky: color-mix(in srgb, var(--accent, #465faa) 50%, #279fbd);
  --interpretation-jewel: color-mix(in srgb, var(--accent, #465faa) 55%, #182449);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Theme action rules also use !important; this finish takes precedence. */
  border-color: transparent !important;
  background:
    radial-gradient(ellipse at 0 0, color-mix(in srgb, var(--accent, #465faa) 12%, transparent), transparent 65%),
    linear-gradient(110deg, color-mix(in srgb, var(--accent, #465faa) 22%, var(--surface, #fff)), color-mix(in srgb, #b99ce8 18%, var(--surface, #fff)) 52%, color-mix(in srgb, #dfc182 25%, var(--surface, #fff))) !important;
  color: var(--interpretation-ink) !important;
  -webkit-text-fill-color: var(--interpretation-ink) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #465faa) 18%, transparent), 0 4px 16px color-mix(in srgb, var(--accent, #465faa) 22%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface, #fff) 80%, transparent);
  text-shadow: none;
  text-decoration: none;
  font-weight: 650;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
/* The coloured rim stays visible at rest. Masks keep it clear of the label. */
:is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--interpretation-orbit), var(--interpretation-violet), var(--interpretation-sky) 24%, #f5e3b0 36%, #c9a14f 49%, var(--interpretation-violet) 68%, var(--interpretation-sky) 85%, var(--interpretation-violet));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
:is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::after {
  content: "";
  position: absolute;
  inset: -80% -45%;
  z-index: -1;
  background: linear-gradient(110deg, transparent 40%, color-mix(in srgb, var(--surface, #fff) 80%, transparent) 50%, transparent 60%);
  transform: translateX(-85%);
  pointer-events: none;
}
:is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) > svg {
  box-sizing: border-box;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  padding: 5px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--interpretation-jewel), color-mix(in srgb, var(--interpretation-jewel) 78%, #5a3b88));
  color: #fff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent, #465faa) 28%, transparent), inset 0 1px 0 #ffffff40;
}
.om-consult:not(:disabled):not([aria-disabled="true"]) > span:last-child {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: var(--interpretation-jewel);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 14px;
}
:is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]):focus-visible {
  outline: 2px solid var(--accent, #465faa);
  outline-offset: 4px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent, #465faa) 12%, transparent);
}
@media (hover: hover) {
  :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]):hover {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #465faa) 32%, transparent), 0 6px 22px color-mix(in srgb, var(--accent, #465faa) 32%, transparent), inset 0 1px 0 var(--surface, #fff);
  }
}
/* Icon-only controls keep fitting into the existing mobile chart toolbar. */
:is(#private-map-prompt, .chart-card-interpret-button):not(:disabled):not([aria-disabled="true"]) > svg { width: 22px; height: 22px; flex-basis: 22px; padding: 3px; border-radius: 7px; }
@media (max-width: 900px) {
  #private-map-prompt:not(:disabled):not([aria-disabled="true"]) > svg { width: 24px; height: 24px; flex-basis: 24px; padding: 3px; border-radius: 7px; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduce-motion="true"]) :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::before { animation: interpretation-orbit 8s linear infinite; }
  html:not([data-reduce-motion="true"]) :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::after { animation: interpretation-light-idle 7s ease-in-out infinite; }
  html:not([data-reduce-motion="true"]) :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]):is(:hover, :focus-visible)::after { animation: interpretation-light 900ms ease-out both; }
  html:not([data-reduce-motion="true"]) :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]):active { transform: scale(.985); }
}
@keyframes interpretation-orbit { to { --interpretation-orbit: 495deg; } }
@keyframes interpretation-light { from { transform: translateX(-85%); } to { transform: translateX(85%); } }
@keyframes interpretation-light-idle {
  0%, 65% { transform: translateX(-85%); }
  85%, 100% { transform: translateX(85%); }
}
@media (prefers-reduced-motion: reduce) { :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) { transition: none; } }
html[data-reduce-motion="true"] :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) { transition: none; }
@media (forced-colors: active) {
  :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) { background: ButtonFace !important; border-color: ButtonText !important; color: ButtonText !important; -webkit-text-fill-color: ButtonText !important; box-shadow: none; }
  :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::before, :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"])::after { display: none; }
  :is(
  #private-map-prompt, #open-chart-data, .chart-card-interpret-button,
  .om-consult, .on-prepare-session, [data-follow-review], [data-session-generate],
  .chart-data-gpt-link, .om-actions a[href="/complemento/abrir"],
  #share-chart-complement, .on-session-preview a[href="/complemento/abrir"]
):not(:disabled):not([aria-disabled="true"]) > svg { color: ButtonText; background: transparent; box-shadow: none; }
  .om-consult:not(:disabled):not([aria-disabled="true"]) > span:last-child { color: ButtonText; -webkit-text-fill-color: ButtonText; background: transparent; }
}
