/* =========================
   Root Variables
========================= */
:root {
  --dusty-red: #D43F3F;
  --dusty-red-hover: #C73636;
  --dark-yellow: #FFD27F;
  --pale-yellow: #FFECB3;
  --peach: #F5A96E;
  --dark: #850000;
}

/* =========================
   Global Styles
========================= */
.delius {
  font-family: 'Delius Swash Caps', cursive;
  font-weight: 400;
  font-style: normal;
}

.mali-regular {
  font-family: 'Mali', cursive;
  font-weight: 400;
  font-style: normal;
}

/* body, html { */
/*   height: 100vh; */
/*   margin: 0; */
/*   font-family: 'Mali', cursive; */
/*   background-color: var(--pale-yellow); */
/*   overflow: clip; */
/* } */

body, html {
  height: 100vh;
  margin: 0;
  font-family: 'Mali', cursive;
  background-color: var(--pale-yellow);
  overflow: hidden;
}

/* =========================
   Layout Structure
========================= */
.body {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.body-left, .body-right {
  position: sticky;
  flex-grow: 0;
  width: 400px;
}

/* =========================
   Header Styles
========================= */
.top-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 60px;
  padding: 10px 20px;
  background-color: var(--dusty-red);
  color: var(--dark-yellow);
}

.top-header .swirl {
  height: 40px;
  width: auto;
  margin: 0 20px;
}

.site-name {
  font-family: 'Delius Swash Caps', serif;
  font-size: 2.5em;
  font-weight: bold;
  letter-spacing: 4px;
  color: var(--dark-yellow);
  white-space: nowrap;
}

.header-wrap a {
  text-decoration: none;
}

/* =========================
   Left Sidebar
========================= */
.sidebar-left {
  overflow: hidden;
  margin: 25px;
  border-radius: 20px;
  z-index: 10;
  background-color: var(--peach);
  color: var(--dark);
  padding: 6px;
  font-size: 1.8em;
  font-weight: 900;
  letter-spacing: 1.5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.sidebar-left ul {
  list-style: none;
  padding: 0 25px;
}

.sidebar-left li {
  margin-bottom: 7px;
}

.sidebar-left a {
  color: var(--dark);
  text-decoration: none;
  transition: 0.1s ease;
}

.sidebar-left a:hover {
  color: var(--dusty-red);
}

.sidebar-left .nav_icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  height: 85px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.sidebar-left .nav_icon:hover {
  transform: scale(1.05);
}

.login-link {
  margin-top: 16px;
  font-size: 0.8em;
  text-align: center;
  list-style: none;
}

/* =========================
   Floating Create Icon
========================= */
.create_icon {
  position: fixed;
  bottom: 30px;
  left: 55px;
  z-index: 1000;
  transition: transform 0.2s ease; 
}

.create_icon::after {
  content: "Create a recipe";
  display: block;
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  background: var(--dark-yellow);
  color: var(--dusty-red);
  font-family: 'Mali', cursive;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.create_icon:hover {
  transform: scale(1.02);
}

.create_icon img {
  width: 150px;
  height: auto;
  border-radius: 10%;
}

/* =========================
   Right Sidebar
========================= */
.sidebar-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin: 25px;
  padding: 5px;
  height: 75%;
  border-radius: 20px;
  z-index: 10;
  background-color: var(--peach);
  color: var(--dusty-red);
  font-size: 1.3em;
  font-weight: 900;
  letter-spacing: 1.3px;
  overflow: auto;
  scrollbar-color: var(--dusty-red) var(--peach);
  scrollbar-width: none; /* hid the scroll bar but you can scroll through filters */
}

#filter-form h3 {
  color: var(--dark);
  font-size: 1em;
  margin: 8px 0 10px;
  
}

#filter-form label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9em;
  color: var(--dusty-red);
  margin-bottom: 10px;
  align-self: flex-start;
  justify-content: flex-start;
  
}

#filter-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 3px solid var(--dusty-red);
  border-radius: 3px;
  background: var(--pale-yellow);
  cursor: pointer;
  position: relative;
}

#filter-form input[type="checkbox"]:checked {
  background: var(--dusty-red);
}

