/* Interaktive Rezept-Anzeige: Portionen-Regler + Timer.
   Einbinden mit: <link rel="stylesheet" href="assets/recipe-interactive.css"> */

.ri-servings {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
}

.ri-servings button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #2f6f8f;
  background: #fff;
  color: #2f6f8f;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.ri-servings button:hover {
  background: #2f6f8f;
  color: #fff;
}

.ri-servings button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #fff;
  color: #2f6f8f;
}

.ri-servings-count {
  min-width: 6.5rem;
  text-align: center;
  font-weight: bold;
}

.ri-wakelock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #2f6f8f;
  background: #fff;
  color: #2f6f8f;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0 0 1.2rem;
}

.ri-wakelock-toggle--active {
  background: #2f6f8f;
  color: #fff;
}

.ri-ingredients {
  list-style: none;
  padding-left: 0;
}

.ri-ingredients li {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #e3dcd0;
}

.ri-amount {
  min-width: 4.5rem;
  color: #2f6f8f;
  font-weight: bold;
  text-align: right;
}

.ri-steps {
  padding-left: 0;
  list-style: none;
  counter-reset: ri-step;
}

.ri-steps > li {
  counter-increment: ri-step;
  position: relative;
  padding: 0.6rem 0 0.6rem 2.4rem;
  border-bottom: 1px solid #eee;
}

.ri-steps > li::before {
  content: counter(ri-step);
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #2f6f8f;
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ri-step-title {
  font-weight: bold;
  display: block;
  margin-bottom: 0.2rem;
}

.ri-step-amount {
  color: #2f6f8f;
  font-weight: bold;
}

.ri-timer {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.ri-timer button {
  border: 1px solid #2f6f8f;
  background: #fff;
  color: #2f6f8f;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.ri-timer button:hover {
  background: #2f6f8f;
  color: #fff;
}

.ri-timer-display {
  font-variant-numeric: tabular-nums;
  font-weight: bold;
  min-width: 3.2rem;
}

.ri-timer.ri-timer--running .ri-timer-display {
  color: #2f6f8f;
}

.ri-timer.ri-timer--done .ri-timer-display {
  color: #3a8a3a;
}

.ri-timer.ri-timer--done {
  background: #eaf5ea;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}
