/*! software-support — Mac/iOS/Linux "online software supported" callout.
   Hidden until <software-support-badge> confirms the visitor's OS. */

.software-support {
  --ss-accent: var(--color-foreground);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2, 0.5rem);
  padding: var(--sp-2, 0.5rem) var(--sp-3, 0.75rem);
  border: 1px solid rgb(var(--ss-accent) / 0.14);
  border-radius: var(--sp-2, 0.5rem);
  background-color: rgb(var(--ss-accent) / 0.05);
  color: rgb(var(--ss-accent));
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.3;
  /* Reveal transition — opacity/transform only (no layout props). */
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Keeps it hidden pre-JS even though the base rule sets display:inline-flex. */
.software-support[hidden] {
  display: none;
}

/* JS sets data-os when the OS matches → fade + settle in. */
.software-support[data-os] {
  opacity: 1;
  transform: none;
}

/* OS logo — filled in by JS. Sits before the copy by default; `after`
   (Windows) reorders it past the text without changing the DOM. */
.software-support__logo {
  display: inline-flex;
  flex: 0 0 auto;
}

.software-support__logo:empty {
  display: none;
}

.software-support__logo svg {
  width: 1.05em;
  height: 1.05em;
  display: block;
}

.software-support[data-logo-pos='after'] .software-support__logo {
  order: 1;
}

.software-support__text {
  font-weight: var(--font-medium, 500);
}

.software-support__text b,
.software-support__os {
  font-weight: var(--font-bold, 700);
  white-space: nowrap;
}

/* Banner variant — used by the standalone section. */
.software-support--banner {
  display: flex;
  width: 100%;
  gap: var(--sp-4, 1rem);
  padding: var(--sp-5, 1.25rem) var(--sp-6, 1.5rem);
  border-radius: var(--sp-3, 0.75rem);
  font-size: var(--fluid-sm-to-base, 1rem);
}

.software-support--banner .software-support__logo svg {
  width: 1.5rem;
  height: 1.5rem;
}

.software-support--banner .software-support__body {
  display: grid;
  gap: var(--sp-1, 0.25rem);
}

.software-support__heading {
  font-weight: var(--font-bold, 700);
  line-height: 1.2;
}

.software-support--banner .software-support__text {
  color: rgb(var(--ss-accent) / 0.7);
}

/* Overlay variant — a "liquid glass" pill pinned to the media gallery corner. */
.software-support--overlay {
  position: absolute;
  top: var(--sp-3, 0.75rem);
  left: var(--sp-3, 0.75rem);
  z-index: 2;
  /* Informational only — never intercept gallery zoom/swipe. */
  pointer-events: none;
  gap: var(--sp-1d5, 0.375rem);
  padding: var(--sp-1d5, 0.375rem) var(--sp-2d5, 0.625rem);
  border-radius: 999px;
  color: rgb(var(--color-foreground));
  font-size: var(--text-2xs, 0.75rem);
  white-space: nowrap;

  /* Glass: a faint specular sheen layered over a translucent, blurred base. */
  border: 1px solid rgb(255 255 255 / 0.35);
  background-image: linear-gradient(
    140deg,
    rgb(255 255 255 / 0.35),
    rgb(255 255 255 / 0.04) 42%,
    rgb(255 255 255 / 0) 60%
  );
  background-color: rgb(var(--color-background) / 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  /* Shadowless — depth comes from the specular sheen + inner top highlight only. */
  box-shadow: inset 0 1px 0.5px rgb(255 255 255 / 0.55);

  /* Overlay settles down from the corner rather than lifting up. */
  transform: translateY(-3px);
}

/* Graceful fallback where backdrop-filter is unsupported — stay legible. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .software-support--overlay {
    background-color: rgb(var(--color-background) / 0.92);
  }
}

.software-support--overlay[data-os] {
  transform: none;
}

.software-support--overlay .software-support__logo svg {
  width: 1em;
  height: 1em;
}

@media screen and (max-width: 749px) {
  .software-support--overlay {
    top: var(--sp-2, 0.5rem);
    left: var(--sp-2, 0.5rem);
    font-size: 0.6875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .software-support {
    transition: none;
    transform: none;
  }
  .software-support[data-os] {
    transform: none;
  }
}
