body[data-loaded] #hero div.bg-container {
  opacity: 1;
}

a {
  text-decoration: none;
  transition: color 0.23s;
}

button.busy span::before {
  animation-play-state: running;
  opacity: 1;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#how-it-works {
  background: linear-gradient(0deg, color-mix(in oklab, transparent 65%, var(--how-it-works-bg-color)), var(--how-it-works-bg-color));
  color: var(--how-it-works-color);

  h2 {
    color: var(--how-it-works-h2-color);
  }

  > div > div {
    display: flex;
    gap: var(--gap);

    > ul {
      flex: 1;
    }

    div.preview {
      > img {
        display: block;
        width: calc(100% + 2rem);
        height: auto;
        margin: 0 -1rem;
      }
    }
  }

  ul {
    --gap: 2rem;
    list-style: none;
    padding: 0;
    counter-reset: how-it-works 0;
    display: flex;
    gap: var(--gap);
    flex-wrap: wrap;
    justify-items: center;

    li {
      position: relative;
      margin: 0;

      &::before {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        font-style: normal;
        font-weight: bold;
        color: var(--how-it-works-list-marker-color);
        font-weight: 400;
        counter-increment: how-it-works;
        content: counter(how-it-works);
        background: var(--how-it-works-list-marker-bg);
      }

      h3 {
        color: var(--how-it-works-h3-color);
      }

      p {
        opacity: var(--how-it-works-text-opacity);
      }
    }
  }
}

#features {
  background: var(--features-bg);
  color: var(--features-color);

  h2 {
    color: var(--features-h2-color);
  }

  &::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: 50% / 100px var(--features-tile-bg);
    z-index: -1;
  }

  ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-items: center;

    li {
      --border-radius: var(--box-radius);
      position: relative;
      padding: 1.5rem;
      margin: 0;
      flex: 1 calc(50% - 2rem);
      background: var(--features-li-bg);

      > h3 {
        line-height: 1.35em;
        color: var(--features-h3-color);
      }
    }
  }
}

@media all and (max-width: 767px) {
  #features {
    ul {
      gap: 0;

      > li {
        border: var(--features-li-border);
        border-bottom: none;

        &:first-child {
          border-top-left-radius: var(--border-radius);
          border-top-right-radius: var(--border-radius);
        }

        &:last-child {
          border-bottom: var(--features-li-border);
          border-bottom-left-radius: var(--border-radius);
          border-bottom-right-radius: var(--border-radius);
        }
      }
    }
  }
}

@media all and (min-width: 768px) {
  #features {
    ul {
      gap: 2rem;

      > li {
        border: var(--features-li-border);
        border-radius: var(--border-radius);
      }
    }
  }
}

#comparison table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-collapse: collapse;

  tr {
    &:nth-child(1) {
      th {
        font-weight: 400;
        border-bottom: 2px solid;
        padding: 0 0.3rem 0.5rem;

        &:nth-child(1) {
          text-align: left;
        }
      }
    }
  }

  > tbody {
    tr {
      td {
        padding: 0.3rem 0;
        line-height: 1.55rem;
        border-top: 1px solid color-mix(in oklab, var(--color-text) 30%, transparent);
      }

      &:nth-child(1) {
        > td {
          padding-top: 0.5rem;
        }
      }
    }
  }

  span {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    position: relative;
    margin: 0 auto;
    text-align: center;
  }
}

