::-moz-selection {
  background-color: #D8A068;
  color: #0F202E;
}

::selection {
  background-color: #D8A068;
  color: #0F202E;
}

body {
  margin: 0;
  padding-top: 5rem;
  box-sizing: border-box;
  background-color: #F5EEE1;
  color: #0F202E;
  font-family: "Playfair Display", serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.heading {
  position: static;
  border: 0.2rem solid #D8A068;
  background-color: #0F202E;
  color: #F5EEE1;
  margin-block-start: 0;
  margin-block-end: 0;
  padding: 1rem;
  border-radius: 0 0 15px 0;
  z-index: 9;
}

.headingMenu {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9;
}

.heading {
  cursor: pointer;
}

.heading:hover,
.heading:focus-visible,
.headingMenu.menuOpen .heading {
  background-color: #D8A068;
  color: #0F202E;
}

.pageMenu {
  position: absolute;
  left: 0;
  top: 100%;
  width: max-content;
  min-width: 100%;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 0.5rem;
  border: 1px solid #0F202E;
  background-color: #F5EEE1;
  font-family: Arial, Helvetica, sans-serif;
}

.menuFilterDefs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
}

.menuHighlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background-color: #D8A068;
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: url("#gooeyMenuFilter");
  transition: left 0.32s cubic-bezier(0.2, 1.4, 0.4, 1), top 0.32s cubic-bezier(0.2, 1.4, 0.4, 1), width 0.32s cubic-bezier(0.2, 1.4, 0.4, 1), height 0.32s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.1s ease;
}

.menuHighlight.visible {
  opacity: 1;
}

.pageMenu a {
  display: block;
  position: relative;
  z-index: 1;
  width: max-content;
  color: #0F202E;
  text-decoration: none;
}

.pageMenu a div {
  padding: 0.5rem 0.75rem;
}

.pageMenu a + a {
  margin-top: 0.35rem;
}

.pageMenu a[aria-current=page] div {
  color: #0F202E;
  font-weight: 700;
}

.pageMenu a[aria-current=page]:hover div,
.pageMenu a[aria-current=page]:focus-visible div {
  background-color: transparent;
  color: #0F202E;
}

#settingsBtn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  max-width: none;
  font-size: 1.2rem;
}

#settingsModal {
  width: min(30rem, 85vw);
  border: 0.15rem solid #0F202E;
  border-radius: 5px;
  background: #F5EEE1;
  color: #0F202E;
  font-family: "Playfair Display", serif;
}

#settingsModal::backdrop {
  background: rgba(15, 32, 46, 0.45);
}

.settingsHeader,
.newNoteType > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settingsHeader h2 {
  margin: 0;
}

.iconButton {
  max-width: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.4rem;
}

#settingsModal fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  border: 0.1rem solid #0F202E;
}

#noteTypeSettings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 0.5rem;
}

#noteTypeSettings label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.deleteNoteTypeBtn {
  margin-left: auto;
  width: 1.4rem;
  height: 1.4rem;
  max-width: none;
  padding: 0;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 0.1rem solid #0F202E;
  background-color: transparent;
  color: #0F202E;
}

.deleteNoteTypeBtn:hover,
.deleteNoteTypeBtn:focus-visible {
  background-color: #c0564a;
  border-color: #c0564a;
  color: #F5EEE1;
}

#settingsModal input[type=checkbox] {
  width: auto;
  margin: 0 0.35rem 0 0;
  accent-color: #0F202E;
  cursor: pointer;
}

#settingsModal input[type=checkbox]:focus-visible {
  outline: 0.15rem solid #0F202E;
  outline-offset: 0.15rem;
}

#settingsModal input[type=checkbox]:active {
  transform: scale(0.9);
}

#settingsModal label,
#settingsModal button {
  cursor: pointer;
}

#newNoteTypeInput {
  width: 100%;
  box-sizing: border-box;
}

#addNoteTypeBtn {
  max-width: none;
  padding: 0.35rem 0.75rem;
  font-size: 1rem;
}

.settingsActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.settingsActions button {
  max-width: none;
  padding: 0.45rem 0.7rem;
  font-size: 0.95rem;
}

#fileNoteForm {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  gap: 1rem;
  width: 90%;
}

.formParts {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 5rem;
}

.formParts > div {
  width: 100%;
}

.callDirection {
  display: flex;
  justify-content: center;
  gap: 1rem;
  grid-column: 2;
  width: min(100%, 25.5rem);
}

.callControls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 4.1rem;
  width: 100%;
}

.callDirectionBtn {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  padding: 0.65rem 1rem;
}

