/* Structural styles for LiquidGlass hosts (see liquid-glass.js). */

.lg-host {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 999px; /* pill by default; override per component */
  /* shuding's glass shadows: soft drop + inner depth at the bottom edge */
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    0 -10px 25px inset rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  will-change: transform;
}

.lg-host.lg-over-light {
  box-shadow:
    0 16px 70px rgba(0, 0, 0, 0.6),
    0 -10px 25px inset rgba(0, 0, 0, 0.15);
}

/* backdrop layer that gets refracted â€” never put content in here */
.lg-warp {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* readability scrim for glass sitting on very bright backdrops */
.lg-over-light .lg-warp {
  background: rgba(0, 0, 0, 0.18) !important;
}

/* content stays sharp above the optics */
.lg-content {
  position: relative;
  z-index: 1;
}

/* specular rim: two masked gradient rings driven by pointer position */
.lg-border {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.5) inset,
    0 1px 3px rgba(255, 255, 255, 0.25) inset,
    0 1px 4px rgba(0, 0, 0, 0.35);
}

.lg-border--screen {
  mix-blend-mode: screen;
  opacity: 0.2;
}

.lg-border--overlay {
  mix-blend-mode: overlay;
}

/* top sheen shown on hover/press of interactive glass */
.lg-sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  mix-blend-mode: overlay;
}

.lg-host:hover .lg-sheen,
.lg-host:focus-visible .lg-sheen {
  opacity: 0.6;
}

.lg-host:active .lg-sheen {
  opacity: 1;
}

.lg-host:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .lg-host {
    transition: none;
  }
}

@media (forced-colors: active) {
  .lg-host {
    border: 1px solid CanvasText;
    background: Canvas;
  }
  .lg-warp,
  .lg-border,
  .lg-sheen {
    display: none;
  }
}

