:root {
  color-scheme: light dark;
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

/*
[data-theme="light"], :root:not([data-theme]) {
  --page-fore-color: #242424;
  --page-back-color: #cad3c5;
  --link-text-color: #22660f;
  --link-visited-color: #2d2d2d;
  --item-title-color: #000000;
  --ticket-fore-color: #ffffff;
  --ticket-back-color: #55714c;
  --image-border-color: #313131;
  body { font-weight: 400; }
  h2 { font-weight: 300; }
}
*/

[data-theme="light"], :root:not([data-theme]) {
  --page-fore-color: #d6e2d1;
  --page-back-color: #252f22;
  --link-text-color: #ffffff;
  --link-visited-color: #d6e2d1;
  --item-title-color: #ffffff;
  --item-title-color: #e6ede4;
  --ticket-fore-color: #000000;
  --ticket-back-color: #ffffff;
  --image-border-color: #ffffff;
  body { font-weight: 300; }
  h2 { font-weight: 200; }
}

[data-theme="dark"] {
  --page-fore-color: #d6e2d1;
  --page-back-color: #252f22;
  --link-text-color: #ffffff;
  --link-visited-color: #d6e2d1;
  --item-title-color: #ffffff;
  --item-title-color: #e6ede4;
  --ticket-fore-color: #000000;
  --ticket-back-color: #ffffff;
  --image-border-color: #ffffff;
  body { font-weight: 300; }
  h2 { font-weight: 200; }
}

/* duplicate of the dark values */
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  --page-fore-color: #d6e2d1;
  --page-back-color: #252f22;
  --link-text-color: #ffffff;
  --link-visited-color: #d6e2d1;
  --item-title-color: #e6ede4;
  --ticket-fore-color: #000000;
  --ticket-back-color: #ffffff;
  --image-border-color: #ffffff;
  body { font-weight: 300; }
  h2 { font-weight: 200; }
}}

/* Dark mode logo color */
header .home-link.graphic img {
  filter: brightness(0) invert(1);
}
[data-theme="dark"] header .home-link.graphic img {
  filter: brightness(0) invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) header .home-link.graphic img {
    filter: brightness(0) invert(1);
  }
}

html {
  margin: 0;
}

body {
  margin: 0;
  padding: 0;
  color: var(--page-fore-color);
  background-color: var(--page-back-color);
  font-family: 'Merriweather', serif;
}

h1 {
  color: var(--item-title-color);
  font-size: 2.0rem;
  margin-block-start: 0;
  margin-block-end: 3rem;
  text-align: center;
}

h2 {
  font-size: 2.0rem;
  margin-block-start: 1rem;
  margin-block-end: 3rem;
  text-align: center;
}

p {
  font-size: 1.1rem;
  line-height: 1.7;
}

strong {
  font-weight: 700;
}

a {
  color: var(--link-text-color);
  text-decoration-thickness: 0.04em;
  text-underline-offset: 4px;
}

img {
  width: 100%;
}

a:visited {
  color: var(--link-visited-color);
}

.favorite-toggle {
  display: none;
}

.flat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 80px;
}

.flat-list .list-item {

  margin-bottom: 50px;

  a {
    color: inherit;
  }

  h3 {
    font-size: 1.75rem;
    margin-block-start: 12px;
    margin-block-end: 12px;
  }

  h3 a {
    color: var(--item-title-color);
  }

  .image img {
    border-color: var(--image-border-color);
    border-width: 4px;
    border-style: solid;
    border-radius: 10px;
    width: calc(100% - 8px);
  }

  .listing {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    align-items: start;
  }

  .listing > div {
    grid-column: 1;
  }

  .listing > div.ical {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: start;
    font-size: 2.25rem;
    margin-right: 10px;
  }

  .message {
    font-size: 1.0rem;
    margin-bottom: 10px;
  }

  .time {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2px;
  }

  .date {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 3px;
  }

  .place-name {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .place-addr {
    margin-top: 10px;
    font-size: 1.0rem;
  }

  .ticketing {
    margin-top: 25px;
    .ticket-icon {
      display: none;
    }
  }

  a.ticket-link {
    display: inline-block;
    font-size: 1.15rem;
    border-radius: 5px;
    padding: 10px 20px;
    color: var(--ticket-fore-color);
    background-color: var(--ticket-back-color);
    text-decoration: none;
  }

  .description {
    display: none;
  }

}

/* Mobile: single column layout */

header {

  margin-top: 30px;

  & .layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  & .first {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  & .home-link.graphic img {
    max-width: 150px;
    height: auto;
  }

  & .home-link.text {
    display: none;
  }

  & .second .links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 10px 20px;
    column-gap: 15px;
    row-gap: 5px;
    font-size: 1.2rem;
    font-weight: 300;
  }

  & .second .links a {
    color: var(--page-fore-color);
    text-decoration: none;
  }

  & .second .links a:hover {
    text-decoration: underline;
  }

  & .second .options {
    margin-top: 20px;
  }

  & .second .options .color-mode-chooser {
    font-size: 25px;
  }

  & .second .color-mode-chooser {
    display: none;
  }

}

main {
  margin: 0 15px;
}

main.item {

  padding-bottom: 100px;
  margin-left: 10px;
  margin-right: 10px;

  a.ticket {
    display: inline-block;
    font-size: 1.15rem;
    border-radius: 5px;
    padding: 10px 20px;
    color: var(--ticket-fore-color);
    background-color: var(--ticket-back-color);
    text-decoration: none;
  }

  .tickets-row {
    margin-bottom: 15px;
  }

  .listing-when {
    display: inline-flex;
    flex-direction: column-reverse;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    gap: 2px;
  }

  .pricing {
    font-size: 1.1rem;
    /* font-weight: 300; */
    margin-bottom: 2px;
  }

  .place-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
  }

  .place-addr {
    margin-top: 2px;
    font-size: 1.0rem;
  }

  .place-addr a {
    color: inherit;
  }

  .descriptions {
    margin-top: 40px;
  }

  .descriptions p {
    margin-right: 30px;
  }

}

.youtube-container
{
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;

  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
}

footer {
}

/* Desktop: two column layout */

@media (min-width: 768px) {

  body {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
  }

  main {
    grid-column: 2;
    grid-row: 1;
    margin: 60px 0;
  }

  footer {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  h1 {
    font-size: 2.5rem;
    margin-block-start: 4rem;
    margin-block-end: 3rem;
    text-align: inherit;
  }

  header {
    grid-column: 1;
    grid-row: 1;
    padding: 40px 30px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;

    & .layout {
      display: flex;
      flex-direction: column;
      padding-left: 10px;
      gap: 30px;
    }

    & .first {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;
    }

    & .home-link.graphic img {
      max-width: 180px;
      height: auto;
    }

    & .second .links {
      display: inline-flex;
      flex-direction: column;
      row-gap: 18px;
      margin: 0 10px;
      font-size: 24px;
    }

    & .second .options {
      margin-top: 30px;
      margin-left: 10px;
    }

    & .second .color-mode-chooser {
      /* display: inherit; */
      /* color: inherit; */
    }

  }

}
