/* MCP Recipes — registry-page scoped */

.registry-page.recipes-page {
  --recipe-max: 920px;
}

.recipes-main {
  width: min(var(--recipe-max, 920px), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  flex: 1;
}

.recipes-hero {
  margin-bottom: 1.75rem;
}

.recipes-hero__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hp-muted2);
}

.recipes-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.recipes-hero__lead {
  margin: 0 0 1.25rem;
  color: var(--hp-muted);
  max-width: 40rem;
  line-height: 1.5;
}

.recipes-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.recipe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.recipe-btn--primary {
  background: var(--hp-accent);
  color: #fff;
}

.recipe-btn--primary:hover {
  background: var(--hp-accent-hover);
  color: #fff;
}

.recipe-btn--ghost {
  background: transparent;
  border-color: var(--hp-border2);
  color: var(--hp-text);
}

.recipe-btn--ghost:hover {
  border-color: var(--hp-accent);
  color: var(--hp-accent-fg);
}

.recipe-btn--small {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.recipes-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) auto;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
}

.recipes-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--hp-muted2);
  font-weight: 500;
}

.recipes-filters input,
.recipes-filters select,
.recipe-form input,
.recipe-form textarea,
.recipe-form select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--hp-border2);
  background: var(--hp-card);
  color: var(--hp-text);
}

.recipes-filters input:focus,
.recipes-filters select:focus,
.recipe-form input:focus,
.recipe-form textarea:focus,
.recipe-form select:focus {
  outline: 2px solid var(--hp-accent-tint);
  border-color: var(--hp-accent);
}

.recipes-status {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--hp-border);
  background: var(--hp-surface);
  color: var(--hp-muted);
  margin-bottom: 1.25rem;
}

.recipes-status--error {
  border-color: #c45c5c;
  color: #8b2e2e;
  background: #fdf2f2;
}

.registry-page.dark .recipes-status--error {
  color: #f5b5b5;
  background: #2a1515;
  border-color: #6b3030;
}

.recipes-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.recipe-row {
  display: block;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  background: var(--hp-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.recipe-row:hover {
  border-color: var(--hp-accent);
  transform: translateY(-1px);
}

.recipe-row__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.recipe-row__summary {
  margin: 0 0 0.75rem;
  color: var(--hp-muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.recipe-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.8rem;
  color: var(--hp-muted2);
}

.recipe-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  color: var(--hp-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.recipe-pill--accent {
  background: var(--hp-accent-tint);
  border-color: transparent;
  color: var(--hp-accent-fg);
}

.recipe-pill--verified {
  background: #e8f7ef;
  color: #17693d;
  border-color: transparent;
}

.registry-page.dark .recipe-pill--verified {
  background: #143024;
  color: #8fd9ad;
}

.recipe-detail__header {
  margin-bottom: 1.5rem;
}

.recipe-detail__header h1 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.recipe-detail__summary {
  margin: 0 0 1rem;
  color: var(--hp-muted);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 42rem;
}

.recipe-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.recipe-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--hp-muted2);
  margin-bottom: 1.25rem;
}

.recipe-detail__meta a {
  color: var(--hp-link);
}

.recipe-section {
  margin: 1.75rem 0;
}

.recipe-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.recipe-section p,
.recipe-md__p {
  color: var(--hp-muted);
  line-height: 1.55;
}

.recipe-servers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recipe-server-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--hp-border);
  background: var(--hp-surface);
  color: var(--hp-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.recipe-server-chip:hover {
  border-color: var(--hp-accent);
  color: var(--hp-accent-fg);
}

.recipe-block {
  margin: 0.85rem 0;
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--hp-card);
}

.recipe-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--hp-surface);
  border-bottom: 1px solid var(--hp-border);
  font-size: 0.8rem;
  color: var(--hp-muted2);
}

.recipe-block__body {
  padding: 0.85rem 1rem;
}

.recipe-block__body--code {
  padding: 0;
}

.recipe-block__body--code pre,
.recipe-code,
.recipe-md__pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: #12141a;
  color: #e8eaef;
  font-family: var(--hp-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

.recipe-md__code {
  font-family: var(--hp-mono);
  font-size: 0.88em;
  background: var(--hp-surface2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.recipe-md__ul,
.recipe-md__ol {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
  color: var(--hp-muted);
  line-height: 1.5;
}

.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  background: var(--hp-surface);
}

.recipe-note {
  font-size: 0.85rem;
  color: var(--hp-muted2);
  line-height: 1.45;
}

.recipe-banner {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.recipe-banner--preview {
  background: #fff7e6;
  border: 1px solid #f0d59a;
  color: #6a4b00;
}

.registry-page.dark .recipe-banner--preview {
  background: #2a2414;
  border-color: #5a4a20;
  color: #f0d59a;
}

.recipe-form fieldset {
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.2rem;
  margin: 0 0 1.1rem;
  background: var(--hp-card);
}

.recipe-form legend {
  padding: 0 0.35rem;
  font-weight: 600;
}

.recipe-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.recipe-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--hp-muted);
}

.recipe-form__field--wide {
  grid-column: 1 / -1;
}

.recipe-form__help {
  font-size: 0.8rem;
  color: var(--hp-muted2);
  margin: 0.25rem 0 0;
}

.recipe-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.recipe-form__feedback {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: none;
}

.recipe-form__feedback.is-error {
  display: block;
  background: #fdf2f2;
  border: 1px solid #e0a0a0;
  color: #8b2e2e;
}

.recipe-form__feedback.is-ok {
  display: block;
  background: #eefaf3;
  border: 1px solid #a8d9bb;
  color: #17693d;
}

.recipe-server-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  min-height: 1.5rem;
}

.recipe-server-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--hp-accent-tint);
  color: var(--hp-accent-fg);
  font-size: 0.8rem;
  font-weight: 500;
}

.recipe-server-pick button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.recipe-ac {
  position: relative;
}

.recipe-ac__list {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--hp-card);
  border: 1px solid var(--hp-border2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 220px;
  overflow: auto;
  display: none;
}

.recipe-ac__list.is-open {
  display: block;
}

.recipe-ac__list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  color: var(--hp-text);
}

.recipe-ac__list button:hover {
  background: var(--hp-surface);
}

.recipe-blocks-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recipe-block-editor {
  border: 1px solid var(--hp-border);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--hp-surface);
}

.recipe-block-editor__row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.recipe-clients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.recipe-clients label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--hp-muted);
}

.home-recipes {
  margin: 0 0 2rem;
}

.home-recipes__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-recipe-row {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hp-border);
  text-decoration: none;
  color: inherit;
}

.home-recipe-row:hover .home-recipe-row__title {
  color: var(--hp-accent-fg);
}

.home-recipe-row__title {
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.home-recipe-row__meta {
  font-size: 0.8rem;
  color: var(--hp-muted2);
}

.mcp-recipes-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hp-border);
}

.mcp-recipes-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

@media (max-width: 800px) {
  .recipes-filters {
    grid-template-columns: 1fr;
  }

  .recipe-form__grid {
    grid-template-columns: 1fr;
  }

  .recipe-block-editor__row {
    grid-template-columns: 1fr;
  }
}
