/**
 * Admonitions (Callouts)
 * Styled callout boxes for highlighting important information
 */

/* ============================================
   LUMINESCENT LEFT-EDGE GLOW ANIMATION
   Peaceful pulsing glow matching Bengal's code block aesthetic
   ============================================ */

@keyframes admonition-edge-glow {
  0%, 100% {
    box-shadow:
      var(--elevation-card),
      /* Left edge glow - base state */
      -1px 0 0 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 15%, transparent),
      -3px 0 8px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 8%, transparent),
      -1px 0 12px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 4%, transparent);
  }
  50% {
    box-shadow:
      var(--elevation-card),
      /* Left edge glow - peak state */
      -1px 0 0 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 25%, transparent),
      -3px 0 12px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 12%, transparent),
      -1px 0 16px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 6%, transparent);
  }
}

/* Dark mode variant - more visible glow */
@keyframes admonition-edge-glow-dark {
  0%, 100% {
    box-shadow:
      var(--elevation-card),
      -1px 0 0 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 20%, transparent),
      -3px 0 10px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 12%, transparent),
      -1px 0 16px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 6%, transparent);
  }
  50% {
    box-shadow:
      var(--elevation-card),
      -1px 0 0 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 35%, transparent),
      -3px 0 14px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 18%, transparent),
      -1px 0 20px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 10%, transparent);
  }
}

/* Base Admonition Styles */
.admonition {
  --admonition-color: var(--color-border-strong);
  position: relative;
  margin-block: 1.5rem;
  padding: 1rem 1.25rem;
  /* Luminescent left edge - thin border with soft glow */
  border-inline-start: 2px solid color-mix(in srgb, var(--admonition-color) 60%, transparent);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background-color: var(--color-bg-secondary);
  /* Peaceful glow animation - signature Bengal left-edge pulse */
  animation: admonition-edge-glow 8s ease-in-out infinite;
  transition: border-color var(--transition-base);
  overflow: hidden;
}

/* Blob background animation for admonitions - Palette-aware */
.admonition::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle at 35% 35%,
      color-mix(in srgb, var(--blob-color-1) 7%, transparent) 0%,
      color-mix(in srgb, var(--blob-color-2) 5%, transparent) 30%,
      color-mix(in srgb, var(--blob-color-3) 3%, transparent) 55%,
      transparent 70%);
  border-radius: 50%;
  animation: blob-morph var(--blob-duration-medium) ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.admonition:hover::before {
  opacity: 0.8;
}

.admonition>* {
  position: relative;
  z-index: 1;
}

/* Fallback for browsers without color-mix */
/* Fallback for browsers without color-mix */
@supports not (color: color-mix(in srgb, black, white)) {
  .admonition::before {
    background: radial-gradient(circle at 35% 35%,
        rgba(59, 130, 246, 0.07) 0%,
        rgba(76, 175, 80, 0.05) 30%,
        rgba(255, 152, 0, 0.03) 55%,
        transparent 70%);
  }

  /* Fallback to solid border for browsers without color-mix */
  .admonition {
    border-inline-start: 2px solid var(--color-border-strong);
    animation: none;
    box-shadow: var(--elevation-card);
  }

  .admonition.note,
  .admonition.info {
    border-inline-start-color: var(--color-info-border);
  }

  .admonition.tip,
  .admonition.success {
    border-inline-start-color: var(--color-success-border);
  }

  .admonition.warning,
  .admonition.caution {
    border-inline-start-color: var(--color-warning-border);
  }

  .admonition.danger,
  .admonition.error {
    border-inline-start-color: var(--color-error-border);
  }

  .admonition.example {
    border-inline-start-color: var(--color-example-border);
  }
}

/* Respect reduced motion - static subtle glow */
@media (prefers-reduced-motion: reduce) {
  .admonition::before {
    animation: none !important;
  }

  .admonition {
    animation: none !important;
    /* Static subtle glow for reduced motion users */
    box-shadow:
      var(--elevation-card),
      -2px 0 8px 0 color-mix(in srgb, var(--admonition-color, var(--color-primary)) 10%, transparent);
  }
}

/* Auto-apply gradient border to admonitions */
.admonition::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
}

