/* Inter font support */
:root,
textarea {
  font-family: Inter, sans-serif;
  font-feature-settings:
    "liga" 1,
    "calt" 1; /* fix for Chrome */
}
@supports (font-variation-settings: normal) {
  :root {
    font-family: InterVariable, sans-serif;
  }
}

/* Color scheme *.container */

:root {
  --color-bg: #f1f7ee;
  --color-text: #111111;
  --color-primary: #92aa83;
  --color-secondary: #7b1e7a;
  --color-border: #b33f62;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #121212;
    --color-text: #f5f5f5;
    --color-primary: #92aa83;
    --color-secondary: #f9564f;
    --color-border: #b33f62;
  }
}

body {
  font-size: 16px;
  background-color: var(--color-bg);
}
menu {
  padding: 0;
}

.container {
  max-width: 64rem;
  margin: 1rem auto;
  display: grid;
  grid-template-areas:
    "header main"
    "footer footer";
  grid-template-columns: 1fr 3fr; /* Adjusts the width of header and main */
  grid-template-rows: 1fr auto; /* Ensures footer stays at the bottom */
  height: calc(100vh - 2rem); /* Full viewport height */
}

@media (max-width: 768px) {
  .container {
    grid-template-areas:
      "header"
      "main"
      "footer";
    grid-template-columns: 1fr; /* Single column layout */
    grid-template-rows: auto 1fr auto;
  }
}

a {
  color: var(--color-text);
  border-bottom: thin solid var(--color-primary);
  text-decoration: none;
  &:hover {
    border-bottom: thin solid var(--color-secondary);
  }
}

button {
  font-size: 1rem;
  color: var(--color-bg);
  background-color: var(--color-primary);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}

header {
  grid-area: header;
  h1 {
    font-size: 2rem;
    margin-bottom: 0 0 1rem;
    a {
      border: none;
      color: var(--color-primary);
      &:hover {
        border: none;
        color: var(--color-secondary);
      }
    }
  }
  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  a {
    text-decoration: none;
  }
}

main {
  grid-area: main;
}

footer {
  grid-area: footer;
}

form {
  fieldset {
    background-color: color-mix(in hsl, var(--color-primary) 12%, transparent);
    border: thin solid color-mix(in hsl, var(--color-primary) 25%, transparent);
    border-radius: 0.5rem;
    padding: 0.5rem;
  }
  label {
    display: block;
    color: var(--color-primary);
    text-transform: uppercase;
    padding: 0.5rem 0.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    input,
    textarea {
      margin-top: 0.25rem;
      margin-left: -0.25rem;
      display: block;
      width: calc(100% - 0.75rem);
    }
  }
  input,
  textarea {
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: thin solid color-mix(in hsl, var(--color-primary) 50%, transparent);
  }
}

.calendar {
  thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 50%;
    padding-bottom: 0.25rem;
  }
  td {
    text-align: center;
  }
  a {
    display: block;
    padding: 0.25rem;
    border: none;
    border-radius: 0.25rem;
    background-color: color-mix(in srgb, var(--color-text) 10%, transparent);
    &:hover {
      background-color: color-mix(in srgb, var(--color-text) 20%, transparent);
    }
  }
  .active a {
    background-color: var(--color-border);
    color: white;
  }
}
