/* Flächen und Bedienelemente: Glas-Pillen und runde Symbolknöpfe. Alles Bedienbare ist dünn und
   klein (Type Contrast). */

/* Milchglas auf hellem Grund (helle Zone, Lightbox) */
.glass {
  border: 1px solid rgb(255 255 255 / 0.7);
  background: rgb(255 255 255 / 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

/* Milchglas auf dem Verlauf (dunkle Zone, Startseite) */
.glass-dark {
  border: 1px solid var(--control-line);
  background: var(--control-fill);
  color: var(--control-ink);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Pille: kleine, dünne Beschriftung, Ruhe-Rahmen durchgezogen */
.pill {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-ui);
  font-weight: var(--weight-light);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

/* Druck-Feedback: Bedienelemente geben nach und federn zurück; magnetische Pillen
   (js/motion/magnet.js) folgen dem Zeiger über translate mit derselben Feder */
.pill,
.icon-button {
  transition:
    scale var(--duration-spring) var(--ease-spring),
    translate var(--duration-spring) var(--ease-spring),
    background-color var(--duration-hover) var(--ease-in-out),
    border-color var(--duration-hover) var(--ease-in-out);
}

.pill:active,
.icon-button:active {
  scale: 0.96;
  transition-duration: 100ms;
}

.glass.pill:hover,
.glass.icon-button:hover {
  background: rgb(255 255 255 / 0.75);
}

.glass-dark.pill:hover,
.glass-dark.icon-button:hover {
  background: var(--control-fill-hover);
}

.icon-button {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
}

.icon-button svg {
  width: 1rem;
  height: 1rem;
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Kontrast-Pille als ruhige Leiste (Lese-Reiter und Ähnliches): hellgrau mit feiner Linie, darin
   eine flüssige Leiste mit schwarzem Tropfen (.contrast-pill, css/components/liquid-bar.css) */
.pill-bar {
  display: inline-flex;
  /* Die Tropfen-Schicht ragt über die Leiste hinaus; sichtbar bleibt nur, was in der Pille liegt */
  overflow: clip;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--pill-light);
  box-shadow: inset 0 0 0 1px var(--pill-line);
}

/* Eintrag in einer Kontrast-Pille (Menü, Unterleiste, Lese-Reiter): dünn und klein, gedämpfte
   Tinte, auf dem schwarzen Tropfen weiß */
.pill-item {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: inherit;
  font-size: var(--text-ui);
  font-weight: var(--weight-light);
  line-height: inherit;
  color: var(--color-ink-muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration-hover) var(--ease-in-out);
}

.pill-item:focus-visible {
  outline-offset: -2px;
}

.contrast-pill .pill-item {
  text-shadow: none;
}