input,
textarea {
  font-family: "Playfair Display", sans-serif;
  border: none;
  background-color: #F5EEE1;
  border-bottom: 0.25vh solid #0F202E;
  margin-top: 1vh;
  outline: none;
  cursor: text;
  font-size: 1rem;
}

textarea {
  border: 0.1rem solid #0F202E;
  font-size: 1rem;
}

button {
  max-width: 50%;
  cursor: pointer;
  border: 0.25vh solid #0F202E;
  background-color: #0F202E;
  color: #F5EEE1;
  transition-duration: 150ms;
  border-radius: 5px;
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
}

#noteTypeContainer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  font-size: 1.5rem;
  width: auto;
}

#otherInput {
  height: 100%;
  width: 100%;
  margin-top: 0;
}

.noteTypeDiv {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  padding: 0.5rem;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
  border-bottom: 0.25vh solid transparent;
  transition-duration: 150ms;
}

.noteTypeDiv:hover {
  border-color: #0F202E;
}

.availSelect {
  text-align: center;
  padding: 0.5rem;
  cursor: pointer;
  transition-duration: 150ms;
  border-bottom: 0.25vh solid transparent;
}

.availSelect:hover {
  border-color: #0F202E;
}

.active {
  background-color: #c0564a;
  border-bottom: 0.25vh solid #0F202E;
}

.noteTypeDiv.active {
  background-color: #D8A068;
  color: #0F202E;
}

.callDirectionBtn.active {
  background-color: #F5EEE1;
  border: 0.25vh solid #0F202E;
  color: #0F202E;
}

.inputs * {
  display: flex;
  flex-direction: column;
  margin-top: 0.88rem;
}

.inputs .callDirection {
  flex-direction: row;
  width: 100%;
  margin-top: 0;
}

.inputs .callDirectionBtn {
  flex-direction: row;
  margin-top: 0;
}

.inputs input[type=radio][hidden] {
  display: none;
}

.setTime {
  flex-direction: row;
  width: 100%;
}

.setTime input {
  width: 100%;
}

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

input::-webkit-datetime-edit-day-field:focus,
input::-webkit-datetime-edit-month-field:focus,
input::-webkit-datetime-edit-year-field:focus,
input::-webkit-datetime-edit-ampm-field:focus,
input::-webkit-datetime-edit-hour-field:focus,
input::-webkit-datetime-edit-minute-field:focus {
  background-color: #c0564a;
  color: #0F202E;
  outline: none;
}

label {
  padding-right: 1rem;
}

.availability {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  grid-column: 3;
  justify-self: start;
}

.availability[hidden] {
  display: none;
}

.button {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btnHolder {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

#downloadBtn,
#copyBtn {
  padding: 1rem;
  width: 100%;
}

button[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .formParts {
    flex-direction: column;
    gap: 1rem;
  }
  #noteTypeContainer {
    font-size: 1.15rem;
  }
  .callControls {
    grid-template-columns: 1fr;
    min-height: 8.2rem;
  }
  .callDirection,
  .availability {
    grid-column: 1;
  }
  .availability {
    justify-self: center;
  }
  .btnHolder {
    flex-direction: column;
  }
  #downloadBtn,
  #copyBtn {
    max-width: none;
  }
}
@media (orientation: portrait) {
  .inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  .inputs .setTime {
    align-items: flex-end;
  }
  .inputs .setTime input,
  .inputs .setTime button {
    margin-top: 0;
  }
  .inputs .date {
    display: grid;
    grid-template-rows: auto 1fr;
  }
  .inputs .date input {
    align-self: end;
    width: 100%;
  }
  .formParts {
    flex-direction: column;
    gap: 1rem;
  }
  #noteTypeContainer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .noteTypeDiv {
    flex: initial;
    width: auto;
  }
  #otherInput {
    grid-column: auto;
    width: auto;
    height: auto;
  }
  .callControls {
    grid-template-rows: 4.1rem 3.1rem;
    min-height: 7.2rem;
  }
  .callDirection {
    grid-row: 1;
    justify-self: center;
    margin-inline: auto;
  }
  .availability {
    grid-row: 2;
    grid-column: 1/-1;
    justify-self: center;
  }
  .availability[hidden] {
    display: flex;
    visibility: hidden;
    pointer-events: none;
  }
}
#downloadIndicator {
  display: none;
  font-family: "Playfair Display", serif;
  padding: 1rem;
  color: #0F202E;
  border-radius: 5px;
  margin-top: 1rem;
  aspect-ratio: 1/1;
  text-align: center;
}

#saveToast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 5px;
  background-color: #0F202E;
  color: #F5EEE1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

#saveToast.visible {
  opacity: 1;
  transform: translateY(0);
}
