@font-face {
  font-family: 'Tapeworm';
  src: url('/font/Tapeworm.woff2') format('woff2'),
       url('/font/Tapeworm.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Departure Mono';
  src: url('/font/DepartureMono-Regular.woff2') format('woff2'),
       url('/font/Tapeworm.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --fg-primary: #363635ff; /* jet */
  --fg-accent-g: #9caf88ff; /* olivine */
  --fg-accent-r: #ffa69eff; /* melon */
  --fg-accent-b: #3fa7d6ff; /* picton blue */
  --bg-primary: #ffffff; /* white */
  --bg-secondary: #edeae3ff; /* alabaster */
}

html {
  /* Prevent scrollbar changes shifting content */
  scrollbar-gutter: stable;
  overflow: auto;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-family: 'Departure Mono';
  font-size: 18px;
  color: var(--fg-primary);
  background-color: var(--bg-primary);
}

.container {
  max-width: 900px;
  padding: 1em;
}

.TODO {
  background-color: var(--bg-secondary);
  padding: 1em;

  & span:before{
    content: '✅';
    margin-right: 1em;
  }
}

aside {
  background-color: var(--bg-secondary);
  padding: 0.25em 1em;

  h3 {
    font-size: 1em;
    font-weight: bold;

    &:before {
      content: '🙋‍♀️';
      margin-right: 1em;
    }
  }
}

h1 {
  font-family: Tapeworm;
  font-size: 3em;
  @media(width<=800px) {
    font-size: 2em;
  }

  & + .subtitle {
    font-family: Tapeworm;
    font-size: 1.4em;
    margin-top: -1.2em;
    margin-bottom: 1.2em;
    @media(width<=800px) {
      font-size: 1em;
    }
  }
}

a {
  color: var(--fg-accent-b);
  transition: all 0.25s ease-in-out;
  &:hover {
    filter: brightness(60%);
  }
}

.hero {
  max-width: 900px;
  width: 90vw;
  min-height: 300px;
  max-height: 675px;

  height: calc(90vw * 3 / 4);

  background-image: url(/img/cover.jpg);
  background-position: center;
  background-size: cover;
  text-align: left;
  align-content: end;
  color: var(--bg-primary);

  h1 {
    margin-left: 0.5em;
    margin-bottom: 0.25em;
  }
}

header {
  display: block;

  nav {
    ul {
      font-family: Tapeworm;
      list-style-type: none;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      padding: 0;

      li a {
        text-decoration: none;
        color: var(--fg-primary);

        &:hover {
          transform: translateY(-2em);
          color: var(--fg-accent-b);
          filter: none;
        }
      }
    }
  }
}

nav.home-link a {
  text-decoration: none;
  font-size: 0.8em;
  position: absolute;
  padding: 0.5em 1em;
  margin: 0.5em 1em;
  border: 1px solid var(--fg-primary);
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  transition: all 0.3s ease;
  top: 0;
  right: 0;

  &:hover {
    background-color: var(--fg-primary);
    color: var(--bg-primary);
  }
}

button {
  padding: 0.5em 1em;
  font-size: 1.2em;
  font-family: Tapeworm;
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  border: 2px solid #000;
  transition: all 0.3s ease;
  cursor: pointer;

  &:hover {
    background-color: var(--fg-primary);
    color: var(--bg-primary);
  }

  &:disabled {
    background-color: var(--bg-secondary);
    cursor: not-allowed;
  }
}

blockquote {
  border-left: 5px solid var(--fg-accent-g);
  background-color: var(--bg-secondary);
  padding: 1em;
  margin-left: 0;

}

/* ======================== */
/*  UNLOCK SPECIFIC STYLES  */
/* ======================== */

.unlock-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .password-field {
    display: flex;
    align-items: center;
  }

  .wrong-answer {
    display: block;
    text-align: left;
    padding: 1em 2em;
    border: 2px solid var(--fg-accent-r);
    color: var(--fg-accent-r);
  }

  input[name=unlock] {
    font-family: 'Departure Mono';
    line-height: 3em;
    width: 200px;
    border: 3px solid var(--fg-primary);
    padding: 0 1em;
  }

  button.unlock-button {
    font-family: 'Departure Mono';
    width: 2em;
    height: 2em;
    padding: 0;
    border: none;

    &:hover {
      padding-left: 0.5em;
      padding-right: -0.5em;
      border: none;
    }
  }
}

/* ======================== */
/*   RSVP SPECIFIC STYLES   */
/* ======================== */

.rsvp-field {
  display: flex;
  flex-direction: row;
  margin: 1em 0.5em;
  align-items: center;
  gap: 15px;

  @media(width <= 800px) {
    flex-direction: column;
    padding: 0 1em;
  }

  label {
    @media(width > 800px) {
      flex: 0 0 150px;
    }

    @media(width <= 800px) {
      width: 100%;
    }
  }

  input {
    @media(width > 800px) {
      flex: 1;
    }

    @media(width <= 800px) {
      width: 100%;
    }
  }
}

input[type=text], input[type=number] {
  padding: 1em;
}

input[type="radio"] {
  display: none;
}

.button-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;

  @media(width <= 800px) {
    gap: 0;
  }
}

