@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
@import url("https://cdn.jsdelivr.net/npm/@catppuccin/palette/css/catppuccin.css");

body {
  background-color: var(--ctp-mocha-base);
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

body.light {
  background-color: var(--ctp-latte-base);
}

h1 {
  margin: 0;
  line-height: 1em;
  color: var(--ctp-mocha-lavender);
  cursor: pointer;
}

body.light h1 {
  color: var(--ctp-latte-lavender);
}

* {
  font-family: "Open Sans";
  color: var(--ctp-mocha-text);
}

body.light * {
  color: var(--ctp-latte-text);
}

.color-pig {
  border-color: var(--ctp-mocha-pink);
}

body.light .color-pig {
  border-color: var(--ctp-latte-pink);
}

.color-beef {
  border-color: var(--ctp-mocha-red);
}

body.light .color-beef {
  border-color: var(--ctp-latte-red);
}

.color-poultry {
  border-color: var(--ctp-mocha-maroon);
}

body.light .color-poultry {
  border-color: var(--ctp-latte-maroon);
}

.color-fish {
  border-color: var(--ctp-mocha-blue);
}

body.light .color-fish {
  border-color: var(--ctp-latte-blue);
}

.color-vegetarian {
  border-color: var(--ctp-mocha-peach);
}

body.light.color-vegetarian {
  border-color: var(--ctp-latte-peach);
}

.color-vegan {
  border-color: var(--ctp-mocha-green);
}

body.light .color-vegan {
  border-color: var(--ctp-latte-green);
}

.dish {
  display: flex;
  flex-direction: column;
}

.dish-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;

  background-color: var(--ctp-mocha-surface0);

  border-radius: 15px;
  border-style: solid;
}

body.light .dish-card {
  background-color: var(--ctp-latte-surface0);
}

.rating-row {
  margin-top: 5px;
  display: flex;
  align-self: flex-end;
}

.rating-icon {
  font-size: 1.1em;
}

button.rated {
  border: 3px solid var(--ctp-mocha-lavender);
}

body.light button.rated {
  border-color: var(--ctp-latte-lavender);
}

.dish-name {
  margin: 0;
  flex-grow: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  font-family: sans-serif;
}

.symbol-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 30px;
}

.diet-icon {
  cursor: help;

  position: relative;
  background: none;
  border: none;
  font-size: 24px;
  padding: 0;
  outline: none;
}

.diet-icon:focus {
  font-size: 28px;
}

.diet-icon::before {
  content: attr(aria-label);
  position: absolute;
  display: inline-block;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  background-color: var(--ctp-mocha-surface1);
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 5px 5px 5px #222;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out;
  z-index: 1;
}

body.light .diet-icon::before {
  background-color: var(--ctp-latte-surface1);
}

.diet-icon:focus::before {
  opacity: 1;
  visibility: visible;
}

hr {
  width: 100%;
}

main {
  margin: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  flex-grow: 1;
}

.day-menu {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.date-container {
  font-size: 1.5em;
  display: flex;
  gap: 10px;
}

.date-container a {
  text-decoration: none;
}

footer {
  margin-top: 20px;
  background-color: var(--ctp-mocha-surface0);

  padding: 5px 10px;
}

body.light footer {
  background-color: var(--ctp-latte-surface0);
}

footer img {
  height: 1em;
}

footer p {
  margin: 0;
}

.date {
  text-wrap: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 700px) {
  footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
  }
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 5px 10px;

  background-color: var(--ctp-mocha-surface0);
  box-shadow: 0 5px 5px #222;

  display: flex;
}

body.light header {
  background-color: var(--ctp-latte-surface0);
  box-shadow: 0 5px 5px #666;
}

.tools {
  margin-left: auto;
}

main {
  margin-top: 70px;
}

hgroup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

hgroup p {
  margin: 0;
  align-self: flex-end;
}

h1 {
  font-size: 4em;
}

button {
  border-radius: 5px;
  padding: 5px 10px;
  border-color: var(--ctp-mocha-mantle);
  background-color: var(--ctp-mocha-surface0);
  cursor: pointer;
}

body.light button {
  border-color: var(--ctp-latte-mantle);
  background-color: var(--ctp-latte-surface0);
}

button:disabled {
  background-color: var(--ctp-mocha-surface2);
  cursor: not-allowed;
}

body.light button:disabled {
  background-color: var(--ctp-latte-surface2);
}

#theme-toggle {
  top: 20px;
  right: 20px;
  border: 0;
}
