body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #4c84e3;
}

#newList {
  margin-bottom: 20px;
}

.list {
  margin-bottom: 20px;
  border: 1px solid #ccc;
  padding: 10px;
}

.list h2 {
  margin: 0 0 10px 0;
}

input[type="text"] {
  padding: 5px;
  width: 70%;
}

button {
  padding: 6px 10px;
  margin-left: 5px;
}
li {
  display: flex;
  color: white;
  align-items: center;
  margin: 4px 0;
}

li span {
  margin-left: 8px;
  color: white;
  flex-grow: 1;
  white-space: normal;
  word-wrap: break-word;
}

.list div {
  margin-top: 6px;
}

input[type="text"] {
  padding: 5px;
}
.list input[type="text"] {
  font-size: 1em;
  padding: 5px;
}

.list select {
  padding: 5px;
}
#tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* ✅ Max 2 tiles per row */
  gap: 10px;
  margin: 20px 0;
}

.tile {
  text-align: center;
  padding: 16px;
  border: 2px solid #444;
  border-radius: 10px;
  font-size: 1.1em;
  cursor: pointer;
  background-color: #f8f8f8;
  transition: transform 0.2s;
}

.tile:hover {
  transform: scale(1.05);
  background-color: #eaeaea;
}

@keyframes tilePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.tile.active {
  animation: tilePulse 1.5s infinite ease-out;
  background-color: #dbeafe;
  border-color: #60a5fa;
  font-weight: 600;
  color: #1e3a8a;
}

.day-block {
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
}

.meal-row {
  display: grid;
  color: white;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 5px;
  margin: 4px 0;
}

.meal-row input[type="text"] {
  flex-grow: 1;
  padding: 4px;
}

.week-nav-btn {
  font-size: 3em;           /* ⬆️ Size of the arrows */
  padding: 6px 12px;
  background: transparent;  /* ✅ Transparent background */
  border: none;
  cursor: pointer;
  color: white;             /* 🎨 Change arrow color here */
  transition: color 0.2s;
}

.week-nav-btn:hover {
  color: #ffcc00;           /* 🎨 Optional: highlight on hover */
}


#planner h3 {
  margin: 0 20px;
  flex-grow: 1;
  text-align: center;
}
#recipeForm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

#recipeForm textarea {
  height: 80px;
  resize: vertical;
  padding: 6px;
}

#recipeList .recipe {
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  background-color: #c6d4f9;
}

#recipeList .recipe h4 {
  margin: 0 0 5px 0;
}

.recipe-buttons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.recipe h4:hover {
  color: #0077cc;
  text-decoration: underline;
}
.recipe .details {
  max-height: 0;
  overflow: auto;
  transition: max-height 0.3s ease;
}

.recipe .details.open {
  max-height: 1000px; /* large enough to fit content */
}
.recipe-popup-title {
  color: #222 !important;
  margin: 0;
}

.modal-content .close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
}
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content,
.recipe-modal {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.modal-content:not(.recipe-modal) {
  max-width: 350px;
  text-align: center;
}

.modal-content p {
  margin-bottom: 20px;
  font-size: 1.1em;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal .btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
}

.modal .btn.danger {
  background: #d32f2f;
  color: white;
}

.modal .btn:not(.danger) {
  background: #e0e0e0;
}

.added-by {
  font-size: 0.85em;
  color: #FFF;
  margin-left: 1.4em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .added-by {
    display: block;
    margin-left: 1.8em;
    white-space: normal;
  }
}

@media (max-width: 600px) {
  #splashScreen {
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
}

#appContent {
  background-color: #4c84e3;
  width: 100vw;
  min-height: 100vh;
  box-sizing: border-box;
}

.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #4c84e3; /* Optional: subtle background */
  border-radius: 12px; /* Optional: for a rounded box */
}

/* Subheadings (e.g., Hello Chris!, Lists, Recipes, Saved Recipes) */
h2, h3 {
  color: #FFFFFF; !important;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 10px;
  padding-bottom: 6px;
}

