/* ==========================================================================
   custom.css — Project custom styles
   Purpose: site-specific overrides and component styles for the app.
   ========================================================================== */

/* ==========================================================================
   ===== Root Variables (MODIFIED) =====
   ========================================================================== */
:root {
  --page-hpad: 18px;
  --page-vpad: 18px;

  --color-darkgreen: #1F5749;
  --color-darkgreen-hover: #153f36;
  --color-lightgreen: #EBF4EC;
  --color-white: #FFFFFF;
}

/* ==========================================================================
   ===== Buttons Unified Styles (MODIFIED) =====
   ========================================================================== */

/* Base Styles: Dark Green Background, White Text (BIGGER & ROUNDER) */
.btn.btn-primary,
.btn-start-calendar,
.btn-create-mealplan,
.btn-create-generate,
.hero-cta,
.profile-follow-form .btn-primary,
.recipe-form .btn-primary,
#add-ingredient,
#add-step {
  background-color: var(--color-darkgreen) !important;
  border-color: var(--color-darkgreen) !important;
  color: var(--color-white) !important;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 10px 22px !important;
  border-radius: 25px !important;
  font-size: 1.05rem;
}

/* Hover/Focus/Active Styles: Darker Green Background + Lift Effect */
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
.btn.btn-primary.active,
.btn-start-calendar:hover,
.btn-create-mealplan:hover,
.btn-create-generate:hover,
.hero-cta:hover,
.profile-follow-form .btn-primary:hover,
.recipe-form .btn-primary:hover,
#add-ingredient:hover,
#add-step:hover {
  background-color: var(--color-darkgreen-hover) !important;
  border-color: var(--color-darkgreen-hover) !important;
  color: var(--color-white) !important;
  box-shadow: 0 6px 16px rgba(31, 87, 73, 0.35);
  transform: translateY(-2px);
}

/* Outline/Secondary Buttons: Dark Green Text/Border */
.profile-actions .btn-outline-primary,
.profile-section .btn-outline-secondary,
.profile-section .btn-outline-success {
    color: var(--color-darkgreen) !important;
    border-color: var(--color-darkgreen) !important;
    background-color: transparent !important;
}

/* Outline Button Hover: Dark Green Fill (Standard) */
.profile-actions .btn-outline-primary:hover,
.profile-section .btn-outline-secondary:hover,
.profile-section .btn-outline-success:hover {
    background-color: var(--color-darkgreen) !important;
    color: var(--color-white) !important;
    border-color: var(--color-darkgreen) !important;
}