span.check,
span.cross {
  text-indent: -4000px;
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  position: relative;
  margin: 0 auto;

  &::before {
    filter: invert() brightness(0.5) sepia(1) hue-rotate(var(--icon-hue)) saturate(2);
    background-image: var(--icon-url);
    content: "";
    display: inline-block;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: contain;
    width: 1.4rem;
    height: 1.4rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  &.check::before {
    --icon-hue: 40deg;
    --icon-url: url(/img/icons/checkmark-outlined.svg);
  }

  &.cross::before {
    --icon-hue: 300deg;
    --icon-url: url(/img/icons/cross-outlined.svg);
  }
}

section#reviews {
  background: var(--reviews-bg), var(--reviews-bg-base);

  > div {
    max-width: unset;

    > article {
      display: flex;
      gap: 3rem;
      width: 100%;
      overflow-x: auto;
      flex-wrap: nowrap;
      justify-content: space-around;

      > div {
        flex: 1 400px;
        min-width: calc(100vw - 2rem);
        background: color-mix(in oklab, transparent 30%, color-mix(in oklab, var(--color-background) 80%, var(--color-hero-bg)));
        padding: 1rem;
        border-radius: var(--box-radius);
        display: flex;
        flex-direction: column;

        &[data-rating="1"] {
          --rating: "⭐️";
        }

        &[data-rating="2"] {
          --rating: "⭐️⭐️";
        }

        &[data-rating="3"] {
          --rating: "⭐️⭐️⭐️";
        }

        &[data-rating="4"] {
          --rating: "⭐️⭐️⭐️⭐️";
        }

        &[data-rating="5"] {
          --rating: "⭐️⭐️⭐️⭐️⭐️";
        }

        > div:nth-child(1) {
          position: relative;
          height: 1.4rem;

          &::before {
            content: "⭐️⭐️⭐️⭐️⭐️";
            filter: saturate(0) brightness(0.5);
          }

          &::after {
            content: var(--rating);
            position: absolute;
            left: 0;
          }

          > span {
            display: none;
          }
        }

        > div:nth-child(2) {
          padding: 0.5rem 0;
          line-height: 1.34em;
          flex: 1;
        }

        > footer {
          display: flex;
          gap: 2rem;
          justify-content: space-between;

          > div:nth-child(1) {
            background: var(--color-text);
            color: var(--color-background);
            border-radius: 2rem;
            min-width: 2rem;
            height: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.3rem;
          }

          > div:nth-child(2) {
            height: 2rem;
            display: flex;
            align-items: center;
          }
        }
      }
    }
  }
}

section#pricing {
  background: var(--pricing-bg);

  > div {
    > h2,
    > p {
      color: var(--pricing-main-text);
    }
  }

  div.tiers {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;

    > div {
      flex: 1 calc(33% - 2rem);
      background: var(--pricing-tier-bg);
      position: relative;
      border-radius: var(--box-radius);
      padding: 1rem;
      text-align: center;
      box-shadow: var(--pricing-tier-shadow);

      &::after {
        content: "";
        position: absolute;
        background: var(--color-background);
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        left: 2px;
        top: 2px;
        border-radius: calc(var(--box-radius) * 0.8);
        z-index: 1;
      }

      h3 {
        position: relative;
        z-index: 2;
        background: linear-gradient(19deg, var(--color-affirm), #ffe500), linear-gradient(8deg, #028068, #00aafa00);
        color: transparent;
        background-clip: text;
      }

      > div {
        position: relative;
        z-index: 2;
      }

      ul {
        position: relative;
        z-index: 2;
        text-align: left;

        > li {
          list-style-type: "- ";
        }
      }

      button {
        position: relative;
        z-index: 2;

        &::after {
          content: "";
          position: absolute;
          background: var(--color-background);
          width: calc(100% - 4px);
          height: calc(100% - 4px);
          left: 2px;
          top: 2px;
          border-radius: 2rem;
          z-index: 1;
          transition: opacity 0.23s;
          opacity: 0;
        }

        &:not(:hover) {
          &::after {
            opacity: 1;
          }

          > span {
            z-index: 2;
            background: linear-gradient(19deg, var(--color-affirm), #ffe500), linear-gradient(8deg, #028068, #00aafa00);
            color: transparent;
            background-clip: text;
          }
        }
      }
    }

    &:has(> :nth-child(4):last-child) {
      > div {
        flex: 1 calc(50% - 2rem);
      }
    }
  }
}

section#faq {
  details {
    padding: 0 0 1rem 1rem;
    max-width: 800px;
    margin: 0 auto;

    > summary {
      cursor: pointer;
      position: relative;
      padding: 0 0 0.5rem;
      list-style: none;
      transition: color 0.23s;

      &::marker {
        content: "";
        display: none;
      }

      &::before {
        content: "";
        background: 50% / contain no-repeat url(../img/icons/chevron-right.svg);
        width: 1rem;
        height: 1rem;
        left: -1rem;
        position: absolute;
        filter: var(--faq-list-marker-filter);
        transition: transform 0.23s, filter 0.23s;
      }

      &:hover {
        color: var(--faq-highlight-color);

        &::before {
          filter: var(--faq-list-marker-highlight-filter);
        }
      }
    }

    > div {
      opacity: 0.8;
      margin: 0 0 1rem;

      a {
        color: var(--color-text);
      }

      div[itemprop="text"] {
        margin: 0 0 1rem;
        line-height: 1.74em;
      }

      ul,
      ol {
        margin: 0 0 1rem;
        padding: 0 0 0 1rem;
        line-height: 1.74em;
      }
    }

    &[open] {
      > summary {
        color: var(--faq-highlight-color);

        &::before {
          transform: rotate(90deg);
          filter: var(--faq-list-marker-highlight-filter);
        }
      }
    }
  }
}

