/*
 * Liquid Glass — base styles.
 * Pair with liquid-glass.js which injects the per-element SVG refraction
 * filter into `backdrop-filter`. The CSS below provides the fill / border /
 * shadow chrome that makes the glass read as glass, plus a sensible blur
 * fallback for browsers that don't support SVG filters in backdrop-filter.
 */

.liquid-glass {
  position: relative;
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 20px 40px -12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  color: inherit;
  isolation: isolate;
}

/* Pill-shaped variant */
.liquid-glass--pill {
  border-radius: 999px;
}

/* Interactive button variant */
.liquid-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 18px -6px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.liquid-btn:hover {
  background-color: rgba(255, 255, 255, 0.38);
}

.liquid-btn:active {
  transform: scale(0.97);
}

@media (prefers-color-scheme: dark) {
  .liquid-glass {
    background-color: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 20px 40px -12px rgba(0, 0, 0, 0.6);
  }
  .liquid-btn {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f5f5f7;
  }
  .liquid-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }
}
