@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

body {
  margin: 0;
  font-family: 'Barlow', sans-serif;
  color: #223018;
  background:
    radial-gradient(circle at top right, rgba(207, 233, 190, 0.5), rgba(245, 246, 233, 0) 40%),
    radial-gradient(circle at bottom left, rgba(227, 240, 214, 0.6), rgba(245, 246, 233, 0) 35%),
    #f5f6e9;
}

.recipe-page {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px 28px;
}

.recipe-card {
  background: #f9faef;
  border: 1px solid #d9dfbf;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(64, 84, 36, 0.18);
}

.recipe-hero-banner {
  height: 240px;
  background-color: #d6ddc1;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #d9dfbf;
}

.recipe-hero-content {
  padding: 24px;
}

.recipe-full-image-card {
  padding: 12px;
  text-align: center;
}

.recipe-full-img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: 'Fraunces', serif;
  margin: 0;
  color: #1f3512;
}

h1 {
  font-size: 2.05rem;
  line-height: 1.1;
  margin-bottom: 14px;
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

p {
  margin: 0;
  line-height: 1.6;
}

.recipe-headline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recipe-headline-row h1 {
  flex: 1;
  min-width: 0;
}

.recipe-headline-row input {
  width: 100%;
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
}

.recipe-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.recipe-search-icon {
  font-size: 1.3rem;
  color: #8aaa4a;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s;
}

.recipe-search-icon:hover {
  background: #e8f0d4;
}

.recipe-search-box {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 270px;
  background: #fff;
  border: 1px solid #d0d9b4;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(60,80,30,0.13);
  padding: 8px;
  z-index: 200;
}

.recipe-search-input {
  width: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  border-radius: 8px;
}

.meta-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef3dd;
  border: 1px solid #d8e0bf;
  border-radius: 12px;
  padding: 9px 12px;
}

.meta-pill a {
  color: #2f5f1d;
  text-decoration: underline;
}

.meta-pill .glyphicon {
  color: #678a35;
  font-size: 14px;
}

.meta-edit-row {
  display: grid;
  gap: 8px;
  width: 100%;
}

.description-box {
  border-top: 1px solid #d7dfbf;
  margin-top: 16px;
  padding-top: 16px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px 24px;
  border-top: 1px solid #dde4ca;
}

.recipe-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
  padding: 0 24px 24px;
}

.recipe-column-left {
  align-self: start;
}

.section-card {
  background: #ffffff;
  border: 1px solid #e0e5ca;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.ingredient-card {
  background: #f2f4e7;
  position: sticky;
  top: 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.portion-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 4px 0 4px;
}

.portion-btn-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #a8afe7;
  background: #aeb5f6;
  color: #2a3165;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  margin: 0;
  font-weight: 700;
  box-shadow: none;
}

.portion-display-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 34px;
  border-radius: 10px;
  background: #f2f0e7;
  border: 1px solid #e2dfd2;
}

.portion-display-number {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  color: #1f2f10;
}

.portion-display-text {
  font-size: 0.8rem;
  color: #1f2f10;
  text-align: center;
  margin-bottom: 10px;
}

.ingredient-card .section-title-row {
  justify-content: center;
}

.portion-badge {
  background: #dce8be;
  color: #2d541b;
  border: 1px solid #b7ca84;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.ingredient-table,
.substitutions-table {
  width: 100%;
  border-collapse: collapse;
}

.ingredient-table td,
.substitutions-table td {
  border-bottom: 1px solid #dde4ca;
  padding: 8px 6px;
  vertical-align: top;
}

.ingredient-table tr:last-child td,
.substitutions-table tr:last-child td {
  border-bottom: 0;
}

.ingredient-amount {
  width: 34%;
  color: #3b5c26;
  font-weight: 600;
}

.ingredient-name {
  width: 56%;
}

.ingredient-remove,
.sub-remove {
  width: 10%;
  text-align: right;
}

.instructions-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.instructions-list li {
  counter-increment: step;
  position: relative;
  margin: 0 0 12px;
  padding: 0 0 12px 42px;
  border-bottom: 1px solid #e4ead2;
  line-height: 1.5;
}

.instructions-list li:before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dfeabf;
  color: #2e591a;
  font-weight: 700;
  text-align: center;
  line-height: 28px;
}

.tips-card {
  background: #edf6d8;
  border-color: #cadfa2;
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tips-list li {
  margin-bottom: 10px;
}

.sub-key {
  width: 32%;
  font-weight: 600;
}

.sub-value {
  width: 58%;
}

.smalltext {
  font-size: 0.8rem;
  color: #5e6f47;
  font-style: italic;
}

.glyphicon {
  cursor: pointer;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd8ab;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  color: #223018;
}

textarea {
  resize: vertical;
  min-height: 48px;
}

button {
  border: 1px solid #6a8f39;
  background: linear-gradient(#82ac49, #6f943e);
  color: #f8ffe9;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 600;
  margin-right: 8px;
}

@media screen and (max-width: 900px) {
  .recipe-layout {
    grid-template-columns: 1fr;
  }

  .ingredient-card {
    position: static;
  }

  .recipe-hero-banner {
    height: 180px;
  }
}