body[data-page="feedback"] {
  header nav ul li:nth-child(n + 2) {
    display: none;
  }

  form#feedback {
    text-align: center;

    > section#rating {
      > div {
        display: flex;
        justify-content: center;

        > label {
          font-size: 1.5rem;
          cursor: pointer;
          padding: 0 0.25rem;
          transition: filter 0.23s;

          > input {
            display: none;
          }
        }

        &:has(input[value="1"]:checked),
        &:has(label:nth-child(1):hover) {
          label:nth-child(1) {
            filter: saturate(1) brightness(1);
          }
          label:nth-child(n + 2) {
            filter: saturate(0) brightness(0.5);
          }
        }

        &:has(input[value="2"]:checked),
        &:has(label:nth-child(2):hover) {
          label:nth-child(-n + 2) {
            filter: saturate(1) brightness(1);
          }
          label:nth-child(n + 3) {
            filter: saturate(0) brightness(0.5);
          }
        }

        &:has(input[value="3"]:checked),
        &:has(label:nth-child(3):hover) {
          label:nth-child(-n + 3) {
            filter: saturate(1) brightness(1);
          }
          label:nth-child(n + 4) {
            filter: saturate(0) brightness(0.5);
          }
        }

        &:has(input[value="4"]:checked),
        &:has(label:nth-child(4):hover) {
          label:nth-child(-n + 4) {
            filter: saturate(1) brightness(1);
          }
          label:nth-child(5) {
            filter: saturate(0) brightness(0.5);
          }
        }

        &:has(label:nth-child(5):hover) {
          label:nth-child(-n + 5) {
            filter: saturate(1) brightness(1);
          }
        }
      }
    }

    section#feedback-box,
    section#display-name {
      margin: 1rem 0 0;

      > textarea,
      > input {
        font-family: inherit;
        font-size: 1rem;
        width: 100%;
        max-width: 500px;
        border-radius: 0.25rem;
        outline: 2px solid transparent;
        transition: outline 0.23s;
        border: 1px solid;
        padding: 0.5rem;
      }

      > textarea {
        min-height: 5rem;
      }
    }

    section#feedback-complete {
      display: none;

      > div {
        padding: 0 0 1.5rem;
      }
    }

    &[data-complete] {
      section#rating,
      section#display-name,
      section#feedback-box {
        display: none;
      }
      section#feedback-complete {
        display: block;
      }
    }

    > footer {
      > button {
        margin-top: 2rem;
      }
    }
  }
}

input {
  font-size: 1rem;
  font-family: inherit;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  transition: height 0.23s, margin 0.23s;
  overflow: hidden;

  &:has(input[name="acceptTerms"]) {
    overflow: visible;
  }
}

