/* ============================================================
   ParsinX — Effects: gloss, glass, shadow, glow
   The signature look: glossy material surfaces with specular
   sheen + animated "AI glow" borders.
   ============================================================ */

:root {
  /* Recessed "well" inset + hover veil — overridden per theme */
  --inset-well: inset 0 1px 2px rgba(0,0,0,0.5); /* @kind shadow */
  --hover-veil: rgba(255,255,255,0.05); /* @kind color */

  /* ---- Elevation shadows (material, cool-tinted) ---- */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.45);
  --shadow-sm:  0 2px 6px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.40);
  --shadow-lg:  0 18px 48px rgba(0,0,0,0.55), 0 6px 16px rgba(0,0,0,0.40);
  --shadow-xl:  0 32px 80px rgba(0,0,0,0.60), 0 12px 28px rgba(0,0,0,0.45);

  /* ---- Glossy surface fills (top specular highlight → body) ---- */
  --gloss-card: linear-gradient(180deg,
      rgba(255,255,255,0.06) 0%,
      rgba(255,255,255,0.02) 22%,
      rgba(255,255,255,0) 60%),
      var(--surface-card);
  --gloss-raised: linear-gradient(180deg,
      rgba(255,255,255,0.08) 0%,
      rgba(255,255,255,0.025) 24%,
      rgba(255,255,255,0) 64%),
      var(--surface-raised);
  --gloss-accent: linear-gradient(180deg,
      var(--px-azure-bright) 0%,
      var(--px-azure) 48%,
      var(--px-azure-deep) 100%);
  --gloss-accent-sheen: linear-gradient(180deg,
      rgba(255,255,255,0.45) 0%,
      rgba(255,255,255,0.10) 18%,
      rgba(255,255,255,0) 46%); /* @kind other */

  /* Inner specular line that sits atop glossy controls */
  --inner-top-highlight: inset 0 1px 0 rgba(255,255,255,0.14); /* @kind shadow */
  --inner-top-highlight-strong: inset 0 1px 0 rgba(255,255,255,0.30); /* @kind shadow */
  --inner-ring: inset 0 0 0 1px rgba(255,255,255,0.06); /* @kind shadow */

  /* ---- Glass ---- */
  --glass-bg: var(--surface-glass);
  --glass-blur: 18px;
  --glass-border: 1px solid rgba(255,255,255,0.08); /* @kind other */
  --glass-shadow: 0 16px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.10);

  /* ---- Colored glow halos ---- */
  --glow-accent:  0 0 0 1px color-mix(in srgb, var(--px-azure) 50%, transparent),
                  0 0 24px color-mix(in srgb, var(--px-azure) 45%, transparent),
                  0 0 64px color-mix(in srgb, var(--px-azure) 22%, transparent);
  --glow-cyan:    0 0 24px color-mix(in srgb, var(--px-cyan) 45%, transparent);
  --glow-violet:  0 0 24px color-mix(in srgb, var(--px-violet) 45%, transparent);
  --glow-online:  0 0 0 1px color-mix(in srgb, var(--px-emerald) 50%, transparent),
                  0 0 16px color-mix(in srgb, var(--px-emerald) 50%, transparent);
  --glow-focus:   0 0 0 3px color-mix(in srgb, var(--px-azure) 38%, transparent);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Glossy card surface */
.px-glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---- Animated AI glow border ----
   Wrap any element: the ::before paints a flowing gradient revealed
   only on the border via mask, animated by sliding background-position
   (smooth, no @property). Add .is-static to freeze. */
.px-glow-border {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-card);
}
.px-glow-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: var(--glow-w, 1.5px);
  border-radius: inherit;
  background: var(--px-glow-linear);
  background-size: 300% 100%;
  -webkit-mask:
     linear-gradient(#000 0 0) content-box,
     linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  animation: px-glow-flow 6s linear infinite;
  z-index: 1;
}
/* Soft outer bloom behind the glow border */
.px-glow-border.is-bloom::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--px-glow-linear);
  background-size: 300% 100%;
  filter: blur(16px);
  opacity: 0.35;
  z-index: -1;
  animation: px-glow-flow 6s linear infinite;
}
.px-glow-border.is-static::before,
.px-glow-border.is-static::after { animation: none; }

@keyframes px-glow-flow {
  to { background-position: 300% 0; }
}

/* Sweeping specular sheen (for buttons / hero chips on hover) */
@keyframes px-sheen {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(260%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .px-glow-border::before,
  .px-glow-border.is-bloom::after { animation: none; }
}
