/*
  Toggle 09 — Favorite Toggle — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --toggle-accent: #39ff14;
  --toggle-fg: oklch(0.145 0 0);
  --toggle-muted: oklch(0.6 0 0);
  --toggle-hover: oklch(0.96 0 0);
}

.toggle09 {
  position: relative;
  display: inline-flex;
  height: 2.25rem;
  width: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: none;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--toggle-muted);
  cursor: pointer;
  outline: none;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}

.toggle09:hover {
  background-color: var(--toggle-hover);
  color: var(--toggle-fg);
}

.toggle09:focus-visible {
  outline: 2px solid var(--toggle-fg);
  outline-offset: 2px;
}

.toggle09:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.toggle09[aria-pressed="true"] {
  color: var(--toggle-fg);
}

.toggle09-icon {
  height: 18px;
  width: 18px;
  transition: transform 150ms ease-out;
}

.toggle09[aria-pressed="true"] .toggle09-icon {
  fill: currentColor;
  transform: scale(1.05);
}

@keyframes toggle09-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklch, var(--toggle-accent) 55%, transparent);
  }
  100% {
    box-shadow: 0 0 0 10px color-mix(in oklch, var(--toggle-accent) 0%, transparent);
  }
}

.toggle09-pulse {
  animation: toggle09-pulse-ring 450ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .toggle09,
  .toggle09-icon {
    transition: none;
  }
  .toggle09-pulse {
    animation: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.toggle09-layout {
  display: flex;
  min-height: 14rem;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.toggle09-layout__panel {
  width: 100%;
  max-width: 24rem;
  border: 1px solid oklch(0.9 0 0);
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.5rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
.toggle09-layout__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
}
.toggle09-layout__track {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}
.toggle09-layout__art {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: oklch(0.145 0 0);
  color: #ffffff;
}
.toggle09-layout__meta {
  min-width: 0;
}
.toggle09-layout__title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: oklch(0.145 0 0);
}
.toggle09-layout__artist {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: oklch(0.5 0 0);
}
