/* MVP.css v1.17.3 - https://github.com/andybrewer/mvp */

:root {
  --active-brightness: 0.85;
  --border-radius: 15px;
  --box-shadow: 2px 2px 10px;
  --color-accent: #118bee15;
  --color-bg: #fff;
  --color-bg-secondary: #e9e9e9;
  --color-link: #faa749;
  --color-secondary: #43444B;
  --color-secondary-accent: #920de90b;
  --color-shadow: #f4f4f4;
  --color-table: #118bee;
  --color-text: #000;
  --color-text-secondary: #999;
  --color-scrollbar: #cacae8;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --hover-brightness: 1.2;
  --justify-important: center;
  --justify-normal: left;
  --line-height: 1.2;
  --width-card: 585px;
  --width-card-medium: 660px;
  --width-card-wide: 900px;
  --width-content: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root[color-mode="user"] {
    --color-accent: #0097fc4f;
    --color-bg: #333;
    --color-bg-secondary: #555;
    --color-link: #0097fc;
    --color-secondary: #e20de9;
    --color-secondary-accent: #e20de94f;
    --color-shadow: #bbbbbb20;
    --color-table: #0097fc;
    --color-text: #f7f7f7;
    --color-text-secondary: #aaa;
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Layout */
article aside {
  background: var(--color-secondary-accent);
  border-left: 4px solid var(--color-secondary);
  padding: 0.01rem 0.8rem;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  line-height: var(--line-height);
  margin: 0;
  overflow-x: hidden;
  padding: 0;
}

footer,
header,
main {
  margin: 0 auto;
  max-width: var(--width-content);
  padding: 1.5rem 0.5rem;
}

hr {
  background-color: var(--color-bg-secondary);
  border: none;
  height: 1px;
  margin: 3.5rem 0;
  width: 100%;
}

section {
  display: flex;
  flex-wrap: wrap;
  justify-content: var(--justify-important);
}

section img,
article img {
  max-width: 100%;
}

section pre {
  overflow: auto;
}

section aside {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  margin: 1rem;
  padding: 1.25rem;
  width: var(--width-card);
  height: auto;
}

section aside:hover {
  box-shadow: var(--box-shadow) var(--color-bg-secondary);
}

[hidden] {
  display: none;
}

/* Headers */
article header,
div header,
main header {
  padding-top: 0;
}

header {
  text-align: var(--justify-important);
}

header a b,
header a em,
header a i,
header a strong {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}


section header {
  padding-top: 0;
  width: 100%;
}

/* Typography */



h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--line-height);
  text-wrap: balance;
}

mark {
  padding: 0.1rem;
}

p {
  margin: 0.75rem 0;
  padding: 0;
  width: 100%;
}

small {
  color: var(--color-text-secondary);
}

sup {
  background-color: var(--color-secondary);
  border-radius: var(--border-radius);
  color: var(--color-bg);
  font-size: xx-small;
  font-weight: bold;
  margin: 0.2rem;
  padding: 0.2rem 0.3rem;
  position: relative;
  top: -2px;
}
/*nav*/
nav {
  align-items: center;
  display: flex;
  font-weight: bold;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}
/* Links */
a {
  color: var(--color-link);
  display: inline-block;
  font-weight: bold;
  text-decoration: none;
}

a:visited,
area:visited {
  color: var(--color-link);
}

a:hover {
  filter: brightness(var(--hover-brightness));
}

a:active {
  filter: brightness(var(--active-brightness));
}

a b,
a em,
a i,
a strong,
button,
input[type="submit"] {
  border-radius: var(--border-radius);
  display: inline-block;
  font-size: medium;
  font-weight: bold;
  line-height: var(--line-height);
  margin: 0.5rem 0;
  padding: 1rem 2rem;
  box-sizing: border-box;

}


button,
input[type="submit"] {
  font-family: var(--font-family);

}

button:hover,
input[type="submit"]:hover {
  cursor: pointer;
  filter: brightness(var(--hover-brightness));
}

button:active,
input[type="submit"]:active {
  filter: brightness(var(--active-brightness));
}

a b,
a strong,
button,
input[type="submit"] {
  background-color: var(--color-link);
  border: 2px solid var(--color-link);
  color: var(--color-bg);
}

a em,
a i {
  border: 2px solid var(--color-link);
  border-radius: var(--border-radius);
  color: var(--color-link);
  display: inline-block;
  padding: 1rem 2rem;
}


/* Images */
figure {
  margin: 0;
  padding: 0;
}

figure img {
  max-width: 100%;
}

figure figcaption {
  color: var(--color-text-secondary);
}

