html {
  background-color: hsl(323.7, 53.8%, 98%);
}

*:not(h1, h2, h3, h4) {
  font-size: 16px;
}

* {
  box-sizing: border-box;
  accent-color: #881159;
}

textarea {
  min-width: 100%;
}

p,
u,
li {
  max-width: 600px;
  hyphens: auto;
  margin: 6px 0;
}

p {
  text-align: justify;
}

main {
  max-width: 620px;
  margin: 0 auto;
  background-color: white;
  padding: 24px;
  padding-top: 8px;
  box-shadow: 3px 4px 18px 0px #00000036;
  display: flex;
  flex-direction: column;
}

@media (max-width: 500px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
}

* {
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui,
    helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial,
    sans-serif;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman,
    Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji,
    Segoe UI Emoji, Segoe UI Symbol;
}

h1 {
  text-align: center;
  color: #881159;
}

h2 {
  font-weight: normal;
  font-size: 22px;
}

h2 a {
  font-weight: normal;
  font-size: 22px;
  font-family: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman,
    Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji,
    Segoe UI Emoji, Segoe UI Symbol;
}

a {
  color: #0074d9;
  hyphens: none;
}

a:visited {
  color: #b10dc9;
}

img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}

ul {
  padding-left: 1rem;
}

blockquote {
  background-color: #d9d9d9;
  padding: 0.5rem 1rem;
  float: right;
  max-width: 300px;
  font-style: italic;
  line-height: 19px;
  margin: 1rem;
  margin-right: 1rem;
  margin-right: -100px;
  box-shadow: 6px 6px 0px 1px black;
  hyphens: auto;

  @media (max-width: 800px) {
    margin-right: 1rem;
    float: none;
    max-width: none;
  }

  cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-style: normal;
    text-wrap: balance;
  }
}

label {
  display: block;
  margin-bottom: 0.5em;
}
textarea {
  width: 100%;
  height: 150px;
  margin-top: 0.5em;
}
fieldset {
  margin: 20px 0;
}

#townInputLabel {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc-size(auto);
  gap: 8px;
  flex-flow: row wrap;

  transition: opacity 200ms;
  opacity: 1;

  &.hidden {
    height: 0;
    margin: 0;
    opacity: 0;
  }
}

legend {
  font-weight: bold;
}

ol.alpha {
  counter-reset: list;

  & > li {
    list-style: none;
  }
  & > li:before {
    content: counter(list, lower-alpha) ") ";
    counter-increment: list;
  }
}

hr {
  border-width: 0.5px;
}

.header-logo {
  text-align: center;
  margin: 24px 0;
}

.photo-container {
  text-align: center;
  margin: 24px 0;
}

.main-text {
  width: 100%;
}

.entry-photo {
  max-width: 400px;
}

.logo {
  width: 100px;
}

.light-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin: 20px 0;
  width: 100%;
  justify-content: center;
}

.glightbox3 {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
}

.glightbox3 img {
  width: auto;
  height: auto;
}

input[type="text"] {
  padding: 8px;
}

textarea {
  padding: 4px;
}

*:focus-visible {
  outline: 2px solid #881159;
  border-color: transparent;
}

.copy-button {
  all: unset;
  cursor: pointer;
  width: 19px;
  height: 20px;
  flex-shrink: 0;
}

.inline-text-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  width: auto;
  width: auto;
}

.copy-button img {
  border-radius: 0;
}

.email-addresses-wrapper {
  display: flex;
  flex-flow: column;
}

.copy-emails-button {
  all: unset;
  cursor: pointer;
  width: 19px;
  height: 20px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: -16px;
}

.copy-emails-button img {
  border-radius: 0;
}

.textarea-header {
  display: flex;
  flex-flow: row;
  justify-content: space-between;
  align-items: center;
}

.send-buttons-info {
  font-style: italic;
  font-size: 14px;
  margin-bottom: 16px;
  display: inline-block;
}

input[type="submit"] {
  text-wrap-mode: wrap;
  background-color: #881159;
  color: white;
  border-radius: 8px;
  border: none;
  padding: 8px 16px;
  margin: 4px;
  cursor: pointer;
  font-size: 18px;
}

.buttons {
  display: flex;
  flex-flow: column;
  align-items: flex-end;
}

#email-addresses-table {
  color: white;
  padding: 16px 0;
}

#email-addresses-table td {
  font-family: monospace;
}

.recipient-name-wrapper,
.recipient-mail-wrapper {
  color: #111;
}

.recipient-name-wrapper {
  font-weight: bold;
}

.recipient-mail-wrapper {
  word-wrap: anywhere;
}

.template-option-label {
  display: flex;
  flex-flow: row;
  align-items: start;
  gap: 8px;
  margin-top: 16px;
}

.template-option-label .template-content {
  padding-top: 8px;
  display: block;
}

.input-error {
  border: 2px solid red;
}

.sending-options-list li:first-child {
  margin-bottom: 32px;
}

input[type="checkbox"] {
  transform: scale(1.5);
}

.tick-button-icon {
  display: none;
}

.copy-button-icon,
.tick-button-icon {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

@media (max-width: 600px) {
  h2 {
    font-size: 20px;
  }

  h2 a {
    font-size: 20px;
  }

  input[type="submit"] {
    padding: 8px 12px;
    font-size: 16px;
  }

  .buttons {
    margin-left: -10px;
  }

  .copy-button {
    width: 26px;
    margin-top: -10px;
  }

  .inline-text-button {
    width: auto;
  }

  .sending-options-list {
    padding-left: 10px;
  }

  #email-addresses-table {
    display: block;
  }

  #email-addresses-table tr {
    display: flex;
    flex-flow: column;
    padding-bottom: 8px;
  }

  .recipient-mail-wrapper {
    word-wrap: anywhere;
    margin-left: -8px;
  }

  .recipient-name-wrapper {
    margin-left: -8px;
  }
}

@media (prefers-color-scheme: dark) {
  html {
    color: #ddd;
    outline: 5px dashed #000;
    background: #111;
  }

  h1 {
    color: #ddd;
  }

  main {
    background: #111;
    box-shadow: none;
  }

  blockquote {
    background-color: #333;
    box-shadow: 6px 6px 0px 1px #737373;
  }
  input,
  textarea {
    background-color: #444;
    color: white;
    border: 1px solid #999;
  }

  input::placeholder,
  textarea::placeholder {
    color: #999;
  }

  #email-addresses-table {
    color: #111;
  }

  .recipient-name-wrapper,
  .recipient-mail-wrapper {
    color: #ddd;
  }

  .tick-button-icon,
  .copy-button-icon {
    filter: invert();
  }
}

@media (prefers-color-scheme: light) {
  html {
    color: #111;
  }

  fieldset {
    background-color: #f8f8f8;
  }
}
@media only screen and (max-width: 600px) {
}

details > summary {
  cursor: pointer;
  user-select: none;
}
