:root {
  --primary: #44825C;
  --primary-hover: #569C72;
  --white: #ffffff; 
  --grey-50: #F8F8F8;
  --grey-100: #E1E1E1;
  --grey-200: #B1B1B1;
  --grey-300: #9E9E9E;
  --grey-400: #7E7E7E;
  --grey-500: #626262;
  --grey-600: #515151;
  --grey-700: #3B3B3B;
  --grey-800: #222222;
  --red-100: #FACDCD;
  --red-200: #F29B9B;
  --red-300: #E66A6A;
  --red-400: #D64545;
  --red-500: #BA2525;
  --indigo-050: #E0E8F9;
  --indigo-400: #647ACB;

}

::placeholder {
  color: var(--grey-500);
  opacity: 1; /* Firefox */
}

body {
  font-family: "Lato", sans-serif;
  color: #000000;
  background-color: var(--grey-50);
  margin: 24px 24px 0;
  }

h3 {
  color: var(--primary);
  margin: 0;
}

h1 {
  margin: 0;
}

h2 {
  margin: 0;
}

p {
  margin: 0
}

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

.toast {
  padding: 10px;
  border-left: solid 2px;
}

.toast-success {
  background-color: var(--indigo-050);
  border-color: var(--indigo-400);
  color: var(--indigo-400);
}

.quote-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: inline-flex;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0px 1px 2px #F3F3F4;
}

.primary-btn {
  background-color: var(--primary);
  color: white;
  border: none;
}

.primary-btn:hover {
  background-color: var(--primary-hover);
}

.secondary-btn {
  background-color: white;
  color: var(--grey-600);
  border: 1px solid var(--grey-200)
}

.secondary-btn:hover {
  background-color: var(--grey-50);
}

.quick-action-btn {
  padding: 5px 10px;
  border-radius: 50px;
}

.delete-link {
  color: var(--red-400);
  transition: 0.15s;
}

.delete-link:hover {
  color: var(--red-500);
}

.main-container {
  max-width: 1260px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.header-section {
  display: flex;
  flex-wrap: wrap;
  column-gap: 50px;
  row-gap: 10px;
  align-items: end;
  justify-content: space-between;
}

.main-body {
  display: flex;
  flex-direction: column;
  gap: 15px;;
}

.quotes-header {
  display: flex;
  flex-wrap: wrap;
  column-gap: 40px;
  row-gap: 15px;
  justify-content: space-between;
}

.title-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.all-quotes {
  column-count: 3;
  column-gap: 20px;
}

.search-bar {
  flex-grow: 1;
  max-width: 400px;
}

.search-bar input {
  background-image: url('assets/search.png');
  background-position: 15px 8px; 
  background-repeat: no-repeat; 
  background-size: 20px;
  width: 100%;
  border-radius: 50px;
  padding: 10px 20px 10px 45px;
  border: 1px solid var(--grey-200);
  font-size: 1rem;
  box-sizing: border-box;
}

.quote {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  padding: 30px;
  background-color: white;
  border-radius: 10px;
  box-sizing: border-box;
}

@media only screen and (max-width: 1200px) {
  .all-quotes {
    column-count: 2;
  }
}

@media only screen and (max-width: 768px) {
  .all-quotes {
    column-count: 1;
    padding: 0;
    margin: 0 auto;
  }
  
  .quote {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .search-bar {
    max-width: 100%;
  }
}

.quote-body {
  font-family: "Libre Baskerville", sans-serif;
  border-left: 2px solid #44825c59;
  padding-left: 12px;
}

.quote-footer {
  padding-left: 12px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.author-book {
  color: var(--primary);
  display: flex;
  flex-direction: column;
}

.icon-edit {
  height: 26px;
  fill: var(--grey-300);
  transition: 0.15s;
  cursor: pointer;
}

.icon-edit:hover {
  fill: var(--grey-400)
}

.quote-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.quote-page.has-image {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.quote-form {
  width: 100%;
}

.quote-form fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-form-field {
  padding: 15px;
  font-size: 16px;
  width: 100%;
  border-radius: 5px;
  border: 1px solid var(--grey-200);
  box-sizing: border-box;
}

.form-field-text-area {
  padding-bottom: 175px;
}

.quote-form-field::placeholder {
  color: var(--grey-300);
  opacity: 1; /* Firefox */
}

.field-is-invalid {
  border: 1px solid var(--red-200);
  box-shadow: 0px 0px 6px var(--red-100);
}

.invalid-message {
  color: var(--red-400);
  margin-top: 5px;
  margin-bottom: 8px;
}

.form-btns {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.form-btns-cancel-save {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.quote-img-container {
  height: 100%;
  max-height: 500px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--grey-200);
}

.quote-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  border: none;
}

@media only screen and (max-width: 768px) {
  .quote-page, .quote-page.has-image {
    grid-template-columns: 1fr;
  }

  .quote-img-container {
    max-width: 350px;
    margin: 0 auto;
    max-height: none;
    overflow-y: visible;
  }
}