fieldset[data-collapsed] {
  height: 2rem !important;
}

fieldset:not([data-collapsed]):has(+ fieldset) {
  margin: 0 0 2rem;
}

legend {
  padding: 0;
  margin: 0 0 1rem;
}

form > fieldset > div > legend {
  font-size: 1.4rem;
}

form > fieldset fieldset legend {
  font-size: 1.2rem;
}

body[data-page="my-event-design"] > main > div {
  display: flex;
  max-width: 1920px;
}

body[data-page="my-event-design"] > main > div > div:first-child {
  flex: 0 clamp(300px, 40vw, 500px);
  position: relative;
}

form#event-design {
  flex: 1;
}

div#selected-colors {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;

  > div {
    flex: 1;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: row-reverse;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
    border-radius: 1rem 1rem 0 0;

    > span {
      width: 2rem;
      height: 2rem;
      border-radius: 50%;
      border: 1px solid var(--color-border);
      float: left;
      transition: border 0.34s;
      position: relative;
      overflow: hidden;

      &:not([style])::before {
        content: "";
        position: absolute;
        width: 2px;
        height: calc(100% + 0.5rem);
        background-color: var(--color-text);
        transform: translate(-50%, -50%) rotate(45deg);
        left: 50%;
        top: 50%;
        opacity: 0.5;
        transition: background-color 0.43s;
      }
    }
  }

  div[data-id="primary"] > span {
    background-color: var(--color-primary);
  }
  div[data-id="secondary"] > span {
    background-color: var(--color-secondary);
  }
  div[data-id="background"] > span {
    background-color: var(--color-background);
  }
}
/* div#selected-colors div#selected-colors > div.active {
  background: rgb(0 0 0 / 0.6);
  color: #fff;
} */

main form {
  div {
    &:has(> input) {
      margin-bottom: 1rem;
    }

    label:has(+ input) {
      margin: 0 0 0.5rem;
    }

    label + input {
      display: block;
      width: 100%;
    }
  }

  label:not(:has(input)) {
    display: block;
  }
}

body[data-page="my-event-details"] main form {
  max-width: 600px;
  margin: 0 auto;
}

body[data-logged-in="1"] {
  > footer {
    display: none;
  }
}