.admonition.gradient-border {
  --admonition-color: var(--color-primary);
  border-inline-start: 2px solid color-mix(in srgb, var(--color-primary) 60%, transparent);
}

.admonition:hover {
  /* Editorial: no lift or shadow change on hover */
}

/* Admonitions with icons */
.admonition:has(.admonition-icon) {
  padding-inline-start: 3rem;
}

/* Admonition Title */
.admonition-title {
  margin: 0 0 0.5rem 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Admonition Title Icon - Now rendered directly in HTML as SVG */
.admonition-icon-wrapper {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.admonition-icon {
  width: 20px;
  height: 20px;
  color: inherit;
}

.admonition-title-text {
  flex: 1;
}

/* Admonition Content - visually distinct from body */
.admonition>p {
  margin: 0.5rem 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.admonition>p:first-of-type {
  margin-top: 0;
}

.admonition>p:last-child {
  margin-bottom: 0;
}

/* Remove top margin from first element after title */
.admonition-title+* {
  margin-top: 0;
}

/* Spacing for other direct children */
.admonition>*:not(.admonition-title):not(p) {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.admonition>*:not(.admonition-title):first-of-type {
  margin-top: 0;
}

.admonition>*:last-child {
  margin-bottom: 0;
}

/* List styling in admonitions */
.admonition ul,
.admonition ol {
  padding-inline-start: var(--space-8);
  margin: 0.75rem 0;
}

.admonition ul:first-child,
.admonition ol:first-child {
  margin-top: 0;
}

.admonition ul {
  list-style-type: disc;
}

.admonition ol {
  list-style-type: decimal;
}

.admonition li {
  margin: var(--space-1) 0;
}

/* Code blocks in admonitions */
.admonition pre {
  margin: 0.75rem 0;
}

.admonition pre:first-child {
  margin-top: 0;
}

.admonition pre:last-child {
  margin-bottom: 0;
}

/* Inline code in admonitions */
.admonition code {
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .admonition code {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Reset for code blocks inside admonitions (not inline code) */
.admonition pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

/* ============================================
   SHORTCODE CALLOUTS (warning, danger, tip)
   Used by shortcodes/warning.html, danger.html, tip.html
   Mirrors admonition styling for consistency
   ============================================ */

.callout {
  --admonition-color: var(--color-border-strong);
  position: relative;
  margin-block: 1.5rem;
  padding: 1rem 1.25rem;
  border-inline-start: 2px solid color-mix(in srgb, var(--admonition-color) 60%, transparent);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background-color: var(--color-bg-secondary);
  animation: admonition-edge-glow 8s ease-in-out infinite;
  transition: border-color var(--transition-base);
  overflow: hidden;
}

.callout::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle at 35% 35%,
      color-mix(in srgb, var(--blob-color-1) 7%, transparent) 0%,
      color-mix(in srgb, var(--blob-color-2) 5%, transparent) 30%,
      color-mix(in srgb, var(--blob-color-3) 3%, transparent) 55%,
      transparent 70%);
  border-radius: 50%;
  animation: blob-morph var(--blob-duration-medium) ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.callout > * {
  position: relative;
  z-index: 1;
}

.callout-title {
  margin: 0 0 0.5rem 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.callout-content {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.callout-content :first-child {
  margin-top: 0;
}

.callout-content :last-child {
  margin-bottom: 0;
}

.callout-warning {
  --admonition-color: var(--color-warning);
  border-inline-start-color: color-mix(in srgb, var(--color-warning) 60%, transparent);
  background-color: var(--color-warning-bg);
}

.callout-warning .callout-title {
  color: var(--color-warning-text);
}

.callout-danger {
  --admonition-color: var(--color-error);
  border-inline-start-color: color-mix(in srgb, var(--color-error) 60%, transparent);
  background-color: var(--color-error-bg);
}

.callout-danger .callout-title {
  color: var(--color-error-text);
}

.callout-tip {
  --admonition-color: var(--color-success);
  border-inline-start-color: color-mix(in srgb, var(--color-success) 60%, transparent);
  background-color: var(--color-success-bg);
}

.callout-tip .callout-title {
  color: var(--color-success-text);
}

@media (prefers-reduced-motion: reduce) {
  .callout {
    animation: none !important;
  }
}

/* Details shortcode - collapsible content */
.details-content {
  margin-top: var(--space-3);
  padding: var(--space-3) 0;
  color: var(--color-text-secondary);
}

.details-content > *:first-child {
  margin-top: 0;
}

.details-content > *:last-child {
  margin-bottom: 0;
}

/* ============================================
   ADMONITION TYPES
   Each type sets --admonition-color for the luminescent glow
   ============================================ */

/* Note / Info */
.admonition.note,
.admonition.info {
  --admonition-color: var(--color-info);
  border-inline-start-color: color-mix(in srgb, var(--color-info) 60%, transparent);
  background-color: var(--color-info-bg);
}

.admonition.note .admonition-title,
.admonition.info .admonition-title {
  color: var(--color-info-text);
}

[data-theme="dark"] .admonition.note,
[data-theme="dark"] .admonition.info {
  background-color: var(--color-info-bg);
  border-inline-start-color: color-mix(in srgb, var(--color-info) 50%, transparent);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.note .admonition-title,
[data-theme="dark"] .admonition.info .admonition-title {
  color: var(--color-info-text);
}

/* Tip / Success */
.admonition.tip,
.admonition.success {
  --admonition-color: var(--color-success);
  border-inline-start-color: color-mix(in srgb, var(--color-success) 60%, transparent);
  background-color: var(--color-success-bg);
}

.admonition.tip .admonition-title,
.admonition.success .admonition-title {
  color: var(--color-success-text);
}

[data-theme="dark"] .admonition.tip,
[data-theme="dark"] .admonition.success {
  background-color: var(--color-success-bg);
  border-inline-start-color: color-mix(in srgb, var(--color-success) 50%, transparent);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.tip .admonition-title,
[data-theme="dark"] .admonition.success .admonition-title {
  color: var(--color-success-text);
}

/* Warning / Caution */
.admonition.warning,
.admonition.caution {
  --admonition-color: var(--color-warning);
  border-inline-start-color: color-mix(in srgb, var(--color-warning) 60%, transparent);
  background-color: var(--color-warning-bg);
}

.admonition.warning .admonition-title,
.admonition.caution .admonition-title {
  color: var(--color-warning-text);
}

[data-theme="dark"] .admonition.warning,
[data-theme="dark"] .admonition.caution {
  background-color: var(--color-warning-bg);
  border-inline-start-color: color-mix(in srgb, var(--color-warning) 50%, transparent);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.warning .admonition-title,
[data-theme="dark"] .admonition.caution .admonition-title {
  color: var(--color-warning-text);
}

/* Danger / Error */
.admonition.danger,
.admonition.error {
  --admonition-color: var(--color-error);
  border-inline-start-color: color-mix(in srgb, var(--color-error) 60%, transparent);
  background-color: var(--color-error-bg);
}

.admonition.danger .admonition-title,
.admonition.error .admonition-title {
  color: var(--color-error-text);
}

[data-theme="dark"] .admonition.danger,
[data-theme="dark"] .admonition.error {
  background-color: var(--color-error-bg);
  border-inline-start-color: color-mix(in srgb, var(--color-error) 50%, transparent);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.danger .admonition-title,
[data-theme="dark"] .admonition.error .admonition-title {
  color: var(--color-error-text);
}

/* See Also - Arrow list markers for navigation-style links */
.admonition.seealso {
  --admonition-color: var(--color-info);
  border-inline-start-color: color-mix(in srgb, var(--color-info) 60%, transparent);
  background-color: var(--color-info-bg);
}

.admonition.seealso .admonition-title {
  color: var(--color-info-text);
}

.admonition.seealso ul {
  list-style: none;
  padding-inline-start: 0;
  margin-inline-start: 0;
}

.admonition.seealso li {
  padding-inline-start: 1.5em;
  position: relative;
}

.admonition.seealso li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--admonition-color);
  font-weight: var(--weight-medium);
}

[data-theme="dark"] .admonition.seealso {
  background-color: var(--color-info-bg);
  border-inline-start-color: color-mix(in srgb, var(--color-info) 50%, transparent);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.seealso .admonition-title {
  color: var(--color-info-text);
}

/* Example */
.admonition.example {
  --admonition-color: var(--color-example);
  border-inline-start-color: color-mix(in srgb, var(--color-example) 60%, transparent);
  background-color: var(--color-example-bg);
}

.admonition.example .admonition-title {
  color: var(--color-example-text);
}

/* Example icon: Notepad */
.admonition.example .admonition-title::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='3' width='16' height='18' rx='2' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='7' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='13' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='16' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Cline x1='7' y1='10' x2='17' y2='10' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='7' y1='14' x2='15' y2='14' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='7' y1='18' x2='13' y2='18' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='4' y='3' width='16' height='18' rx='2' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='7' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='13' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Ccircle cx='16' cy='5' r='1' stroke='currentColor' stroke-width='1.5'/%3E%3Cline x1='7' y1='10' x2='17' y2='10' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='7' y1='14' x2='15' y2='14' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='7' y1='18' x2='13' y2='18' stroke='currentColor' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .admonition.example {
  --admonition-color: var(--color-example);
  border-inline-start-color: color-mix(in srgb, var(--color-example) 50%, transparent);
  background-color: var(--color-example-bg);
  animation-name: admonition-edge-glow-dark;
}

[data-theme="dark"] .admonition.example .admonition-title {
  color: var(--color-example-text);
}

/* ============================================
   NESTED ADMONITIONS
   ============================================ */

.admonition .admonition {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .admonition {
    padding: var(--space-3) var(--space-4);
    margin: var(--space-4) 0;
  }

  .admonition-title {
    font-size: var(--text-sm);
  }
}

/* Further reduce padding on very small screens */
@media (max-width: 399px) {
  .admonition {
    padding: var(--space-2) var(--space-3);
    margin: var(--space-3) 0;
  }
}

/* ============================================
   HOLOGRAPHIC ADMONITIONS (Experimental)
   Pokemon TCG-inspired holographic effect

   Usage: Add class="holo" to any admonition
   Uses Bengal's semantic tokens for theme compatibility.
   JS updates --holo-x and --holo-y on mousemove.
   ============================================ */

/* Holographic variant - overrides default ::before/::after */
.admonition.holo {
  /* Rainbow spectrum using semantic color tokens as anchors */
  --holo-gradient: repeating-linear-gradient(0deg,
      color-mix(in oklch, var(--color-error) 80%, white) calc(5% * 1),
      color-mix(in oklch, var(--color-warning) 80%, white) calc(5% * 2),
      color-mix(in oklch, var(--color-success) 80%, white) calc(5% * 3),
      color-mix(in oklch, var(--color-info) 80%, white) calc(5% * 4),
      color-mix(in oklch, var(--color-primary) 80%, white) calc(5% * 5),
      color-mix(in oklch, var(--color-accent) 80%, white) calc(5% * 6),
      color-mix(in oklch, var(--color-error) 80%, white) calc(5% * 7));
  --holo-x: 50;
  --holo-y: 50;
  --holo-blend: color-dodge;
  --holo-opacity: 0.5;
  --holo-glare-opacity: 0.3;
  isolation: isolate;
  overflow: visible;
}

/* Fallback gradient for browsers without color-mix */
@supports not (color: color-mix(in oklch, red, blue)) {
  .admonition.holo {
    --holo-gradient: repeating-linear-gradient(0deg,
        hsl(0, 90%, 75%) calc(5% * 1),
        hsl(45, 95%, 70%) calc(5% * 2),
        hsl(120, 80%, 70%) calc(5% * 3),
        hsl(190, 90%, 70%) calc(5% * 4),
        hsl(220, 90%, 75%) calc(5% * 5),
        hsl(280, 80%, 75%) calc(5% * 6),
        hsl(360, 90%, 75%) calc(5% * 7));
  }
}

/* Rainbow shine layer - replaces blob animation */
.admonition.holo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background: var(--holo-gradient);
  background-size: 400% 400%;
  background-position:
    calc(var(--holo-x) * 1%) calc(var(--holo-y) * 1%);
  mix-blend-mode: var(--holo-blend);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity var(--transition-base);
  animation: none;
  width: auto;
  height: auto;
  top: 0;
  right: 0;
  -webkit-mask-image: radial-gradient(farthest-corner circle at calc(var(--holo-x) * 1%) calc(var(--holo-y) * 1%),
      rgba(0, 0, 0, 0.9) 10%,
      rgba(0, 0, 0, 0.5) 40%,
      transparent 75%);
  mask-image: radial-gradient(farthest-corner circle at calc(var(--holo-x) * 1%) calc(var(--holo-y) * 1%),
      rgba(0, 0, 0, 0.9) 10%,
      rgba(0, 0, 0, 0.5) 40%,
      transparent 75%);
}

/* Glare layer - spotlight following cursor */
.admonition.holo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  background: radial-gradient(farthest-corner circle at calc(var(--holo-x) * 1%) calc(var(--holo-y) * 1%),
      var(--color-bg-primary) 0%,
      color-mix(in srgb, var(--color-bg-primary) 50%, transparent) 25%,
      transparent 55%);
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  z-index: 11;
  transition: opacity var(--transition-base);
  padding: 0;
  -webkit-mask: none;
  mask: none;
}

/* Show effects on hover */
.admonition.holo:hover::before {
  opacity: var(--holo-opacity);
}

.admonition.holo:hover::after {
  opacity: var(--holo-glare-opacity);
}

/* Type-specific tint shifts using admonition's own color */
.admonition.holo.note::before,
.admonition.holo.info::before {
  filter: hue-rotate(180deg) saturate(0.85);
}

.admonition.holo.tip::before,
.admonition.holo.success::before {
  filter: hue-rotate(100deg) saturate(0.9);
}

.admonition.holo.warning::before,
.admonition.holo.caution::before {
  filter: hue-rotate(30deg) saturate(1.1);
}

.admonition.holo.danger::before,
.admonition.holo.error::before {
  filter: hue-rotate(-20deg) saturate(1.2);
}

/* ============================================
   DARK MODE - Different blend mode strategy
   color-dodge blows out on dark backgrounds,
   so we use soft-light + higher saturation
   ============================================ */

[data-theme="dark"] .admonition.holo {
  --holo-blend: soft-light;
  --holo-opacity: 0.7;
  --holo-glare-opacity: 0.4;
  /* Boost saturation for dark mode visibility */
  --holo-gradient: repeating-linear-gradient(0deg,
      color-mix(in oklch, var(--color-error) 90%, transparent) calc(5% * 1),
      color-mix(in oklch, var(--color-warning) 90%, transparent) calc(5% * 2),
      color-mix(in oklch, var(--color-success) 90%, transparent) calc(5% * 3),
      color-mix(in oklch, var(--color-info) 90%, transparent) calc(5% * 4),
      color-mix(in oklch, var(--color-primary) 90%, transparent) calc(5% * 5),
      color-mix(in oklch, var(--color-accent) 90%, transparent) calc(5% * 6),
      color-mix(in oklch, var(--color-error) 90%, transparent) calc(5% * 7));
}

/* Dark mode fallback */
@supports not (color: color-mix(in oklch, red, blue)) {
  [data-theme="dark"] .admonition.holo {
    --holo-gradient: repeating-linear-gradient(0deg,
        hsla(0, 85%, 60%, 0.9) calc(5% * 1),
        hsla(45, 90%, 55%, 0.9) calc(5% * 2),
        hsla(120, 75%, 55%, 0.9) calc(5% * 3),
        hsla(190, 85%, 55%, 0.9) calc(5% * 4),
        hsla(220, 85%, 60%, 0.9) calc(5% * 5),
        hsla(280, 75%, 60%, 0.9) calc(5% * 6),
        hsla(360, 85%, 60%, 0.9) calc(5% * 7));
  }
}

[data-theme="dark"] .admonition.holo::after {
  background: radial-gradient(farthest-corner circle at calc(var(--holo-x) * 1%) calc(var(--holo-y) * 1%),
      color-mix(in srgb, var(--color-bg-secondary) 80%, white) 0%,
      color-mix(in srgb, var(--color-bg-secondary) 40%, transparent) 30%,
      transparent 55%);
}

/* Reduced motion - disable holo transitions */
@media (prefers-reduced-motion: reduce) {

  .admonition.holo::before,
  .admonition.holo::after {
    transition: none !important;
  }
}