/* Optional: Specific style for greeting like "Hello Chris!" */
#greeting {
  font-size: 1.4em;
  font-weight: 600;
  color: #FFFFFF;
}
input[type="text"], textarea {
  padding: 8px;
  border: 1px solid #aaa;
  border-radius: 6px;
  font-size: 1em;
  background-color: #fffef8;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.1);
  transition: border-color 0.3s;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: #4CAF50;
  background-color: #ffffff;
}
.mealAddBtn {
  padding: 4px 10px;
  font-size: 24px;
  font-weight: bold;
  background-color: transparent;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mealAddBtn:hover {
  background-color: #388e3c;
}

.dayCard {
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.groceryBtn.circular-icon {
  width: 32px;
  height: 32px;
  font-size: 18px;
  border-radius: 50%;
  border: none;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.groceryBtn.circular-icon:hover {
  background-color: #e0f7e9;
}
h2 {
  color: #ffffff !important;
}

.mealRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* allows items to wrap on small screens */
  gap: 8px;
}

h1 {
  font-size: 2.2em;
  text-align: center;
  margin-bottom: 0.4em;
  color: #ffffff; /* change from #222 to white */
}
#appContent .main-container h1 {
  color: #ffffff !important;
  font-size: 2.4em;
  font-weight: 700;
  text-align: center;
  margin: 30px 0 10px;
}
.list-title-input {
  font-family: 'Poppins', sans-serif;
  font-size: 40px !important;
  font-weight: bold;
  color: white;
  background-color: transparent !important;
  border: none !important;
  outline: 3px;
  box-shadow: none !important;
  padding: 0;
  margin: 10px 0;
  width: 100%;
}
.user-icon-btn {
  font-size: 1.5em;
  padding: 4px 10px;
  background: transparent;     /* ✅ Transparent background */
  border: none;
  cursor: pointer;
  color: white !important;     /* ✅ Icon color */
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding-bottom: 15px;
}

.calendar-day, .calendar-day-name {
  border: 1px solid #ccc;
  min-height: 70px;
  padding: 6px;
  font-size: 0.85em;
  background-color: #fffefc;
  border-radius: 8px;
  overflow-wrap: break-word;
}

.calendar-day-name {
  font-weight: bold;
  text-align: center;
  background-color: #e6e6e6;
}
.day-row {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 8px;
  background: #f1f1f1;
}

.day-select-btn {
  flex: 1;
  min-width: 60px;
  text-align: center;
  border: none;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  font-size: 0.9em;
  white-space: pre-line;
  cursor: pointer;
}

.day-select-btn.selected {
  background: #0077cc;
  color: white;
  font-weight: bold;
}

#calendarEventsList {
  padding: 12px;
  background: #fafafa;
}

.event-box {
  background: #c6e7f9;
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
}

.no-events {
  color: #999;
  padding: 10px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  display: flex;
  justify-content: space-around;
  padding: 10px;
  border-top: 1px solid #ccc;
}

.bottom-nav button {
  background: none;
  border: none;
  font-size: 1.1em;
  color: #333;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 6px;
}

.calendar-day {
  background: #fff;
  border: 1px solid #ccc;
  min-height: 50px;
  text-align: center;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}

.calendar-day.selected {
  background-color: #aadbff;
  color: black;
}

.calendar-day-name {
  font-weight: bold;
  text-align: center;
}
#calendarHeader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

#calendarHeader h3 {
  margin: 0;
  font-size: 1.5em;
}

#calendarHeader button {
  padding: 4px 8px;
  font-size: 1.2em;
}

.dot-row {
  display: flex;
  gap: 3px;
  margin-top: 4px;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
}

.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2196f3;
}

.more-events {
  font-size: 0.75em;
  margin-left: 4px;
  color: #555;
}

.event-box {
  background: #d0e9ff;
  padding: 10px;
  margin: 5px 0;
  border-radius: 6px;
}

.no-events {
  color: #888;
  font-style: italic;
}
.event-dots {
  display: flex;
  gap: 2px;
  justify-content: center;
  margin-top: 2px;
}

.calendar-day-label {
  color: #222;        /* or whatever you want */
  font-size: 1.2em;
  font-weight: 600;
  background-color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.calendar-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.calendar-header-row h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  color: #ffffff;
}

.calendar-header-row button {
  background-color: #ffffff;
  border: none;
  padding: 6px 12px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
}
/* Modal background (already present likely) */
#eventModal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

/* Modern modal box */
#eventModal .modal-content {
  background: #fefefe;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Modal title */
#eventModalTitle {
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin: 0 0 10px;
  color: #1a73e8;
}