/* Forms */
button:disabled,
input:disabled {
  background: var(--color-bg-secondary);
  border-color: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  cursor: not-allowed;
}

button[disabled]:hover,
input[type="submit"][disabled]:hover {
  filter: none;
}

form {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  display: block;
  max-width: var(--width-card-wide);
  min-width: 0;
  width: 100%;

  padding: 0.7rem;
  text-align: var(--justify-normal);
}

form header {
  margin: 0.5rem 0;
  padding: 0.5rem 0;
}
.errors p {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  display: block;
  max-width: var(--width-card-wide);
  width: 100%;
  min-width: var(--width-card);
  margin-top: 0.9rem;
  padding: 0.2rem;
  text-align: var(--justify-normal);
  
}
input,
label,
select,
textarea {
  display: block;
  font-size: inherit;
  max-width: var(--width-card-wide);
}

input[type="checkbox"],
input[type="radio"] {
margin: 0; 

}

input[type="checkbox"] + label,
input[type="radio"] + label {
  font-weight: normal;
  position: static;
}

input[type="range"] {
  padding: 0.4rem 0;
}

input,
select,
textarea {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  margin-bottom: 0.7rem;
  padding: 0.6rem 0.8rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  width: 100%;
  box-sizing: border-box;

}

input[readonly],
textarea[readonly] {
  background-color: var(--color-bg-secondary);
}

label {
  font-weight: bold;
  margin-bottom: 0.2rem;
}
#runner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;

}
.thumbnail{
  margin: 0 auto;
}
.thumbnail img{
  width: 100px;
  height: 100px;
    background-color: lightblue; /* Optional: for visibility */
  border-radius: 50%;
}


/* Tables */
table {
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  border-spacing: 0;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  white-space: nowrap;
}

table td,
table th,
table tr {
  padding: 0.4rem 0.8rem;
  text-align: var(--justify-important);
}

table thead {
  background-color: var(--color-table);
  border-collapse: collapse;
  border-radius: var(--border-radius);
  color: var(--color-bg);
  margin: 0;
  padding: 0;
}

table thead tr:first-child th:first-child {
  border-top-left-radius: var(--border-radius);
}

table thead tr:first-child th:last-child {
  border-top-right-radius: var(--border-radius);
}

table thead th:first-child,
table tr td:first-child {
  text-align: var(--justify-normal);
}

table tr:nth-child(even) {
  background-color: var(--color-accent);
}


/*createrecipe*/
.short-input{
  display: flex;
  justify-content: space-between;
}

input[type="file"]{
  border: none;
}






/* main page */
/* main page */
header.homepage {
  background-color: var(--color-link);
  color: var(--color-bg);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.3rem 0.2rem; /* reduce height */
  box-sizing: border-box;
  height: 75px;
}

.navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  min-height: 70px;
  width: 70%;
  gap: -50px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 0.5rem;
}

.logo p {
  margin: 0;
  line-height: 1.1;
  width: auto;
}

.logo img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
}

.navigation ul {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-right: 2.4rem;
  padding: 0;
}

.navigation ul li  {
  list-style: none;
  margin: 0;
  padding: 0;

}
.navigation ul li a{
  color: var(--color-bg);

}

/* From Uiverse.io by vinodjangid07 */ 
.InputContainer {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom,rgb(227, 213, 255),rgb(255, 231, 231));
  border-radius: 30px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.075);

}
.input {
  width: 100%;
  height: 50px;
  border: none;
  outline: none;
  caret-color: rgb(255, 166, 0);
  background-color: rgb(255, 255, 255);
  border-radius: 30px;
  padding-left: 15px;
  letter-spacing: 0.8px;
  color: rgb(19, 19, 19);
  font-size: 13.4px;
  box-sizing: border-box;
}

.dropdownStyle{
  display: none;
 top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgb(227, 213, 255);
  background:  var(--color-bg);
  z-index: 10;
  color: var(--color-link);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 255, 255);
}
.optionStyle{
   padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.optionStyle:last-child {
  border-bottom: none;
}
.search-feature{
 display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

}
.search-wrapper {
  width: 80%;
  position: relative;
  max-width: 900px;
  border: none;
  border-radius: none;
  box-shadow: none;
}

.search-feature button{
  width: auto;
  display: block;
  margin: 0 auto;
}
.Result_sub{
  display: flex;
  gap: 15px;
}
.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a,
.pagination strong {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  text-decoration: none;
}

.pagination strong {
  font-weight: bold;
}

section h2{
  margin-top: 10px;
  font-family: "Oswald", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-size:50px;
  font-style: normal;
  position: relative;
}


#section-1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;

  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

}
#section-1 aside{
  width: 80%;
}
#section-1 aside:hover{
  transform: translateY(-4px);
  border-color: #ffe0b4;
  box-shadow: 0 10px 22px rgba(245, 148, 21, 0.5);
}

