/* ----------------------------------
   Global Styles
---------------------------------- */

/* Reset & Typography */
body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  background-color: #fff8f9;
  color: #333;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', serif;
  margin-bottom: 0;
}

p {
  margin: 0.5rem 0;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem 50px;
}

/* Utility */
.text-center {
  text-align: center;
}

.text-muted {
  color: #999;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
}

/* Buttons */
.btn {
  background-color: #e26d8f;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn:hover {
  background-color: #cc5a7d;
}

.btn-outline-secondary {
    width: fit-content;
}

.btn-add-edit{
  display:inline-flex; align-items:center; gap:8px;
  border:1px dashed #e26d8f;
  color:#c44e68;
  background:#fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight:600;
  cursor:pointer;
  margin-top: 12px;
}
.btn-add-edit:hover{ background:#fff0f4; }


.search {
  margin-top: 0;
}

.shopping-btn-wrapper {
  margin-top: 1rem;
}

.shopping-btn-wrapper.center {
  display: flex;
  justify-content: center;
}

.userFormPage .btn,
.cakeFormPage .btn {
    width: 200px;
}

.login-btn {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

/* Forms & Inputs */
.alert {
    justify-self: center;
}

.form-control {
  border-radius: 30px;
  color: #585C5F;
  padding: .5rem 1rem;
}

.form-label{
    margin-bottom: 0rem;
}

input[type="checkbox"] {
  accent-color: #e26d8f;
  transform: scale(1.5);
  margin: .25rem;
}

.shopping-list {
  list-style: none;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.ingredient-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* select drop down styled with custom arrow and positioning */
.mb-3 {
  position: relative;
  width: 100%; /* or fixed width if preferred */
}

/*.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border-radius: 30px;
  border: 1px solid #dee2e6;
  background-color: #fff;
  font-size: 1rem;
  color: #585C5F;
  display: block;
}*/

.custom-select {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 30px;
  background-color: #fff;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1px solid #dee2e6;
  width: 100%;
  font-size: 1rem;
  color: #585C5F;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
}


/* use FA icon instead of browser drop down arrow
.custom-select-icon {
    position: absolute;
    right: 1rem;
    transform: translateY(-200%);
    pointer-events: none;
    color: #666;
    font-size: 0.9rem;
}*/

/* Profile Icon */
.profile-icon {
  color: #333;
  font-size: 1.2rem;
  background: #f3f3f3;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-icon:hover {
  color: #e26d8f;
}

/* ----------------------------------
   Navigation
---------------------------------- */

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 4rem;
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
}

.nav-left-wrapper {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.nav-links {
  display: flex;
  gap: 4rem;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #333;
}

.nav-links a:hover,
.nav-links a.active {
  color: #e26d8f;
}

.logo {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
  color: #e26d8f;
  text-decoration: none;
}

.top-nav {
  display: flex;
}

.bottom-nav {
  display: none;
}

/* ----------------------------------
   Header Grids
---------------------------------- */

/* Header */
.home-header-grid,
.shopping-header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center;
}

.home-header-right-column img {
  max-width: 200px;
  height: auto;
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem 2rem;
  margin-top: 2rem;
  align-items: start;
}
.dashboard-left-column {
    display: grid;
    min-width: 325px;
    grid-template-columns: 1fr;
    row-gap: 1rem;
}

.dashboard-right-column {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1rem;
}



/* ----------------------------------
   Recipes Page
---------------------------------- */

/* Header */
.recipe-header-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem 2rem;
  margin-top: 2rem;
  align-items: center;
}

.recipe-header-right-column {
  align-self: end;
  min-width: 300px;
}

/* Filters */
.recipe-filter {
  margin: 2rem 0 1rem 0;
}

.recipe-filter .nav-link {
  color: #333;
}

.recipe-filter .nav-link:hover {
  color: #e26d8f;
}

.recipe-filter .nav-link.active {
  border-radius: 0;
  color: #333;
  border-bottom: 4px solid #e26d8f;
  background-color: transparent;
}

/* Cards Grid */
.recipe-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin-top: 2rem;
  align-items: start;
}



/* ----------------------------------
   Shopping Page
---------------------------------- */
.shopping-page-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem 2rem;
  align-items: start;
}

.shopping-cards {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1rem;
}


.shopping-header-right-column img {
    max-width: 300px;
}

.pantry-cards{
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.pantry-card {
    width: 500px;
    justify-self: center;
}

/* ----------------------------------
   Profile Page
---------------------------------- */
  /* Profile Page Layout */
  .container {
    max-width: 600px;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
    margin-bottom:inherit;
  }

  .profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
  }

  .details {
    text-align: center;
  }

  .profile-actions {
    text-align: center;
  }

.list-group-flush {
    margin: 15px;
}

/* ----------------------------------
   User Form
---------------------------------- */

.title {
    text-align: center;
    margin-bottom: 2rem;
}

.title-home {
    display: grid;
    text-align: center;
    margin-bottom: 2rem;
}
/* ----------------------------------
   New Cake Form
---------------------------------- */


/* ----------------------------------
   Cake Info
---------------------------------- */
.cakeInfoPage .btn {
    width: 100%;
    margin: 0.25rem 0rem;
}

.link{
    color: #e26d8f;
    text-decoration: none;
}

.link:hover {
    color: #cc5a7d;
}

.back-link {
    position: absolute;
    left: 2rem;
}

.btn-link{
    border: none;
    background: transparent;
    color: #e26d8f;
}

.btn-link:hover {
    color: #cc5a7d;
}
.cakeInfoPage {
   display: flex;
   flex-direction: column;
   align-items: center;
}

.info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.details-list {
    line-height: 2rem;
}

.recipe-item{
    line-height: 1rem;
    margin-bottom:1.5rem;
}