/* Specific size adjustment for small buttons that should not be massive */
.delete-ingredient,
.delete-step {
  border-radius: 50px !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ==========================================================================
   ===== Navbar =====
   ========================================================================== */
.site-navbar {
  background-color: var(--color-white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* ==========================================================================
   ===== Alerts =====
   ========================================================================== */
.alert {
  border-radius: 0;
}

/* ==========================================================================
   ===== Cover page =====
   ========================================================================== */
.content {
  padding-top: 10px;
  padding-left: var(--page-hpad);
  padding-right: var(--page-hpad);
}

.h-100 {
  min-height: 100vh;
}

.vcenter-item{
    display: flex;
    align-items: center;
}

/* ==========================================================================
   ===== Cover page (headings & text) =====
   ========================================================================== */
h1.cover-heading {
  font-size: 4rem;
}

p.cover-text {
  font-size: 1.7rem;
}

.cover-card {
  background-color: rgba(245, 245, 245, 0.6);
  max-width: 30rem;
  padding-top: 30px;
  padding-left: 50px;
  padding-right: 50px;
  padding-bottom: 30px;
  border-radius: 15%;
}
.cover-card-block {
  opacity: 1
}

/* ==========================================================================
   ===== Forms =====
   ========================================================================== */
.nolabel label {
  display: none;
}

ul.errorlist {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* ==========================================================================
   ===== Typefaces =====
   ========================================================================== */
.low-key {
  color: #777777;
  font-weight: 300;
}

.list-title {
  margin-top: 10px;
  margin-bottom: 20px;
}

/* ==========================================================================
   ===== Profile (generic) =====
   ========================================================================== */
.profile-image {
  width: 120px;
  clear:both;
  float:left;
}

.profile-text {
  overflow:hidden;
  padding-left:20px
}

h3.profile-title {
  margin-bottom: 0;
}

.profile-username {
  color: #777777;
  font-weight: 300;
  font-style: italic;
}

/* ==========================================================================
   ===== Hyperlinks =====
   ========================================================================== */
.content a {
  text-decoration: none;
  color: #0d6efd;
}
.content a:hover {
  text-decoration: underline;
  color: #0d6efd;
}

/* Popular recipes section */
.popular {
  margin-bottom: 40px;
}

.popular h3 {
  margin-bottom: 16px;
  color: #212121;
}

.popular-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: 140px;
  gap: 16px;
}

/* ==========================================================================
   ===== Recommended recipes =====
   ========================================================================== */
/* Consistent sizing with larger first item */
.recommend-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.recommended-feature {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  background: #000;
}

.recommended-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

.recommended-feature .meta {
  position: relative;
  z-index: 2;
  padding: 18px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 100%);
}

.recommended-feature .badge {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.85);
  color: #1b5e20;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.recommended-feature .subline,
.recommended-grid .subline {
  color: #f0f4c3;
  font-size: 13px;
  margin-top: 4px;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.recommended-grid .popular-item {
  aspect-ratio: 16 / 10;
  height: auto;
}

.recommended-grid .popular-item img {
  filter: brightness(0.8);
}

.popular-item {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  position: relative;
  border: 1px solid #BDBDBD;
}

.popular-item img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}

.popular-item .meta {
  position: relative;
  z-index: 2;
  padding: 12px;
  color: var(--color-white);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 100%);
  width: 100%;
}

.popular-item .rank {
  display: inline-block;
  background: var(--color-darkgreen);
  color: var(--color-white);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-right: 8px;
}

.popular-grid .popular-item:first-child {
  grid-row: span 2;
}

/* Ensure popular sections and other full-width rows honor the same padding
   and override inline styles used in some templates */
.row.popular,
.popular {
  padding-left: var(--page-hpad) !important;
  padding-right: var(--page-hpad) !important;
  box-sizing: border-box;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.popular-grid {
  padding-left: var(--page-hpad) !important;
  padding-right: var(--page-hpad) !important;
  box-sizing: border-box;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .dashboard-hero-calendar { height: 220px; }
  .popular-grid { grid-template-columns: 1fr; grid-auto-rows: 160px; }
  .popular-grid .popular-item:first-child { grid-row: auto; }
  .recommended-grid { grid-template-columns: 1fr; }
  .recommended-grid .popular-item:first-child { grid-column: span 1; }
}

/* ==========================================================================
   ===== Hero Section Styles =====
   ========================================================================== */
.home-hero {
    padding: 32px var(--page-hpad);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: clamp(480px, 85vh, 720px);
}

.hero-media {
    position: relative;
    width: min(1100px, 100%);
    height: clamp(360px, 70vh, 600px);
    border-radius: 36px;
    overflow: hidden;
    background: #fdf6ee;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.hero-visual {
    position: absolute;
    inset: 0;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    padding: clamp(32px, 7vw, 80px);
    max-width: 520px;
    color: #2f261b;
}

.hero-overlay::after {
    inset: 0 45% 0 0;
    border-radius: 36px;
}


.hero-eyebrow {
    font-size: 1.1rem;
    letter-spacing: 0.45em;
    margin-bottom: 14px;
}

.hero-copy h1,
.hero-overlay h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.hero-description {
    font-size: 1.1rem;
}

.hero-cta-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 32px;
}

.hero-secondary-link {
    font-weight: 600;
    color: #4d453b;
}

@media (max-width: 768px) {
    .hero-media {
        border-radius: 28px;
        min-height: 320px;
        height: auto;
    }

    .home-hero {
        padding-top: 24px;
        padding-bottom: 24px;
        min-height: auto;
    }

    .hero-cta-group {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   ===== Recipe page form =====
   ========================================================================== */
.step-form textarea.form-control {
    height: 50px;
}

.ingredient-form input,
.ingredient-form select {
    height: 38px !important;
}
.ingredient-form .row{
  display: flex;
  align-items: center;
}
.delete-ingredient {
  height: 38px; 
  display: flex;
  justify-content: center;
  align-items: center;
}

.card input.form-control,
.card select.form-control {
    height: 38px !important;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#step-forms textarea {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
}

#ingredient-forms textarea {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
}

/* Recipe detail specific styles (moved from inline in template) */
.recipe-container {
  max-width: 1100px;
  padding-left: var(--page-hpad) !important;
  padding-right: var(--page-hpad) !important;
  box-sizing: border-box;
}

.recipe-cover-img {
  max-height: 260px;
  width: 100%;
  object-fit: cover;
}

.servings-input {
  width: 110px;
}

.report-summary {
  cursor: pointer;
}

/* Ensure the details expanded content and nearby card do not clip native dropdowns/selects on recipe pages */
.recipe-container details {
  overflow: visible;
}
.recipe-container .card {
  overflow: visible;
}

/* Make the select inside the report form render above other layers and be interactive */
.report-form select {
  position: relative;
  z-index: 2147483647;
  pointer-events: auto;
  background: var(--color-white);
}

.report-form select option {
  color: #000;
  background: var(--color-white);
}

/* ==========================================================================
   ===== Dashboard Hero (moved) =====
   ========================================================================== */
/* Renamed to avoid conflicts with existing .dashboard-hero/.hero-content/.btn-start
   - .dashboard-hero -> .dashboard-hero-calendar
   - .hero-content -> .dashboard-hero-inner
   - .btn-start -> .btn-start-calendar */
.dashboard-hero-calendar {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.calendar-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 120px repeat(5, 1fr);
    grid-template-rows: 60px repeat(3, 1fr);
    background: var(--color-white);
}

.calendar-cell {
    border: 1px solid #d0d0d0;
    padding: 10px;
    font-size: 14px;
    color: #333;
}

.calendar-cell.header {
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.calendar-cell.label {
    font-weight: 600;
    display: flex;
    align-items: center;
    padding-left: 15px;
    background: #fafafa;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    background: rgba(255, 255, 255, 0.4);
}

.dashboard-hero-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
    max-width: 500px;
}

.dashboard-hero-inner h2 {
    font-size: 32px;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 700;
}

.dashboard-hero-inner p {
    font-size: 16px;
    color: #4a4a4a;
    margin-bottom: 24px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .dashboard-hero-calendar {
        height: 350px;
    }
    .calendar-background {
        grid-template-columns: 80px repeat(5, 1fr);
        grid-template-rows: 45px repeat(4, 1fr);
    }
    .calendar-cell {
        font-size: 11px;
        padding: 5px;
    }
    .calendar-cell.header {
        font-size: 12px;
    }
    .dashboard-hero-inner h2 {
        font-size: 24px;
    }
    .dashboard-hero-inner p {
        font-size: 14px;
    }
    .btn-start-calendar {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ==========================================================================
   ===== Profile Page =====
   ========================================================================== */

.profile-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.profile-page h2 {
  color: var(--color-darkgreen);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Profile Actions (Edit/Messages buttons) */
.profile-actions {
  margin-bottom: 2rem;
  gap: 0.75rem;
}

/* profile-actions .btn-outline-primary styles are unified at the top */

.profile-actions .btn-outline-secondary {
  color: var(--color-darkgreen);
  border-color: rgba(31, 87, 73, 0.3);
  transition: all 0.3s ease;
}

/* Profile Actions Secondary Hover (Light Green Background - kept unique) */
.profile-actions .btn-outline-secondary:hover {
  background-color: var(--color-lightgreen) !important;
  color: var(--color-darkgreen) !important;
  border-color: var(--color-darkgreen) !important;
}

/* Avatar styling */
.profile-avatar {
  width: 140px;
  height: 140px;
  border: 5px solid var(--color-white);
  background: var(--color-lightgreen);
  box-shadow: 0 8px 24px rgba(31, 87, 73, 0.15);
  object-fit: cover;
}

/* Stats card container */
.profile-stats-card {
  background: linear-gradient(135deg, var(--color-lightgreen) 0%, rgba(235, 244, 236, 0.5) 100%);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(31, 87, 73, 0.1);
}

.profile-stats-card .card-body {
  padding: 1.2rem 1rem;
}

/* Stats display */
.profile-stats {
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.profile-stat-link {
  color: var(--color-darkgreen);
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.profile-stat-link:hover {
  background: rgba(31, 87, 73, 0.08);
  color: var(--color-darkgreen);
}

.profile-stat-link .h4 {
  color: var(--color-darkgreen);
  font-weight: 700;
  font-size: 1.8rem;
}

.profile-stat-link .text-muted {
  color: rgba(31, 87, 73, 0.7) !important;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* Recipe section cards */
.profile-section {
  border-radius: 16px;
  border: 1px solid rgba(31, 87, 73, 0.08);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.profile-section:hover {
  box-shadow: 0 12px 32px rgba(31, 87, 73, 0.12);
}

/* Card header styling */
.profile-card-header {
  background: linear-gradient(135deg, var(--color-lightgreen) 0%, rgba(235, 244, 236, 0.6) 100%);
  color: var(--color-darkgreen);
  border-bottom: 2px solid rgba(31, 87, 73, 0.12);
  font-weight: 700;
  padding: 1rem;
  font-size: 1.1rem;
}

/* Recipe list items */
.profile-section .list-group-item {
  border: none;
  border-bottom: 1px solid rgba(31, 87, 73, 0.06);
  padding: 1rem;
  transition: all 0.3s ease;
  background: var(--color-white);
}

.profile-section .list-group-item:last-child {
  border-bottom: none;
}

.profile-section .list-group-item:hover {
  background: rgba(31, 87, 73, 0.04);
  transform: translateX(4px);
}

.profile-section .list-group-item .fw-semibold {
  color: var(--color-darkgreen);
  font-size: 1.05rem;
}

.profile-section .list-group-item .text-muted {
  color: rgba(31, 87, 73, 0.6) !important;
}

/* Badge styling */
.profile-section .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.7rem;
  font-weight: 600;
}

.profile-section .badge.bg-success {
  background-color: var(--color-darkgreen) !important;
  color: var(--color-white) !important;
}

.profile-section .badge.bg-secondary {
  background-color: rgba(31, 87, 73, 0.12) !important;
  color: var(--color-darkgreen) !important;
}

/* Empty state text */
.profile-section .card-body {
  padding: 1.5rem;
}

.profile-section .card-body p {
  color: rgba(31, 87, 73, 0.6);
  font-style: italic;
}

/* Buttons in recipe list - styles are unified at the top */

/* Report button */
.profile-report {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.profile-report .btn-outline-danger {
  color: #c82333;
  border-color: rgba(200, 35, 51, 0.3);
  transition: all 0.3s ease;
}

.profile-report .btn-outline-danger:hover {
  background-color: #c82333;
  color: var(--color-white);
  border-color: #c82333;
}

/* Follow form button - styles are unified at the top */

.profile-follow-form .btn-outline-secondary {
  color: var(--color-darkgreen);
  border-color: rgba(31, 87, 73, 0.3);
  transition: all 0.3s ease;
}

/* Profile Follow Secondary Hover (Light Green Background - kept unique) */
.profile-follow-form .btn-outline-secondary:hover {
  background-color: var(--color-lightgreen);
  color: var(--color-darkgreen);
  border-color: var(--color-darkgreen);
}

/* Modal styling */
.modal-content {
  border: 1px solid rgba(31, 87, 73, 0.1);
  border-radius: 12px;
}

.modal-header {
  background: linear-gradient(135deg, var(--color-lightgreen) 0%, rgba(235, 244, 236, 0.5) 100%);
  border-bottom: 1px solid rgba(31, 87, 73, 0.1);
}

.modal-title {
  color: var(--color-darkgreen);
  font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .profile-page {
    padding: 1.5rem 1rem;
  }

  .profile-avatar {
    width: 110px;
    height: 110px;
    border-width: 4px;
  }

  .profile-page h2 {
    font-size: 1.3rem;
  }

  .profile-stats {
    gap: 1.5rem;
  }

  .profile-stat-link .h4 {
    font-size: 1.5rem;
  }

  .profile-actions {
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
  }

  .profile-section .list-group-item {
    padding: 0.75rem;
  }

  .profile-section .fw-semibold {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .profile-stats {
    gap: 1rem;
  }

  .profile-stat-link .h4 {
    font-size: 1.3rem;
  }

  .profile-stat-link .text-muted {
    font-size: 0.8rem;
  }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-actions .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }
}

/* ==========================================================================
   ===== Meal Plan Hero =====
   ========================================================================== */
/* Weekly Meal Plan Table Styles */

/* --- Section Title --- */
.mealplan-section-title {
    text-align: center;
    font-weight: 700;
    color: var(--color-darkgreen);
    margin-bottom: 1.5rem !important;
}


/* --- Table Container & Reset --- */
.mealplan-calendar-table.table {
    border-collapse: separate;
    border-spacing: 12px;
    background-color: transparent;
    border: none;
    margin-bottom: 0;
}

.mealplan-calendar-table.table th,
.mealplan-calendar-table.table td {
    border: none;
    vertical-align: top;
}


/* --- Headers (Top Row - Days) --- */
th.mealplan-day-header {
    background-color: var(--color-lightgreen);
    color: var(--color-darkgreen);
    text-align: center;
    font-weight: 600;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
}



/* --- Meal Labels (Left Column) --- */
td.meal-label {
    vertical-align: middle !important;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 5px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background-color: var(--color-lightgreen);
    color: var(--color-darkgreen);
    border-radius: 8px;
}


/* --- The Meal Cell Container --- */
td.meal-cell {
    padding: 0;
    height: 220px;
    background-clip: padding-box;
}


/* --- The Recipe Card (The actual visual box) --- */
.meal-recipe-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.meal-recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: #b0bec5;
}

/* --- Card Content --- */
.meal-recipe-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.meal-recipe-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
}


/* --- Create Button Styles - styles are unified at the top --- */

/* --- Responsive tweaks --- */
@media (max-width: 991px) {
    .mealplan-calendar-table.table {
        border-spacing: 6px;
    }
    th.mealplan-day-header, td.meal-label {
        padding: 10px 5px;
        font-size: 0.9rem;
    }
    td.meal-cell {
        height: 180px;
    }
    .meal-recipe-img {
        height: 90px;
    }
    .meal-recipe-title {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   ===== Create Meal Plan =====
   ========================================================================== */

.create-mealplan-card {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    background: var(--color-white);
    border-radius: 24px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.create-mealplan-card h2,
.benefits-title {
    font-size: 2.2rem; 
    color: var(--color-darkgreen) !important;
    font-weight: 700;
}

.create-mealplan-card .form-label,
.benefits-list strong {
    color: var(--color-darkgreen) !important;
    font-size: 1.4rem;
    font-weight: 600;
}

.create-mealplan-card p,
.create-mealplan-card .form-text,
.create-mealplan-card .fw-semibold {
    color: var(--color-darkgreen) !important;
    font-size: 1.0rem; 
}

.benefits-list .text-muted {
    color: rgba(31, 87, 73, 0.8) !important;
    font-size: 1.0rem; 
    line-height: 1.6;
}


.benefits-card {
    background-color: var(--color-lightgreen);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.benefits-icon {
    color: var(--color-darkgreen);
    font-size: 2.2rem;
    margin-top: 4px;
}

.benefits-list strong {
    display: block;
    margin-bottom: 6px;
}

@media (max-width: 991px) {
    .benefits-card {
        margin-top: 3rem;
    }
    .create-mealplan-card {
        max-width: 600px;
    }
}

/* ==========================================================================
   ===== Create & Edit Recipe Page =====
   ========================================================================== */

.recipe-form {
  max-width: 900px;
  margin: 0 auto;
}

.recipe-form h2 {
  color: var(--color-darkgreen);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.recipe-form p.text-muted {
  color: #777777;
  font-weight: 300;
}

.recipe-form h4 {
  color: var(--color-darkgreen);
  font-weight: 600;
  border-bottom: 2px solid var(--color-lightgreen);
  padding-bottom: 6px;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}

.recipe-form .card {
  border: 1px solid rgba(31, 87, 73, 0.15);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  background-color: var(--color-white);
}

.recipe-form .form-label {
  color: var(--color-darkgreen);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.recipe-form input:not([type="file"], [type="hidden"]),
.recipe-form select,
.recipe-form textarea {
  width: 100%;
  border: 1px solid rgba(31, 87, 73, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1rem;
  color: var(--color-darkgreen);
  background-color: #fcfcfc;
  box-sizing: border-box;
}

.recipe-form input:focus,
.recipe-form select:focus,
.recipe-form textarea:focus {
  border-color: var(--color-darkgreen);
  box-shadow: 0 0 0 3px rgba(31, 87, 73, 0.2);
  outline: none;
  background-color: var(--color-white);
}

.recipe-form textarea {
  min-height: 120px;
  resize: vertical;
}

.ingredient-form,
.step-form {
  background-color: var(--color-lightgreen);
  border: 1px solid rgba(31, 87, 73, 0.1);
  border-left: 5px solid var(--color-darkgreen);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 1rem;
}

.ingredient-form .row {
  display: flex;
  align-items: flex-end;
}

.ingredient-form input,
.ingredient-form select {
  height: 38px;
}

#step-forms textarea {
  min-height: 90px;
  max-height: 90px;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.step-header .step-label {
  color: var(--color-darkgreen);
  font-weight: 700;
  font-size: 1.1rem;
}

.delete-ingredient,
.delete-step {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  background-color: #c82333;
  border: 1px solid #bd2130;
  border-radius: 6px;
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.delete-ingredient:hover,
.delete-step:hover {
  background-color: #b21f2d;
  border-color: #a71d2a;
}

.step-header .delete-step {
  flex-shrink: 0;
}

/* add-ingredient/add-step styles are unified at the top */

/* recipe-form .btn-primary styles are unified at the top */

.recipe-form .btn-secondary {
  font-weight: 600;
}

#edit-preview-image {
  border-radius: 8px;
  border: 1px solid rgba(31, 87, 73, 0.2);
  margin-top: 10px;
}

@media (max-width: 768px) {
  .ingredient-form .row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .delete-ingredient {
    width: 100%;
    height: 36px;
  }

  .step-header {
    gap: 0.5rem;
  }
}