.rsvp-option {
  label {
    display: block;
    position: relative;
    overflow: hidden;
    text-align: center;
    align-content: end;
    width: 400px;
    height: 300px;
    cursor: pointer;
    border: 4px dashed var(--bg-secondary);
    border-radius: 15px;
    color: var(--bg-primary);
    font-family: Impact;
    font-size: 72px;
    transition: all 0.3s ease;

    @media(width <= 800px) {
      width: 180px;
      height: 135px;
      font-size: 36px;
    }

    @media(width <= 400px) {
      width: 160px;
      height: 120px;
    }

    @media(width <= 360px) {
      width: 150px;
      height: 112.5px;
    }

    &::before {
      content: '';
      filter: grayscale(100%) brightness(0.1);
      background-size: cover;
      background-position: center;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      transition: all 0.3s ease;
      z-index: -1;
    }

    &:hover {
      &::before {
        filter: grayscale(50%) brightness(1.0);
      }
    }
  }

  input[type="radio"] {
    &:checked + label {
      border-color: var(--fg-accent-r);
      transform: scale(1.02);

      &::before {
        filter: grayscale(0%) brightness(1.0);
      }
    }
  }
}

.yes-option label::before {
  background-image: url('/img/YES.png');
}

.no-option label::before {
  background-image: url('/img/NO.png');
}

body:has(#yes:not(:checked)) .conditional-yes,
body:has(#no:not(:checked)) .conditional-no {
  display:none;
}

.guest-list {
  @media(width<=800px) {
    align-items: flex-start;
  }

  label {
    align-self: flex-start;
    padding-top: 0.5em;
  }

  .guest-names-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .guest-name-field {
    display: flex;
    flex-direction: row;
    margin-bottom: 0.25em;

    input {
      @media(width<=800px) {
        width: 75%;
      }
    }
  }

  .add-guest-btn {
    line-height: 1.8em;
    font-size: 0.8em;
    font-family: "Departure Mono";
    align-self: flex-start;
  }

  .remove-guest-btn {
    line-height: 1.8em;
    font-size: 0.8em;
    font-family: "Departure Mono";
    font-weight: bold;
    border: none;
  }
}

.rsvp-stacked-options {
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: stretch;
}

.rsvp-stacked-option {
  width: 100%;

  input[type="radio"] {
    & + label {
      width: 100%;
      transition: all 0.5s ease;
      cursor: pointer;
      user-select: none;
      text-align: center;
      padding: 0.5em 1em;
      margin: 0;

      &::before, &::after {
        transition: margin 0.5s ease;
      }

      &::before {
        margin-right: 1.2em;
        margin-left: 0;
        content: '👉';
      }

      &::after {
        margin-left: 1.2em;
        margin-right: 0;
        content: '👈';
      }

      &:hover {
        background: var(--bg-secondary);

        &::before {
          margin-right: 0.6em;
          margin-left: 0.6em;
        }

        &::after {
          margin-left: 0.6em;
          margin-right: 0.6em;
        }
      }
    }

    &:checked {
      & + label {
        background: var(--fg-accent-g);

        &::before, &::after {
          content: attr(data-icon);
        }
      }
    }
  }
}

/* -------------- *
 *    FUNTIMES    *
 * -------------- */

#donotclick {
  font-size: 0.8em;
  position: absolute;
  padding: 0.5em 1em;
  margin: 0.5em 1em;
  border: 1px solid var(--fg-primary);
  background-color: var(--bg-primary);
  color: var(--fg-primary);
  transition: all 0.3s ease;
  cursor: not-allowed;
  top: 0;
  right: 0;

  &:hover {
    background-color: var(--fg-primary);
    color: var(--bg-primary);
  }
}

#dnc-modal {
  position: fixed;
  top: -100vh;
  width: 100vw;
  height: 100vh;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-primary);
  color: var(--fg-primary);
  font-size: 1.5em;
  transition: top 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: not-allowed;
  display: flex;
  opacity: 0;
  justify-content: center;
  align-items: center;
  text-align: center;

  span {
    color: var(--bg-primary);
    transition: color 0.5s ease-in;
    transition-delay: 1.5s;
  }

  &.modal_display {
    top: 0;
    opacity: 1;
    span {
      color: var(--fg-primary);
    }
  }
}

/* ------------ *
 *  EVENT PAGE  *
 * ------------ */
#map {
  height: calc(90vw * 3 / 4);
  min-height: 300px;
  max-height: 450px;
  margin-bottom: 0.5em;
  border: 5px var(--fg-accent-g) dashed;
}

address {
  font-style: normal;
}

li.icon-calendar {
  list-style-type: '📅';
  padding-left: 0.5em;
}

li.icon-clock {
  list-style-type: '🕖';
  padding-left: 0.5em;
}

li.icon-map {
  list-style-type: '🗺️';
  padding-left: 0.5em;
}

.event-info {
  time { color: var(--fg-primary); }
  padding-left: 1.25em;
}

time {
  color: var(--fg-accent-g);
}
