/* Root container */
.cw-recipe {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 2rem;
  background: #ffffff;
  border: 1px solid #e2e2e7;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
}

/* Header + meta */
.cw-recipe-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #efeff4;
  padding-bottom: 1rem;
}

.cw-recipe-header h1,
.cw-recipe-title {
  font-size: 1.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.cw-recipe-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Fix pills breaking onto two lines */
.cw-recipe-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #f5f5fa;
  border: 1px solid #e4e4ee;
  white-space: nowrap; /* <-- THIS stops wrapping */
  font-size: 0.95rem;
  line-height: 1;
}


.cw-recipe-meta-item strong {
  font-weight: 600;
}

.cw-keep-awake-btn {
  margin-bottom: 1.25rem;
}

.cw-recipe-meta-top {
  margin-bottom: 1.2rem;
}


/* Pill-style Keep Screen On button */
.cw-keep-awake-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #f9fafb;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  margin-bottom: 0.7rem;
}

.cw-keep-awake-btn:hover {
  background: #f3f4f6;
}

.cw-keep-awake-btn.active {
  background: #dff5d8;
  border-color: #81c784;
  color: #205c2f;
}

.cw-keep-awake-btn.active:hover {
  background: #cdeec6;
}


/* Meta tags (course / cuisine / difficulty) as chips */
.cw-recipe-meta-tags {
  gap: 0.25rem;
}

.cw-recipe-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #f0f7ff;
  border: 1px solid #d0e4ff;
  font-size: 0.8rem;
  color: #215181;
}

.cw-recipe-tag strong {
  font-weight: 600;
}

/* Summary blurb */
.cw-recipe-summary {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #ffb347;
  background: #fff9f1;
  border-radius: 8px;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Main layout: content + sidebar */
.cw-recipe-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* Main column */
.cw-recipe-main {
  flex: 1 1 58%;
  min-width: 0;
}

/* Sidebar */
.cw-recipe-sidebar {
  flex: 1 1 32%;
  min-width: 260px;
}

/* Sections */
.cw-recipe-section {
  margin-bottom: 2rem;
}

.cw-recipe-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid #f1f1f5;
  padding-bottom: 0.25rem;
}

/* Ingredients */
.cw-recipe-ingredients-group {
  margin-bottom: 1.25rem;
}

.cw-recipe-ingredients-group h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.cw-recipe-ingredients-group ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.cw-recipe-ingredients-group li {
  margin: 0.15rem 0;
}

/* Instructions */
.cw-recipe-instructions-group {
  margin-bottom: 1.5rem;
}

.cw-recipe-instructions-group h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.cw-recipe-instructions-group ol {
  margin: 0;
  padding-left: 1.2rem;
}

.cw-recipe-instructions-group li {
  margin: 0.35rem 0;
  line-height: 1.6;
}

/* Story / narrative section inside recipe page */
.cw-recipe-story {
  margin-top: 2rem;
}

.cw-recipe-story-content p {
  margin-bottom: 0.9rem;
  line-height: 1.7;
}

/* "Jump to Recipe" link */
.cw-jump-to-recipe {
  margin: 0.25rem 0 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.cw-jump-to-recipe a {
  text-decoration: none;
  color: #1e73be;
  border-bottom: 1px dashed rgba(30, 115, 190, 0.6);
}

.cw-jump-to-recipe a:hover {
  border-bottom-style: solid;
}

/* Sidebar panels */
.cw-recipe-panel {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #f9f9fc;
  border: 1px solid #e1e1f0;
  font-size: 0.9rem;
}

.cw-recipe-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

/* Cost panel emphasis */
.cw-recipe-cost-panel {
  background: #fdf6e7;
  border-color: #f0d9a2;
}

.cw-recipe-cost-value {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.cw-recipe-cost-description {
  margin: 0;
  line-height: 1.5;
}

/* Lists in sidebar */
.cw-recipe-panel ul {
  margin: 0;
  padding-left: 1rem;
}

.cw-recipe-panel li {
  margin: 0.2rem 0;
}

/* Nutrition list */
.cw-recipe-nutrition li strong {
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 800px) {
  .cw-recipe {
    padding: 1.5rem 1.25rem;
  }

  .cw-recipe-layout {
    flex-direction: column;
  }

  .cw-recipe-main,
  .cw-recipe-sidebar {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cw-recipe-meta-top {
    gap: 0.4rem;
  }
}

@media (max-width: 480px) {
  .cw-recipe-header h1,
  .cw-recipe-title {
    font-size: 1.5rem;
  }

  .cw-recipe-summary {
    padding: 0.8rem 1rem;
  }
}
/* --- TASTY-STYLE INGREDIENT CHECKLIST --- */

.cw-recipe-ingredients-group ul {
  list-style: none;         /* no bullets */
  margin: 0;
  padding-left: 0;
}

.cw-recipe-ingredients-group li {
  position: relative;
  padding-left: 2.1rem;     /* room for checkbox */
  margin-bottom: 0.4rem;
  line-height: 1.6;
  cursor: pointer;          /* feels tappable */
  transition: color 0.15s ease, opacity 0.15s ease;
}

/* Checkbox outline */
.cw-recipe-ingredients-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;       /* square-ish; use 50% for round */
  border: 2px solid #d0d5dd;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
}

/* Checked state */
.cw-recipe-ingredients-group li.cw-ing-checked {
  color: #8b8b98;
  opacity: 0.8;
  text-decoration: line-through;
}

.cw-recipe-ingredients-group li.cw-ing-checked::before {
  background: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.35);
  content: "✓";
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover hint on desktop */
@media (hover: hover) {
  .cw-recipe-ingredients-group li:hover::before {
    border-color: #9ca3af;
  }
}