[data-tooltip] {
  position: relative;

  &::after {
    content: attr(data-tooltip);
    position: absolute;
    max-width: 200px;
    display: block;
    background: var(--color-text);
    color: var(--color-background);
    padding: 10px;
    top: -50px;
    border-radius: 3px;
    text-align: center;
    left: 50%;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    font-size: 0.6rem;
    transform: translate(-50%, 50%);
    transition: opacity 0.23s, transform 0.23s;
    transition-delay: 0.23s;
  }

  &.tooltip-bottom {
    &::after {
      top: 50px;
    }

    &:hover::after {
      transform: translate(-50%, 0);
      opacity: 1;
    }
  }

  &:hover::after {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

body:has(dialog[open]) {
  overflow: hidden;
}

dialog {
  color: #5a5e57;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  margin: 0;
  padding: 0;
  border: 0;
  max-width: unset;
  max-height: unset;
  /* display: flex;
    justify-content: center;
    align-items: center; */
  /* z-index: 1000; */
  opacity: 0;
  transition: opacity 0.23s ease-out allow-discrete;

  label a {
    color: inherit;
  }
}

dialog::backdrop {
  background: transparent;
}

dialog form {
  --color-bg: hsl(255 5% 80%);
  --color-fields-bg: #fff;
  --color-text: #303030;
  background: linear-gradient(331deg, color-mix(in lab, var(--color-bg) 50%, transparent), rgb(255 255 255 / 87%), color-mix(in lab, var(--color-bg) 50%, transparent));
  border-radius: 8px;
  width: 100%;
  padding: 2rem;
  max-width: min(500px, calc(100dvw - 2rem));
  /* max-height: calc(100dvh - 4rem); */
  max-height: 600px;
  overflow: hidden auto;
  left: 50%;
  top: 50%;
  position: absolute;
  transform: translate(-50%, -50%) scale(0.98);
  transition: transform 0.23s ease-out allow-discrete;

  label,
  p {
    line-height: 1.35em;
  }
}

dialog[id*="confirm-"] form {
  text-align: center;
}

dialog[open] {
  opacity: 1;
  visibility: visible;

  > form {
    transform: translate(-50%, -50%) scale(1);
  }
}

body:has(dialog[open]) {
  overflow: hidden;
}

@starting-style {
  dialog[open] {
    opacity: 0;
    visibility: hidden;

    > form {
      transform: translate(-50%, -50%) scale(0.98);
    }
  }
}

dialog > form > button.close {
  /* position: absolute; */
  position: sticky;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  background: none;
  right: 0;
  top: 0;
  transform: translate(2rem, -2rem);
  float: right;

  > span {
    text-indent: 1000px;
    position: relative;
    display: block;
    width: 100%;
    height: 100%;

    &::before {
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      background: 50% / contain no-repeat url(/img/icons/add.svg);
      transform: rotate(45deg);
      right: 0;
    }
  }
}

dialog[data-type="info"] form header h2,
dialog[data-type="info"] form header + section {
  text-align: center;
}

dialog input:not([type="checkbox"]):not([type="radio"]),
dialog select,
dialog textarea,
dialog form button {
  background-color: var(--color-fields-bg);
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 0;
  font-size: 1rem;
  appearance: none;
  font-family: inherit;
  color: inherit;
}

dialog form button {
  width: min(300px, 100%);
  margin-left: auto;
  margin-right: auto;
}

dialog input:last-child {
  margin-bottom: 0;
}

label:has(span input[type="checkbox"]) {
  display: flex;
  gap: 1rem;
  cursor: pointer;

  > span {
    flex: 1;
  }

  > span:has(> input[type="checkbox"]) {
    background: var(--color-fields-bg);
    border-radius: 1rem;
    display: inline-block;
    flex: 0 0 2rem;
    height: 1.2rem;
    position: relative;
    outline: 2px solid transparent;
    transition: outline 0.23s;

    /* &:has(input:checked) {
            background: color-mix(in oklab, var(--color-fields-bg) 50%, var(--color-affirm) 50%);
        } */

    > input {
      opacity: 0;
    }

    &::before {
      content: "";
      background: var(--color-bg);
      border-radius: 50%;
      width: 1rem;
      height: 1rem;
      position: absolute;
      left: 2px;
      top: 2px;
      transition: background 0.23s, left 0.23s;
    }

    &:has(input:checked)::before {
      left: calc(100% - 1rem - 2px);
      background: var(--color-affirm);
    }
  }

  &:hover > span:has(> input[type="checkbox"]) {
    outline: 2px solid #201f2e;
  }
}

dialog input,
dialog select,
dialog textarea,
form textarea {
  border-radius: 0.25rem;
  outline: 2px solid transparent;
  transition: outline 0.23s;
}

input[type="radio"] {
  appearance: none;
  width: 0.8rem;
  height: 0.8rem;
  background: #fff;
  border-radius: 50%;
  position: relative;
}

input[type="radio"]::before {
  content: "";
  position: absolute;
  background: green;
  border-radius: 50%;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s;
}

input[type="radio"]:checked::before {
  transform: translate(-50%, -50%) scale(1);
}

form input[type="checkbox"] {
  background: #fff;
  width: 1rem;
  height: 1rem;
  appearance: none;
  margin: 0.1rem 0.4rem 0 0;
  float: left;
  position: relative;
}

form input[type="checkbox"]::before {
  content: "✓";
  position: absolute;
  color: green;
  width: 100%;
  height: 100%;
  text-align: center;
  transform: scale(0);
  transition: transform 0.3s;
}

form input[type="checkbox"]:checked::before {
  transform: scale(1);
}

dialog select {
  background-image: url(../img/icons/up-down-solid.svg);
  background-position: calc(100% - 0.5rem) 50%;
  background-repeat: no-repeat;
  background-size: 0.6rem;
}

label {
  display: block;
  padding: 0 0 0.5rem;
  position: relative;
  cursor: pointer;

  &::before {
    content: "";
    width: 6px;
    height: 6px;
    background: red;
    border-radius: 50%;
    position: absolute;
    left: -8px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.23s, transform 0.23s cubic-bezier(0, 0, 0.56, 2);
  }

  &:has(+ input[required])::before,
  &:has(+ div input[required])::before {
    opacity: 1;
    transform: scale(1);
  }
}

div.required {
  position: relative;

  &::before {
    content: "";
    width: 6px;
    height: 6px;
    background: red;
    border-radius: 50%;
    position: absolute;
    left: -8px;
  }
}

input[type="text"]:focus-visible,
input[type="text"]:hover,
input[type="email"]:focus-visible,
input[type="email"]:hover,
input[type="datetime-local"]:focus-visible,
input[type="datetime-local"]:hover,
select:focus-visible,
select:hover,
textarea:focus-visible,
textarea:hover {
  outline: 2px solid #201f2e;
}

::placeholder,
select:invalid {
  color: #808080;
}

dialog form div.date {
  display: flex;
  gap: 0.5rem;
  position: relative;

  > #event_date {
    /* flex: 1 0 220px; */
    flex: 1;
    max-width: calc(100% - 0.5rem - 80px);
  }

  &::after {
    content: "days";
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(calc(-50% - 0.5rem));
    color: #808080;
    pointer-events: none;
  }

  &:has(#event_duration[value="1"]) {
    appearance: textfield;

    &::after {
      content: "day";
    }
  }

  > #event_duration {
    flex: 0;
    min-width: 80px;
    max-width: 80px;

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
  }
}