/* Input fields */
#eventModal input[type="text"],
#eventModal input[type="date"],
#eventModal input[type="time"],
#eventModal input[type="color"],
#eventModal select {
  height: 40px;
  font-size: 1em;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  background-color: #fff;
}

/* Save and Delete buttons */
#eventModal button {
  padding: 10px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#eventModal button:not(#deleteEventBtn) {
  background-color: #1a73e8;
  color: white;
}

#deleteEventBtn {
  background-color: #e53935;
  color: white; /* ✅ Ensure readable text */
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
}

#deleteEventBtn:hover {
  background-color: #c62828;
}

/* Close (X) button */
#eventModal .close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  background: none;
  border: none;
}
.add-event-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 1em;
  font-weight: 600;
  color: fff;
  background-color: #e4e4e4; /* or your app's accent color */
  border: fff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.2s ease;
  margin-top: 10px;
}

.add-event-btn:hover {
  background-color: #0f5dc8;
}

.add-event-btn:active {
  transform: scale(0.97);
}
.tab {
  padding-bottom: 40px;
}

.suggestion-box {
  font-size: 1em;
  line-height: 1.4em;
  padding: 4px 0;
}

.suggestion-item {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
}

.suggestion-item.active,
.suggestion-item:hover {
  background-color: #e0f0ff;
}
#confirmOverlay .modal-content {
  background: #ffffff;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

#confirmOverlay button {
  padding: 8px 16px;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#confirmYesBtn {
  background-color: #e53935;
  color: white;
}

#confirmNoBtn {
  background-color: #cccccc;
}
:root {
  --note-font: "Kalam", "Poppins", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* ---- Notes layout (cards, not full-width bars) ---- */
.notes-toolbar {
  display: flex; gap: .5rem; align-items: flex-start; margin: 1rem 0; flex-wrap: wrap;
}
#note-text { flex: 1; min-width: 280px; }

/* Use flex so each note is a fixed-size card */
.notes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

/* Tweak this width to taste (240–300px works well) */
.note-card {
  width: 260px;                 /* <- makes cards, not full-width strips */
  max-width: 100%;
  box-sizing: border-box;

  /* clean, readable font (no handwritten) */
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.35;

  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  position: relative;           /* for corner icons */
  padding: 12px 44px 10px 12px; /* room for icons on right */

  /* keep text inside the card nicely */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* author + time under the text */
.note-meta {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: .8rem;
  opacity: .8;
  margin-top: .5rem;
}

/* small corner icons */
.note-actions {
  position: absolute; top: 6px; right: 6px;
  display: flex; gap: 4px;
  opacity: 0; transition: opacity .15s ease;
}
.note-card:hover .note-actions { opacity: .9; }

.note-actions .icon-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; border-radius: 6px;
}
.note-actions .icon-btn:hover { background: rgba(0,0,0,.08); }
.note-actions .icon-btn:focus-visible { outline: 2px solid rgba(0,0,0,.2); }
.note-actions .icon-btn .material-icons { font-size: 18px; line-height: 1; }

/* small-screen fallback: let cards go full width */
@media (max-width: 520px) {
  .note-card { width: 100%; }
}
.note-card .note-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.icon-btn {
  all: unset;                       /* reset browser button styles */
  cursor: pointer;
  padding: 2px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: rgba(0,0,0,.08); }
.icon-btn:focus-visible { outline: 2px solid rgba(0,0,0,.2); }

.icon-btn .material-icons {
  font-size: 18px;
  line-height: 1;
}
.note-modal { width: 92%; max-width: 460px; }
.modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }

/* Optional: match the note font to body for editing */
#noteEditText { font: inherit; line-height: 1.35; }
/* Center the Notes modals on desktop & mobile */
#noteEditModal,
#noteDeleteModal {
  position: fixed;
  inset: 0;                      /* top:0; right:0; bottom:0; left:0 */
  display: none;                 /* JS will switch to flex */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);  /* dim background */
  z-index: 10000;                /* above everything */
}

/* Modal box */
#noteEditModal .note-modal,
#noteDeleteModal .note-modal {
  background: #fff;
  color: #222;
  border-radius: 12px;
  padding: 16px;
  width: 92%;
  max-width: 480px;
  box-shadow: 0 12px 32px rgba(0,0,0,.30);
}

/* Make the popup title readable */
#noteEditModal .note-modal h3,
#noteDeleteModal .note-modal h3 {
  color: #222;
  margin: 0 0 8px;
  font-weight: 600;
}
