#section-1 aside img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: black;
  

}
.card-link {
  display: block;          
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: black;
  
}
.card-link:hover{
  filter: none;
}

/*Receipe details*/
.receipe-details{
   display: flex;
  flex-direction: column;
  align-items: center;

}
.meal-details{
  height: auto;
}
.meal-details img{
  width: 100%;
  height: 290px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: black;
}
.meal-details h3{
  text-align: center;
}

#subinfo{
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

#subinfo p{
  margin-top: 5px;
margin-bottom: 5px;
  
}

/* edit */
.edit-details{
width: 100%;
  max-width: 700px; 
}

.edit-details img{
   width: 100%;
  height: 290px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: black;
}
.commandbuttons{
  display: flex;
  justify-content: space-between;
  gap:5px;
}

#deletecheckbox{
  display: flex ;
  justify-content: space-around;
  gap: 1px;
  align-items: center;
}
#deletecheckbox p{
  width: 20%;
}

/*user list*/
.usersdetails{
  max-width: 1000px;
  margin: 0 auto;
}
.user-list{
  display: flex;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  margin-top: 20px;
  margin-right: 13px;
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow) var(--color-shadow);
  align-items: center;
  padding: 8px;
}
.usersdetails aside{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  width: 100%;
  overflow-x: auto;
  max-height: 500px;


}
.user-list img{
  max-width: 45px;
  width: auto;
  height: 35px;
  border-radius: 50%;
  margin: 3px;
  border: 1px solid black;
  object-fit: cover;
}
 /*all recepies*/
 .allrecipe_section{
  max-width: 90%;
 }
 
#fooddatabase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 100%;

  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

}
#fooddatabase aside{
  width: 80%;
}
#fooddatabase aside:hover{
  transform: translateY(-4px);
  border-color: #ffe0b4;
  box-shadow: 0 10px 22px rgba(245, 148, 21, 0.5);
}

#fooddatabase aside img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: black;
  

}
.sort-section {
    margin: 55px 0;
        justify-content: left;

}
.sort-menu {
    display: flex;
    gap: 15px;
}

.sort-item {
    position: relative;
}
.dropdown {
    display: none;
    margin-top: 10px;
    position: absolute;
    top: 60px;
    left: 0;
    min-width: 120px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    z-index: 100;
}

.dropdown a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #faa749;
}


/* Responsive styles */
@media (max-width: 1024px) {
  #fooddatabase {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  #section-1 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .navigation {
 width: min(95%, 1100px);  }
}

@media (max-width: 768px) {
  header.homepage {
    height: auto;
    padding: 0.8rem 0.5rem;
    text-align: center; /* center text */

    
  }

  .navigation {
    width: 95%;
    flex-direction: column;
    align-items: center;   /* 🔥 center horizontally */
    justify-content: center;
    gap: 1rem;
  }

  .navigation ul {
    flex-direction: column;
    align-items: center;   /* 🔥 center list items */
    justify-content: center;
    gap: 12px;
    margin-right: 0;
    width: 100%;
  }
  .navigation ul li a{
    font-size: 1.3rem;

  }

  .logo {
    padding-left: 0;
    justify-content: center; /* 🔥 center logo content */
  text-align: center;
  }

  #section-1,
  #fooddatabase,
  .usersdetails aside {
    grid-template-columns: 1fr;
  }

  #section-1 aside,
  #fooddatabase aside {
    width: 80%;
    margin: 0 auto;
  }

  .edit-details {
    width: 100%;
  }

  form,
  .errors p {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .short-input {
    flex-direction: column;
    gap: 0.5rem;
  }

  .commandbuttons {
    flex-direction: column;
  }

  .search-wrapper {
    width: 100%;
  }

  .search-feature button {
    width: 100%;
  }

  section h2 {
    font-size: 2rem;
    text-align: center;
  }

  .meal-details img,
  .edit-details img {
    height: auto;
  }

  #subinfo {
    flex-direction: column;
    gap: 0.25rem;
  }

  .user-list {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  footer,
  header,
  main {
    padding: 1rem 0.75rem;
  }

  .logo img {
    width: 45px;
    height: 45px;
  }

  .input,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  textarea,
  select {
    font-size: 16px;
  }

  section h2 {
    font-size: 1.6rem;
  }

  a b,
  a strong,
  button,
  input[type="submit"] {
    padding: 0.85rem 1rem;
  }
}