dialog footer,
dialog div.footer {
  padding-top: 2rem;
}

dialog fieldset {
  label {
    display: block;
    margin-bottom: 0.5rem;
  }
}

dialog#privacy form,
dialog#terms form {
  max-width: 1000px;

  h1 {
    display: none;
  }

  section h2 {
    text-align: left;
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
  }

  section > p,
  section p {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: unset;
  }

  a {
    color: var(--color-blue);
  }
}

.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgb(0 0 0 / 80%);
  color: #fff;
  padding: 1rem;
  border-radius: 0.75rem;
  z-index: 1000001;
  text-align: center;
  line-height: 1.45rem;
  pointer-events: none;
  opacity: 1;
  max-width: 400px;
  border: 2px solid #fff;
  transition: opacity 0.23s allow-discrete;

  @starting-style {
    opacity: 0;
  }

  &[class*="icon-"] {
    padding-left: 2rem;
    padding-right: 2rem;

    &::before {
      content: "";
      display: block;
      width: 100%;
      height: 4rem;
      background-size: contain;
      background-position: 50%;
      background-repeat: no-repeat;
    }
  }

  &.icon-checkmark::before {
    background-image: url(../img/icons/checkmark-outlined.svg);
    filter: invert();
  }
}

body > footer {
  width: 100%;
  color: #fff;
  padding: 1rem 0 0;
  margin-top: 4rem;

  a {
    text-decoration: none;
    color: inherit;
  }

  .small {
    font-size: 0.8rem;
  }

  span.nobr {
    white-space: nowrap;
  }

  > section {
    padding: 0 1rem 1rem;
    text-align: center;
  }

  section:nth-child(1) {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    justify-content: center;

    a[href*="facebook.com"]::before {
      content: "";
      display: inline-block;
      position: relative;
      vertical-align: middle;
      width: 1.2rem;
      height: 1.2rem;
      background: 50% / contain no-repeat url(../img/icons/facebook.png);
      margin: -0.2rem 0.3rem 0 0;
    }

    a[href*="instagram.com"]::before {
      content: "";
      display: inline-block;
      position: relative;
      vertical-align: middle;
      width: 1.2rem;
      height: 1.2rem;
      background: 50% / contain no-repeat url(../img/icons/instagram.webp);
      margin: -0.2rem 0.3rem 0 0;
    }
  }

  a[href*="payfast.io"] {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px;

    > span {
      display: inline-block;

      > span {
        display: none;
      }
    }

    &::after {
      content: "";
      display: inline-block;
      background: 50% / contain no-repeat url(/img/Payfast-logo.svg);
      width: auto;
      height: 100%;
      aspect-ratio: 337/120;
      margin: 0 0 0 1rem;
    }
  }

  section:last-child {
    display: flex;
    justify-content: center;
    gap: 2rem;

    > div.legal {
      a:not(:first-child)::before {
        content: "•";
        color: #fff;
        margin: 0 0.5rem;
      }
    }
  }
}