.recipe-section-title{
    margin-bottom: .75rem;
}
/* ----------------------------------
   Edit Page
---------------------------------- */
/* visually hidden labels for a11y */
.visually-hidden{position:absolute!important;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}

.ingredient-pill{
  display:grid;
  grid-template-columns: 1fr 1fr 2fr; /* amount | unit | name  */
  gap: 0; /* we’ll draw dividers ourselves */
  border:1px solid #dee2e6;
  border-radius: 999px;
  background:#fff;
  padding: 6px;    /* inner breathing room */
  align-items:center;
}

.ingredient-pill + .ingredient-pill{ margin-top: .75rem; }

/* each segment */
.ingredient-pill .seg{
  position: relative;
  padding: 0 10px;
}
.ingredient-pill .seg-grow{ width: 100%; }
.ingredient-pill .seg-auto{ padding-right: 6px; }

/* vertical dividers between segments (not before first or after last) */
.ingredient-pill .seg:not(:first-child):not(.seg-auto)::before{
  content:"";
  position:absolute; left:0; top:8px; bottom:8px;
  width:1px; background:#eee;
}

/* inputs */
.pill-input{
  border: none;
  background: transparent;
  width: 100%;
  padding: 8px 6px;
  outline: none;
  border-radius: 12px;
  font-size: 14px;
  color: #585C5F;
}

/* focus ring on the whole pill when any child focuses */
.ingredient-pill:focus-within{
  box-shadow: 0 0 0 4px rgba(196, 215, 251);
  border-color: #86B7FD;
}


/* ----------------------------------
   Login Page
---------------------------------- */
.login-img{
    display: flex;
    flex-direction: column;
    max-width: 300px;
    justify-self: center;
}


/* ----------------------------------
   Card Components
---------------------------------- */

/* Base Card Styles */
.card {
  background-color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cardLink {
  text-decoration: none;
}

/* Flex Utility */
.flex-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Arrow Card Layout */
.arrow-card {
  justify-content: space-between;
}

/* Progress Bar Card Specific Layout */
.progress-bar-card-content {
  flex: 1;
}

/* Check Box Card */

.check-box-header-row h3 {
  font-family: 'Georgia', serif;
  margin: 0;
}

.check-box-card-content {
  /* Remove this unless you’re sure a parent sets padding-left */
  padding-left: inherit;
}

/* Pantry Card */
.ingredient-card-label {
    text-wrap-mode: nowrap;
}

.pantry-card-content .form-control {
    width: 175px;
}

/* Card Header Layout */
.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background-color: transparent;
  border-bottom: none;
}

.card-header > *:last-child {
  margin-bottom: 0;
}

/* Text Styles */
.subtitle,
.date {
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
  margin: 0.25rem 0;
  color: #666;
}

.edit-note{
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  margin: 0.25rem 0;
  color: #666;
}

.date {
  color: #999;
}

.complete {
  color: #008000;
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0rem 1rem;
}

.progress-bar-bg {
  background-color: #eee;
  border-radius: 8px;
  width: 100%;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  background-color: #e26d8f;
  height: 100%;
  width: 30%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: #666;
}
/* star Icon */
  .star-icon {
    color: #FCBF28;
    padding: 5px;
    align: center;
  }

/* Arrow Icon */
.fa-arrow-right {
  font-size: 1.5rem;
  color: #999;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.fa-arrow-right:hover {
  color: #e26d8f;
}

.fa-chevron-left {
  font-size: 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.fa-chevron-left:hover {
  color: #e26d8f;
}


/* ----------------------------------
Mobile
---------------------------------- */
@media (max-width: 768px) {
  .top-nav {
    display: none;
  }

  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 0.5rem 0;
    height: 70px;
    z-index: 1000;
  }

  .bottom-nav a {
    text-decoration: none;
    color: #333;
    font-size: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .bottom-nav a:hover,
  .bottom-nav a.active {
    color: #e26d8f;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav a {
    margin-bottom: 0.5rem;
  }

  /* Shared 1-column grid & center text */
  .recipe-header-grid,
  .recipe-list-grid,
  .dashboard-grid,
  .shopping-page-content,
  .home-header-grid,
  .shopping-header-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* Hide right columns */
  .home-header-right-column,
  .shopping-header-right-column {
    display: none;
  }

  /* Full-width left columns */
  .home-header-left-column,
  .shopping-header-left-column {
    width: 100%;
  }

  .input-row {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .ingredient-inputs {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .pantry-card-content .form-control {
    width: 100%;
  }

  .pantry-card {
    width: 350px;
  }

  .ingredient-card-label {
    margin-bottom: 0.25rem;
  }
}
/* ===== iOS/Safari robustness add-ons ===== */
.centered-content{
  display: grid;
  place-items: center;
  text-align: center;
  min-height: calc(100vh - 120px);
}

.saveBtn{
    display: flex;
    justify-content: center;
}

/* 1) Flex gap fallbacks (older iOS) */
.flex-row > * + *,
.nav-links > * + *,
.nav-left-wrapper > * + *,
.btn-add-edit > * + * { margin-left: 0.75rem; }
.login-btn > * + * { margin-top: 0.5rem; }

/* 2) Replace nonstandard text-wrap-mode */
.ingredient-card-label { white-space: nowrap; }



/* 3) justify-self fixes for flex children */

.pantry-card { margin-inline: auto; }/* center block */

/* 4) fit-content fallback */
.btn-outline-secondary { display: inline-block; width: auto; }


/* 6) Safe-area for fixed bottom nav */
.bottom-nav { padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)); }
body { padding-bottom: 60px; } /* reserve space so content isn't hidden */

/* 7) Clean up invalid property */
.star-icon { display: inline-flex; align-items: center; justify-content: center; }
