/* ─── recipes module styles (v10.22) ──────────────────────────────
   Panel chrome (overlay, header, close) comes from module-lib.css.
   This file styles only what's INSIDE the panel body. */

.recipes-panel .ml-panel-inner { max-width: 800px; }
.recipes-panel .ml-panel-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: block;
}

/* list view */
.recipes-toolbar {
  display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
}
#recipes-search {
  flex: 1;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 6px 10px;
  font-family: var(--mono, monospace);
  font-size: 0.9em;
}
#recipes-search:focus { outline: none; border-color: var(--accent); }

.recipes-cat-chips {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px;
}
.recipes-cat-chip {
  padding: 4px 10px;
  font-size: 0.82em;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--accent2);
  color: var(--dim);
  border-radius: 999px;
  background: transparent;
}
.recipes-cat-chip:hover { color: var(--fg); border-color: var(--accent); }
.recipes-cat-chip.active {
  color: var(--accent); border-color: var(--accent);
  background: rgba(176,230,176,0.08);
  font-weight: bold;
}
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.recipe-card {
  border: 1px solid var(--accent2);
  background: rgba(176,230,176,0.03);
  text-decoration: none;
  color: var(--fg);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.recipe-card:hover { border-color: var(--accent); }
.recipe-card-img {
  height: 110px;
  background-size: cover;
  background-position: center;
  background-color: rgba(176,230,176,0.05);
}
.recipe-card-img.empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 2em;
}
.recipe-card-body { padding: 8px 10px; }
.recipe-card-name { font-weight: bold; font-size: 0.95em; line-height: 1.2; margin-bottom: 3px; }
.recipe-card-meta { font-size: 0.78em; }

/* view mode */
.recipes-back-link {
  display: inline-block; color: var(--dim); cursor: pointer;
  font-size: 0.88em; text-decoration: none;
  margin-bottom: 10px;
}
.recipes-back-link:hover { color: var(--accent); }
.recipe-view-img {
  width: 100%; max-height: 280px; object-fit: cover;
  border-radius: 2px; margin-bottom: 10px;
}
.recipe-view-name { color: var(--accent); margin: 6px 0; font-size: 1.4em; }
.recipe-view-meta { font-size: 0.88em; margin-bottom: 10px; }
.recipe-view-desc { font-style: italic; margin: 8px 0 14px; }
.recipe-section-h {
  color: var(--accent); font-size: 0.95em;
  margin: 14px 0 6px; letter-spacing: 0.5px;
}
.recipe-ingredients { list-style: none; padding-left: 0; margin: 0; }
.recipe-ingredients li {
  padding: 3px 0; border-bottom: 1px dashed rgba(176,230,176,0.1);
  display: flex; gap: 8px;
}
.ing-amount { color: var(--brass, #ffd070); min-width: 6em; }
.ing-name { flex: 1; }
.recipe-instructions { padding-left: 22px; margin: 6px 0; }
.recipe-instructions li { padding: 4px 0; line-height: 1.5; }
.recipe-notes {
  background: rgba(176,230,176,0.04);
  border-left: 2px solid var(--accent2);
  padding: 8px 10px;
  margin: 6px 0;
  font-style: italic;
}
.recipe-view-actions {
  margin-top: 16px;
  display: flex; gap: 8px;
}

/* edit mode */
.recipe-edit h3 { color: var(--accent); margin: 4px 0 10px; }
.recipe-edit .field { margin-bottom: 10px; }
.recipe-edit label {
  display: block; color: var(--dim);
  font-size: 0.82em; margin-bottom: 3px;
  letter-spacing: 0.5px;
}
.recipe-edit input[type="text"],
.recipe-edit textarea,
.recipe-edit select {
  width: 100%; box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 5px 8px;
  font-family: var(--mono, monospace);
  font-size: 0.9em;
  resize: vertical;
}
.recipe-edit textarea { line-height: 1.4; }
.recipe-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.recipe-ing-row,
.recipe-step-row {
  display: grid;
  grid-template-columns: 100px 1fr 28px;
  gap: 6px; margin-bottom: 4px;
  align-items: start;
}
.recipe-step-row { grid-template-columns: 1fr 28px; }
.rec-row-del {
  cursor: pointer; color: var(--dim);
  text-align: center; padding: 5px 0;
  border: 1px solid transparent; border-radius: 2px;
}
.rec-row-del:hover { color: #e07a7a; border-color: rgba(224,122,122,0.4); }
.recipe-edit-img {
  max-width: 200px; max-height: 150px;
  margin-bottom: 6px;
  border: 1px solid var(--accent2);
}
.recipe-edit-actions { margin-top: 14px; }

/* shared button styles for recipes panel */
.recipes-panel .ml-panel-body .btn {
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 6px 14px;
  font-family: var(--mono, monospace);
  font-size: 0.88em;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
}
.recipes-panel .ml-panel-body .btn:hover {
  background: rgba(176,230,176,0.1);
  border-color: var(--accent);
}
.recipes-panel .ml-panel-body .btn.primary {
  color: var(--accent);
  border-color: var(--accent);
}
.recipes-panel .ml-panel-body .btn.primary:hover { background: rgba(176,230,176,0.15); }
.recipes-panel .ml-panel-body .btn.small {
  padding: 4px 10px;
  font-size: 0.82em;
}