body:not([data-logged-in]) > footer {
  background: #000;
}

/* body[data-logged-in] > footer {
  section:nth-child(1) {
    display: none;
  }
} */

@media all and (max-width: 767px) {
  footer a[href*="facebook.com"] span,
  footer a[href*="instagram.com"] span {
    display: none;
  }
}

dialog fieldset {
  &:not(:last-child) {
    margin-bottom: 1rem;
  }

  > label {
    display: inline;
  }
}

dialog form details {
  margin-bottom: 1rem;

  &[open] {
    summary {
      margin-bottom: 0.5rem;
    }
  }
}

#get-started #eventCompany {
  height: 0;
  transition: height 0.23s;
  overflow: hidden;
  --height: 3.3rem;
  padding: 2px;
  width: calc(100% + 4px);
  transform: translateX(-2px);
}

#get-started form:has(input[value="company"]:checked) #eventCompany,
#get-started form:has(input[value="giftee"]:checked) #gifteeDetails {
  height: var(--height);
  overflow: visible;
}

#get-started #eventCompany input,
#get-started #gifteeDetails input {
  opacity: 0;
  transition: opacity 0.23s;
}

#get-started form:has(input[value="company"]:checked) #eventCompany input,
#get-started form:has(input[value="giftee"]:checked) #gifteeDetails input {
  opacity: 1;
}

div#gifteeDetails {
  height: 0;
  transition: height 0.23s;
  overflow: hidden;
  --height: 10.7rem;
  padding: 2px;
  width: calc(100% + 4px);
  transform: translateX(-2px);
}

div:has(+ fieldset) {
  margin: 0 0 0.25rem;
}

fieldset.event-size {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  /* --gap: .3rem;
    gap: var(--gap); */
  transition: height 0.23s;
  overflow: hidden;
  height: var(--height);
  margin-bottom: 0.5rem;
}

fieldset.event-size:has(input:checked) {
  height: 3rem;
}

fieldset.event-size legend {
  flex: 0;
}

fieldset.event-size label {
  flex: 0 calc(100% - 4px);
  border: 2px solid #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  padding: 0;
  position: relative;
  cursor: pointer;
  outline: 2px solid transparent;
  background: #fff;
  outline-offset: -2px;
  transition: outline 0.23s, transform 0.23s, opacity 0.23s, border 0.23s;
  margin-top: 4px;
  filter: saturate(1);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

fieldset.event-size label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  z-index: -1;
}

fieldset.event-size label input {
  opacity: 0;
  position: absolute;
}

fieldset.event-size label[data-idx="0"] {
  --bg-color-from: hsl(18.39deg 100% 50%);
  --bg-color-to: #e3d021;
}

fieldset.event-size label[data-idx="1"] {
  --bg-color-from: hsl(110.08deg 85.6% 47.98%);
  --bg-color-to: hsl(112.32deg 93.18% 34.51%);
}