#filter-form input[type="checkbox"]:checked::after {
  content: "✔";
  position: absolute;
  color: var(--pale-yellow);
  font-size: 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Mali', cursive;;
  font-weight: 400;
}

/* =========================
   Main Content Area
========================= */
.main-content {
  width: 100%;
  flex-grow: 1;
  /*display: flex; this line was breaking the searched results. They returned recipes would not load at the top of the page*/
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
/*   overflow: auto; */
  scrollbar-color: var(--dusty-red) transparent;
/*   height: auto; */
  height: calc(100vh - 40px); /* subtract header height */
  overflow-y: auto;
  padding-bottom: 40px;
}



/* =========================
   Search Bar
========================= */
.search-bar, input[type="search"] {
/*   width: 90%; */
  margin: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: var(--dark-yellow);
  border: none;
  border-radius: 10px;
  padding: 10px;
  height: 50px;
  font-size: 20px;
  font-family: 'Mali', cursive;
  font-weight: 600;
  justify-content: flex-start;
}

.search-btn {
display: flex;
    flex-direction: row;
    gap: 6px;
    }

input[type="search"] {
  background: var(--dusty-red);
}

input[type="text"]::placeholder {
  color: var(--dark-yellow);
}

.search-bar:focus {
  outline: none;
}

.search-bar button[type="submit"] {
  background: var(--dusty-red);
  color: var(--dark-yellow);
  font-size: 1.3em;
  border: none;
  border-radius: 10px;
  padding: 0 10px;
  height: 50px;
  width: 50px;
  margin: 10px;
  cursor: pointer;
}

.search-bar label { display: none; }

input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1) sepia(1) saturate(2) hue-rotate(3deg);
}


#tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  background: var(--dusty-red);
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 50px;
  flex: 1;
  cursor: text;
}

#tag-input-wrapper input[type="text"] {
  flex: 1;
  min-width: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--dark-yellow);
  font-size: 20px;
  font-family: 'Mali', cursive;
  font-weight: 600;
  height: auto;
  padding: 0;
  margin: 0;
  width: auto;
}

#chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--dark);
  min-height: 32px;
  color: var(--dark-yellow);
  border-radius: 20px;
  padding: 2px 8px 3px 12px;
  font-size: 0.75em;
  font-weight: 700;
  white-space: nowrap;
}

.tag-chip button {
  background: none;
  border: none;
  color: var(--dark-yellow);
  cursor: pointer;
  padding: 0;
  font-size: 1.4em;
  line-height: 1;
  opacity: 0.8;
  font-family: 'Mali', cursive;
  font-weight: 800;
}

.tag-chip button:hover { opacity: 1; }


/* =========================
   Recipe Cards Layout
========================= */
.recipe-card {
	padding-top: 20px;
  margin-top: 35px;
  width: 99.5%;
  display: flex;
  flex-wrap: wrap;
  gap: 35px;
  justify-content: flex-start;
  flex-direction: row;
  height: fit-content;
  padding-right: 10px;
  overflow-y: auto;
  flex: 1;
  scrollbar-color: var(--dusty-red) var(--pale-yellow);
  padding-bottom: 80px;
}


a {
  text-decoration: none; 
  color: var(--dark);
}

/* =========================
   Individual Card (Folder Style)
========================= */
.card {
  position: relative; /* needed for tab */
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  max-width: 400px;
  max-height: 200px;
  padding: 25px 20px 20px; /* extra space for tab */
  border-radius: 12px;
  background: var(--peach);
}

/* Folder Tab */
.card::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0px;
  width: 100px;
  height: 28px;
  background: var(--peach);
  border-radius: 6px 6px 0 0;
}

/* =========================
   Card Content
========================= */
.card .card-text {
  height: 100%;
  overflow: hidden; /* the scroll bars were difficult to look at, the user can just view the recipe*/
  color: var(--dark);                
  transition: 0.1s ease;                
}

.card .card-text:hover{
  color: var(--dusty-red-hover);                
}

.card-cost {
  font-weight: 800;
  color: var(--dusty-red);
}


/* =========================
   Card Image
========================= */
.card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

/* =========================
   Card Columns
========================= */
.card-left,
.card-right {
  flex-shrink: 0;
  width: 50%;
}