.recipe-cooking-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 2rem;
}

.recipe-cooking-control__title {
  margin: 0;
  color: #14241e;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.15;
}

.recipe-cooking-switch {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  color: #14241e;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.recipe-cooking-switch:focus-visible {
  outline: 3px solid rgba(122, 99, 72, 0.28);
  outline-offset: 5px;
  border-radius: 1.5rem;
}

.recipe-cooking-switch__track {
  position: relative;
  display: block;
  width: 5rem;
  height: 2.55rem;
  border: 1px solid #a9967d;
  border-radius: 999px;
  background: #ddcfbd;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.recipe-cooking-switch[aria-checked="true"] .recipe-cooking-switch__track {
  border-color: #a78e70;
  background: #d3bea4;
}

.recipe-cooking-switch__thumb {
  position: absolute;
  top: 0.24rem;
  left: 0.24rem;
  display: grid;
  width: 1.95rem;
  height: 1.95rem;
  place-items: center;
  border-radius: 50%;
  background: #fcfbf7;
  color: #f4f1e6;
  box-shadow: 0 1px 4px rgba(20, 36, 30, 0.18);
  transform: translateX(2.5rem);
  transition: transform 260ms ease, border-radius 200ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.recipe-cooking-switch__thumb svg {
  width: 1.95rem;
  height: 1.95rem;
  opacity: 0;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transform: scale(0.25) rotate(12deg);
  transition: opacity 160ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), stroke-dashoffset 500ms ease-out;
}

.recipe-cooking-switch[aria-checked="true"] .recipe-cooking-switch__thumb {
  border-radius: 0;
  background: transparent;
  color: #7a6348;
  box-shadow: none;
  transform: translateX(0);
}

.recipe-cooking-switch[aria-checked="true"] .recipe-cooking-switch__thumb svg {
  opacity: 1;
  stroke-dashoffset: 0;
  transform: scale(1) rotate(0deg);
}

.recipe-cooking-control__status {
  flex-basis: 100%;
  max-width: 28rem;
  margin-top: 0.7rem;
  color: rgba(44, 44, 44, 0.62);
  font-size: 0.78rem;
  line-height: 1.5;
}

.recipe-cooking-control__status[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .recipe-cooking-switch__track,
  .recipe-cooking-switch__thumb,
  .recipe-cooking-switch__thumb svg {
    transition: none;
  }
}
