/* ============================= */
/*         IMPORT FONTS          */
/* ============================= */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

/* ============================= */
/*          ROOT VARIABLES       */
/* ============================= */
:root {
  --cal-poly-green: #1f4f31;
  --engineering-orange: #b13f26;
  --chocolate-cosmos: #5b122a;
  --buff: #e49e6b;
  --seashell: #fbf1ee;
  --jet: #333333;
}

/* ============================= */
/*         GLOBAL STYLES         */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  background-color: rgba(251, 241, 238, 0.8);
  color: var(--jet);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================= */
/*          TYPOGRAPHY           */
/* ============================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--cal-poly-green);
}

a {
  color: var(--chocolate-cosmos);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  color: var(--engineering-orange);
  text-decoration: none;
}

li {
  font-size: 16px;
}

/* ============================= */
/*         NAVIGATION BAR        */
/* ============================= */
.navbar {
  background-color: var(--jet);
}

.navbar a.nav-link {
  color: var(--seashell);
  font-weight: 500;
}

.navbar a.nav-link:hover {
  color: #b13f26;
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--buff);
}

.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--buff);
  font-weight: 700;
  text-decoration: none;
}

.navbar .container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

.navbar-brand:hover {
  color: var(--buff);
}

#logo img {
  max-width: 50px;
  height: auto;
}

/* ============================= */
/*       SEARCH STYLING          */
/* ============================= */
form.d-flex {
  align-items: center;
  gap: 10px;
}

#search-bar,
#search-btn {
  padding: 10px 20px;
  transition: all 0.3s ease;
}

#search-bar {
  border: 2px solid var(--seashell);
  width: 300px;
}

#search-bar::placeholder {
  font-size: 15px;
}

#search-bar:focus,
#search-btn:focus {
  border-color: var(--buff);
  box-shadow: 0 0 5px rgba(228, 158, 107, 0.7);
}

#search-btn {
  background-color: var(--buff);
  color: var(--jet);
}

#search-btn:hover {
  background-color: var(--chocolate-cosmos);
  color: var(--seashell);
}

#search-query,
.delete-title {
  color: var(--chocolate-cosmos);
  text-transform: capitalize;
}

.category-option {
  color: var(--cal-poly-green);
  font-weight: 600;
}

.category-option:hover {
  color: var(--buff);
  text-decoration: none;
}

.selected-filter {
  font-weight: bold;
  color: var(--chocolate-cosmos);
}

#sidebar {
  transition: all 0.3s ease-in-out;
}

/* ============================= */
/*           BUTTONS             */
/* ============================= */
.btn.rounded-pill {
  text-decoration: none;
  padding: 10px 10px;
  font-weight: 600;
}

.btn-primary {
  background-color: var(--cal-poly-green);
  border-color: var(--cal-poly-green);
}

.btn-primary:hover {
  background-color: var(--chocolate-cosmos);
  border-color: var(--chocolate-cosmos);
}

.btn-outline-primary {
  border: 2px solid var(--engineering-orange);
  color: var(--engineering-orange);
}

.btn-outline-primary:hover {
  background-color: var(--engineering-orange);
  border-color: var(--engineering-orange);
}

.btn-edit,
.btn-delete {
    width: 120px;
}

#view-recipes-btn {
  padding: 10px 20px;
}

.btn-warning:hover, .btn-danger:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

/* ============================= */
/*             CARDS             */
/* ============================= */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(51, 51, 51, 0.7);
}

.card-title {
  color: var(--cal-poly-green);
}

.card-body {
  padding: 1.5rem;
}

/* Card hover effect */
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
}

.create-card:hover {
  transform: none;
}

.badge {
  height: 24px;
  margin: 0;
  padding: 6px 10px;
}

/* Card image consistency */
.card-img-top {
  object-fit: cover;
  height: 250px;
  width: 100%;
}

/* ============================= */
/*           FORMS               */
/* ============================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
#id_description,
#id_instructions,
select.form-select,
input.form-control {
  border-radius: 8px;
  border: 2px solid var(--jet);
  padding: 10px;
  font-size: 1rem;
  width: 100%;
  margin: 1rem 0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
#id_description:focus,
#id_instructions:focus,
select.form-select:focus,
input.form-control:focus {
  border-color: var(--engineering-orange);
  outline: none;
}

label {
  font-weight: 600;
  font-size: 1.1rem;
}

.form-control {
  margin: 1rem 0;
}

tr {
  background-color: var(--jet);
}

input[type="checkbox"] {
  margin: 0 10px;
}

/* ============================= */
/*             FOOTER            */
/* ============================= */
footer {
  background-color: var(--jet);
  color: #fff;
}

footer span {
  font-size: 14px;
}

/* ============================= */
/*           ALERTS              */
/* ============================= */
.alert {
  margin-bottom: 1.5rem;
  border-radius: 8px;
}

/* ============================= */
/*           IMAGES              */
/* ============================= */

.recipe-img {
  max-height: 300px;
  height: 250px;
  width: 300px;
  object-fit: cover;
}

/* ============================= */
/*       RESPONSIVE DESIGN       */
/* ============================= */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 2rem;
  }

  .card-body {
    padding: 1rem;
  }

  .alert {
    font-size: 0.875rem;
  }

  #search-bar {
    width: 250px;
  }

  .btn-text {
    display: none;
  }

  .btn-edit,
  .btn-delete {
    width: 50px;
    height: 50px; 
  }

  .recipe-img {
    width: 250px;
  }

  .recipe-title {
    width: 300px;
  }
}

@media (max-width: 576px) {
  .list-group-item input[type="checkbox"] {
    margin-right: 0.5rem;
  }

  .recipe-title {
    width: 100%;
  }
}