fieldset.event-size label[data-idx="2"] {
  --bg-color-from: hsl(208.02deg 100% 50.5%);
  --bg-color-to: hsl(222.97deg 71.62% 48.64%);
}

fieldset.event-size label[data-idx="3"] {
  --bg-color-from: hsl(310deg 90% 50%);
  --bg-color-to: hsl(296.64deg 71.76% 38.35%);
}

fieldset.event-size label[data-idx="4"] {
  --bg-color-from: hsl(18.39deg 100% 50%);
  --bg-color-to: #e33e21;
}

label[data-idx="1"]:has(input:checked) {
  transform: translateY(-3rem);
}

label[data-idx="2"]:has(input:checked) {
  transform: translateY(-6rem);
}

label[data-idx="3"]:has(input:checked) {
  transform: translateY(-9rem);
}

label[data-idx="4"]:has(input:checked) {
  transform: translateY(-12rem);
}

label[data-idx="5"]:has(input:checked) {
  transform: translateY(-15rem);
}

fieldset.event-size:has(input:checked) label:not(:has(input:checked)) {
  opacity: 0;
}

fieldset.event-size label:hover {
  /* outline: 2px solid #201f2e; */
  border-color: #201f2e;
  opacity: 1 !important;
  filter: saturate(1) !important;
}

fieldset.event-size label span {
  text-align: left;
  padding: 0.1rem 0.5rem;
}

fieldset.event-size label span:nth-child(1) {
  padding: 0.2rem 0.25rem 0.5rem 0.5rem;
  flex: 1;

  &::after {
    content: attr(data-conditions);
    position: absolute;
    left: 0.5rem;
    text-align: right;
    font-size: 0.6rem;
    bottom: -0.2rem;
    opacity: 0.7;
    padding: 0;
  }
}

fieldset.event-size label span:nth-child(2) {
  position: relative;
  padding-top: 0.2rem;

  &::after {
    content: attr(data-frequency);
    position: absolute;
    right: 0.5rem;
    text-align: right;
    font-size: 0.6rem;
    bottom: -0.2rem;
    opacity: 0.7;
    padding: 0;
  }
}

span[data-price]::before {
  content: attr(data-price);
  font-size: 0.7em;
  text-decoration: line-through;
  vertical-align: top;
  line-height: 1.5em;
  color: var(--color-red);
}

fieldset.event-size label span:last-child {
  position: absolute;
  left: 3.7rem;
  width: calc(100% - 4.2rem);
  text-align: left;
  font-size: 0.6rem;
  bottom: -0.2rem;
  opacity: 0.7;
  padding: 0;
}

@media (max-width: 767px) {
  #how-it-works {
    > div {
      > div {
        > ul {
          > li {
            flex: 0 100%;

            &::before {
              float: left;
              margin-right: 0.5rem;
            }

            > h3 {
              line-height: 1.75em;
            }
          }
        }

        div.preview {
          width: 100%;
        }
      }
    }
  }

  #banner {
    img {
      display: block;
      width: 100%;
      height: auto;
    }
  }

  section#features ul {
    > li {
      flex: 0 100%;
    }
  }

  body > footer > section:last-child {
    flex-direction: column-reverse;
    text-align: center;
    gap: 0.5rem;
  }

  dialog form {
    max-height: calc(100vh - 1rem);
    max-width: calc(100vw - 1rem) !important;
  }
}

@media (min-width: 768px) {
  section#reviews {
    > div > article > div {
      min-width: 400px;
      max-width: 400px;
    }
  }

  #how-it-works {
    > div {
      > div {
        > ul {
          > li {
            flex: 1 calc(50% - var(--gap));
            padding-left: 1.5rem;

            &::before {
              position: absolute;
              left: -1rem;
              top: -0.3rem;
            }

            > h3 {
              line-height: 1.35em;
            }
          }
        }

        div.preview {
          width: 70%;
          margin: 0 auto;
        }
      }
    }
  }
}
