/* input(2,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(21,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(43,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(221,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(236,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(424,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(430,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(593,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(684,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(708,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(859,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(898,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(949,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(967,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(987,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1084,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1097,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1105,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1126,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1143,6): run-time error CSS1035: Expected colon, found '.'
input(1328,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1376,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1402,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1453,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1468,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1489,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1543,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1737,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1859,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1891,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1898,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1961,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(1999,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2053,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2069,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2371,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2385,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2408,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2548,1): run-time error CSS1019: Unexpected token, found '}'
input(2553,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2586,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2632,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2659,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2707,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2726,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2854,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&'
input(2872,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '&' */
body {
  & header {
    padding: 10px;
    padding-left: 15px;
    background: var(--clr-bg);
    min-height: 90px;
    height: fit-content;
    display: flex;

    & img {
      width: 45px;
      height: 60px;
      padding-top: 10px;
    }
  }
}

div#product-time-slot-picker {
  padding: 15px;
  border-bottom: 1px solid var(--clr-primary);
  & h1 {
    color: var(--clr-primary);
    width: 100%;
    font-family: RightGrotesk;
    padding-bottom: 10px;
  }

  & > input[type="datetime-local"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    font-size: 16px;
    font-family: RightGrotesk;

    &:focus-visible {
      outline: 2px solid var(--clr-primary);
    }
  }
}

#product-popup {
  & button.close-button {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-primary);
    border-radius: 60px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    & svg {
      & line {
        stroke: var(--clr-primary);
      }
    }
  }

  & .product-scheduling-details {
    font-family: RightGrotesk;
    & > header {
      border-bottom: 1px solid var(--clr-primary);
      min-height: unset;
      & h1 {
        text-transform: uppercase;
        color: var(--clr-primary);
        width: 95%;
        font-family: RightGrotesk;
      }
    }

    &.unavailable {
      & > header {
        display: flex;
        flex-direction: column;
        text-align: center;

        & > div {
          margin: 16px 0;
          padding: 12px;
          background: var(--clr-unavailable);
          color: var(--clr-secondary);
          border-radius: 6px;
          & span {
            color: var(--clr-dark);
            font-weight: 400;
          }

          & h2 {
            font-size: 1.15rem;
            margin-bottom: 10px;
            color: var(--clr-secondary);
            font-weight: 700;
          }

          & > div {
            display: flex;
            justify-content: space-evenly;
          }
        }
      }

      & > button {
        display: flex;
        margin: 20px auto;
        background-color: var(--clr-primary);
        border: 1px solid var(--clr-primary);
        cursor: pointer;

        &:hover {
          color: var(--clr-on-primary);
        }
      }
    }

    & form {
      display: flex;
      flex-direction: column;
      & section {
        & header {
          border: 0;
          & h2 {
            text-align: left;
            font-size: 1.5rem;
            color: var(--clr-primary);
            text-transform: uppercase;
          }

          & span {
            text-transform: uppercase;
            color: var(--clr-primary);
          }
        }

        &.scheduling-type {
          display: flex;
          border-bottom: 1px solid var(--clr-primary);
          align-content: stretch;
          & > div {
            width: 100%;
            transition: 0.3s;
            font-size: 1.2rem;
            padding: 10px;
            display: flex;
            align-content: flex-start;
            & label {
              width: 100%;
              height: 100%;
              font-weight: 800;
              transition: 0.3s;
              cursor: pointer;
              & span {
                transition: 0.3s;
                padding: 5px 0;
                color: var(--clr-primary);
                display: block;
                font-size: 1rem;
                font-weight: 300;
              }
            }

            & input {
              display: none;
            }

            &:first-child {
              border-right: 1px solid var(--clr-primary);
            }

            &:has(input:checked) {
              background: var(--clr-primary);
              & span,
              & label {
                color: var(--clr-bg);
              }
            }

            &:not(:has(input:checked)) {
              & label {
                font-weight: 300;
              }
            }
          }
        }

        & div:has(input) {
          & label {
            text-transform: uppercase;
            color: var(--clr-primary);
          }
        }
      }

      & button {
        margin: 20px auto;
        background-color: var(--clr-secondary);
        border: 1px solid var(--clr-secondary);
        cursor: pointer;

        &:hover {
          color: var(--clr-on-primary);
        }
      }
    }
  }

  & section.scheduling-type:has(input#scheduled:checked) ~ .scheduling-time-picker {
    display: block;
  }

  & section.scheduling-time-picker {
    display: none;
  }
}

@media (max-width: 767px) {
  #product-popup {
    & .popup {
      width: 90%;
      height: auto;
    }
    & .product-scheduling-details {
      & > header {
        & h1 {
          width: 80%;
        }
      }
    }
  }
}

nav {
  & > a {
    width: 30px;
    height: 40px;

    & img {
    }
  }

  & div.nav-menu {
    display: flex;
    flex-direction: column;

    & > input {
      display: none;
    }

    & label {
      display: block;
      align-self: flex-end;
      width: 32px;
      height: 32px;
      background-color: var(--clr-bg);
      background-repeat: no-repeat;
      background-position: center;
      background-image: url("../images/burger-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
      cursor: pointer;
      border-radius: 4px;
      border: 1px solid var(--clr-ui);
      box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, 0.2);

      & > div {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        position: fixed;
        left: 0px;
        top: -100vh;
        width: 100%;
        height: 100vh;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(5px);
        transition: 0.2s;
        z-index: 10;

        & h3 {
          color: var(--clr-primary);
          align-self: stretch;
          font-size: 2rem;
          text-align: center;
          background-color: var(--clr-bg);
          padding: 32px 0;
        }

        & ul {
          display: flex;
          flex-direction: column;
          gap: 8px;
          background-color: var(--clr-bg);
          align-self: stretch;
          border-top: 1px solid var(--clr-ui);

          & li {
            padding: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: var(--clr-sand-primary) 1px solid;
            & > .li-label {
              width: 100%;
            }
            & > .li-content {
              align-items: center;
              flex-direction: row;
              width: max-content;
              gap: 10px;
              & > .store-status-status-badge {
                background-color: var(--clr-primary);
                color: var(--clr-on-primary);
                padding: 2px 4px;
              }
              .switch {
                background-image: none;
                border: none;
                box-shadow: none;
                position: relative;
                display: inline-block;
                width: 38px;
                height: 22px;

                & > input {
                  display: none;
                }

                .slider {
                  position: absolute;
                  cursor: pointer;
                  top: 0;
                  left: 0;
                  right: 0;
                  bottom: 0;
                  background-color: var(--clr-bg);
                  transition: 0.4s;

                  &:before {
                    position: absolute;
                    content: "";
                    height: 16px;
                    width: 16px;
                    left: 2px;
                    bottom: 1px;
                    background-color: var(--clr-primary);
                    transition: 0.4s;
                  }
                }
              }

              input + .slider {
                border: 2px var(--clr-primary) solid;
              }

              input:checked + .slider:before {
                transform: translateX(15px);
              }

              .slider {
                &.round {
                  border-radius: 34px;

                  &:before {
                    border-radius: 50%;
                  }
                }
              }
            }

            & button {
              border: none;
              background-color: inherit;
              padding: 0;
              color: var(--clr-primary);
              cursor: pointer;
              font-family: RightGrotesk;
              font-size: 1rem;
            }

            & a {
              color: var(--clr-primary);
              text-decoration: none;
            }
          }
        }
      }
    }

    & #burger-input:checked + label {
      & div {
        top: 0;

        & li {
          text-transform: uppercase;
          & button {
            text-transform: uppercase;
          }
        }
      }
    }
  }

  & .nav-button {
    a {
      flex-basis: 5rem;
    }
  }
}

.clear-input-btn {
  width: 40px;
  height: 40px;
  border: var(--clr-primary-disabled) 2px solid;
  border-radius: 50%;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  background-color: var(--clr-sand-light);
  cursor: pointer;
  & > svg {
    stroke: var(--clr-primary-disabled);
  }
}
#create-user-popup {
  width: 80%;
  & form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-bg);
    color: var(--clr-primary);
    padding: 18px;
    gap: 30px;
    text-align: center;

    & > div {
      padding: 0 8px;
      width: 100%;
    }
    & .input-fields {
      background-color: var(--clr-sand-primary);
      display: flex;
      gap: 4px;
      width: 100%;
      & input {
        width: 100%;
        height: 50px;
        border: 1px solid var(--clr-primary);
        color: var(--clr-primary);
        padding: 8px 6px;
        background-color: var(--clr-bg);

        &[type="text"],
        &[type="email"] {
          background: var(--clr-bg) url("../images/pencil-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") no-repeat right 12px center;
        }

        &[type="password"] {
          background: var(--clr-bg) url("../images/close-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") no-repeat right 12px center;
        }
      }
      & > .user-info {
        background-color: var(--clr-sand-light);
        padding: 8px;
        gap: 8px;
        width: 100%;
        display: flex;
        flex-direction: column;
        & > .username-input {
          display: flex;
          align-items: center;
          gap: 8px;
        }
        & > .credentials-input {
          display: flex;
          gap: 10px;
        }
      }

      & > .store-selection-wrapper {
        width: 100%;
        background-color: var(--clr-sand-light);
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: center;

        & > .select-container {
          position: relative;
          display: flex;
          flex-wrap: wrap;
          align-items: center;
          background-color: var(--clr-bg);
          border: 1px solid var(--clr-primary);
          min-height: 50px;
          padding: 8px;
          gap: 8px;

          & > .tag-list {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;

            & .store-tag {
              height: 32px;
              display: flex;
              align-items: center;
              background: var(--clr-primary);
              color: var(--clr-bg);
              padding: 0 8px 0 8px;

              & .remove-tag {
                background: transparent;
                border: none;
                color: var(--clr-bg);
                font-size: 1.1rem;
                margin-left: 6px;
                cursor: pointer;
              }
            }
          }

          & > input {
            flex: 1;
            height: auto;
            min-width: 100px;
            border: none;
            outline: none;
            background: transparent;
            color: var(--clr-primary);
            font-size: 1rem;
            padding: 0px;
          }

          & > .store-results {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            width: 95%;
            z-index: 100;

            background: var(--clr-bg);
            box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.2);

            &:has(li) {
              border: 1px solid var(--clr-primary);
            }

            & > ul {
              max-height: 150px;
              overflow-y: auto;

              & > li {
                display: flex;
                padding: 10px;
                border-bottom: 1px solid var(--clr-primary);
                cursor: pointer;

                &:hover {
                  color: var(--clr-bg);
                  background-color: var(--clr-primary-light);
                }
              }
            }
          }
        }
      }
    }
    &.buttons {
      display: flex;
      gap: 64px;
    }
  }
}

div.store-selection-page {
  font-family: RightGrotesk;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  color: var(--clr-primary);
  justify-content: center;
  gap: 20px;

  & .banner {
    height: 25px;
    width: 100%;
    justify-self: flex-start;
    background-color: var(--clr-primary);
  }

  & .content {
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;

    & .orders-btn {
      position: absolute;
      right: 10px;
      top: 35px;
    }

    & .store-list {
      display: flex;
      flex-direction: column;
      margin-top: 30px;
      gap: 20px;
      text-align: center;
      cursor: pointer;

      & .store-card {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
        background: var(--clr-primary);
        color: var(--clr-bg);
        margin: auto;
      }

      & button {
        width: 100%;
        border: 1px solid var(--clr-primary);
        font-weight: bold;
        color: var(--clr-dark);
        background: var(--clr-bg);
        padding: 10px;
        cursor: pointer;
        transition: 0.3s;

        &:hover {
          color: var(--clr-primary);
        }

        &:disabled {
          cursor: not-allowed;
          opacity: 0.6;
        }
      }
    }

    & .no-access {
      color: var(--clr-primary);
      width: 100%;

      & h2 {
        background-color: var(--clr-secondary);
        color: var(--clr-on-primary);
        padding: 10px;
        margin-bottom: 32px;
      }

      & form {
        display: flex;
        gap: 10px;
        flex-direction: column;
        max-width: 90%;
        margin: auto;

        & textarea {
          border: 1px solid var(--clr-primary);
        }

        & input {
          cursor: pointer;
        }
      }
    }
  }
}

@media (max-width: 767px) {
  div.store-selection-page {
    & .content {
      & .orders-btn {
        position: unset;
        align-self: center;
      }
      & .store-list {
        & .store-card {
          width: 90%;
        }
      }
    }
  }
}

div.category-page {
  font-family: RightGrotesk;
  color: var(--clr-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  justify-content: start;

  & header {
    background-color: var(--clr-primary);
    color: var(--clr-on-primary);
    padding: 10px;
    text-transform: uppercase;

    & h1 {
      font-size: 1.6rem;
    }
  }

  .products {
    margin: 5px;

    & .product {
      margin: 5px;
      margin-bottom: 15px;

      & h1 {
        margin-bottom: 15px;
        text-transform: uppercase;
        font-size: 1.6rem;
      }
    }
  }
}

@font-face {
  font-family: RightGrotesk;
  font-style: normal;
  src:
    url("../fonts/PPRightGrotesk-Regular.woff2?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") format("woff2"),
    url("../fonts/PPRightGrotesk-Regular.woff?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") format("woff"),
    url("../fonts/PPRightGrotesk-Regular.otf") format("otf");
}

@font-face {
  font-family: RightGroteskCompact;
  font-style: normal;
  src:
    url("../fonts/PPRightGrotesk-CompactMedium.woff2?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") format("woff2"),
    url("../fonts/PPRightGrotesk-CompactMedium.woff?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") format("woff"),
    url("../fonts/PPRightGrotesk-CompactMedium.otf") format("otf");
}

/* Resets */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

:root {
  --clr-primary: #00704a;
  --clr-primary-light: #509a80;
  --clr-primary-disabled: #509a80;
  --clr-on-primary: #f7f6f2;
  --clr-secondary: #e2071f;
  --clr-secondary-disabled: #d9828b;
  --clr-tertiary: #ec6608;
  --clr-on-tertiary: #eee;
  --clr-sand-primary: #d8c9b3;
  --clr-sand-light: #f0e8de;
  --clr-green-dark: #273f3a;

  --clr-bg: #f7f6f2;
  --clr-dark: #333;
  --clr-overlay: #00000077;
  --clr-unavailable: #dc354514;

  /* some lines in the ui use this colour */
  --clr-ui: #d8c9b3;
  --clr-ui-light: #f0ede9;

  --fs-nav: 1.5rem;
  --fs-footer-nav: 2rem;
  --fs-small-nav: 1.5rem;
  --fs-nav-menu: 1.5rem;
  --fs-nav-button: 1rem;

  --bubbles: radial-gradient(circle at 20% 10%, var(--clr-bg) 4%, #0000 0),
    radial-gradient(circle at 50% 15%, var(--clr-bg) 4%, #0000 0),
    radial-gradient(circle at 80% 10%, var(--clr-bg) 5%, #0000 0),
    radial-gradient(circle at 10% 30%, var(--clr-bg) 2%, #0000 0),
    radial-gradient(circle at 60% 45%, var(--clr-bg) 1%, #0000 0),
    radial-gradient(circle at 35% 5%, var(--clr-bg) 3%, #0000 0),
    radial-gradient(circle at 70% 40%, var(--clr-bg) 3%, #0000 0),
    radial-gradient(circle at 40% 40%, #0000 8%, var(--clr-bg) 4.5%, #0000 0),
    radial-gradient(circle at 65% 10%, #0000 4%, var(--clr-bg) 2.5%, #0000 0),
    radial-gradient(circle at 90% 30%, #0000 3%, var(--clr-bg) 2%, #0000 0),
    radial-gradient(circle at 18% 40%, #0000 3%, var(--clr-bg) 2%, #0000 0);
}

@media (max-width: 767px) {
  :root {
    --fs-nav: 0.75rem;
    --fs-nav-menu: 2rem;
    --fs-nav-menu-small: 1rem;
    --fs-footer-nav: 1.5rem;
    --fs-small-nav: 1.125rem;
    --fs-nav-button: 0.75rem;
  }
}

html {
  overflow-x: hidden;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background-color: var(--clr-bg);
}

main {
  flex-grow: 1;
  position: relative;
}

.button {
  text-transform: uppercase;
  background-color: var(--clr-primary);
  border: 1px solid var(--clr-primary);
  color: var(--clr-bg);
  transition: 0.3s;
  text-align: center;
  text-decoration: none;
  padding: 11px 24px;
  border-radius: 60px;
  font-weight: 800;
  font-family: RightGrotesk;

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

  &:active {
    color: var(--clr-bg);
    background-color: var(--clr-primary);
  }

  &.inverted {
    background-color: var(--clr-bg);
    color: var(--clr-primary);
    border: 1px solid var(--clr-primary);

    &:hover {
      color: var(--clr-bg);
      background-color: var(--clr-primary);
      border: 1px solid var(--clr-bg);
    }

    &:active {
      color: var(--clr-primary);
      background-color: var(--clr-bg);
      border: 1px solid var(--clr-bg);
    }
  }

  &:disabled {
    background: var(--clr-bg);
    color: var(--clr-primary-disabled);
    border: 1px solid var(--clr-primary-disabled);
  }
}

button.secondary {
  border: 1px solid var(--clr-secondary);
  background-color: var(--clr-secondary);

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

  &:active {
    color: var(--clr-bg);
    background-color: var(--clr-secondary);
  }

  &.inverted {
    background-color: var(--clr-bg);
    color: var(--clr-secondary);
    border: 1px solid var(--clr-secondary);

    &:hover {
      color: var(--clr-bg);
      background-color: var(--clr-secondary);
      border: 1px solid var(--clr-bg);
    }

    &:active {
      color: var(--clr-secondary);
      background-color: var(--clr-bg);
      border: 1px solid var(--clr-bg);
    }
  }

  &:disabled {
    background: var(--clr-bg);
    color: var(--clr-secondary-disabled);
    border: 1px solid var(--clr-secondary-disabled);
  }
}

.button-spinner {
  display: none;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid var(--clr-primary);
  border-top: 2px solid transparent;
  border-radius: 50%;
  transition: opacity 0.3s ease-in-out;
  animation: spin 1s linear infinite;
}

div.divider {
  height: 160px;
  width: 120%;
  margin: 80px 0;
  & svg {
    width: 100%;
    height: 100%;
  }

  &.up {
    transform: rotate(2.5deg) translateX(-5%);
  }

  &.down {
    transform: rotate(-2.5deg) translateX(-5%);
  }
}

@media (max-width: 767px) {
  div.divider {
    height: 80px;
    margin: 60px 0;
    & rect {
      height: 20px;
      &:nth-child(2) {
        y: 30px;
      }

      &:nth-child(3) {
        y: 60px;
      }
    }
  }
}

nav.store-nav {
  position: sticky;
  top: 0;
  background-color: var(--clr-bg);
  color: var(--clr-primary);
  font-family: RightGrotesk;
  z-index: 3;
  & > div {
    width: 100%;
    max-width: 98rem;
    display: flex;
    justify-content: space-between;
    margin: auto;
    padding: 10px;
    & > form {
      display: flex;
      align-items: center;
      width: 100%;
      max-width: 400px;
      gap: 10px;
      padding: 0 10px;
      border: 2px solid var(--clr-primary);
      background: url("../images/magnifying-glass.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") no-repeat left 12px center;
      &:focus-within {
        outline: 1px solid var(--clr-tertiary);
      }
      & input[type="text"] {
        font-size: 1.25rem;
        position: relative;
        border: none;
        width: 100%;
        padding: 10px 0;
        left: 34px;
        color: var(--clr-primary-light);
        font-family: RightGrotesk;
        background-color: var(--clr-bg);
        &:focus {
          outline: none;
        }
      }

      & button {
        cursor: pointer;
        position: relative;
        overflow: hidden;
        display: block;
        &.back-button {
          border: none;
          background: url("../images/close-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA") no-repeat center;
          width: 24px;
          height: 24px;
          margin-left: auto;
        }
      }

      &:has(.htmx-request) > button {
        &::before {
          content: "";
          background-color: var(--clr-primary);
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          border-radius: 60px;
        }

        &::after {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 200px;
          animation: 1s infinite background-slide-up cubic-bezier(0.11, 0.65, 0.53, 0.41);
          background: var(--bubbles);
          background-repeat: no-repeat;
        }
      }
    }

    & div {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      & > a {
        text-decoration: none;
        color: color-mix(in srgb, var(--clr-primary), white 20%);
        text-transform: uppercase;
        &:hover {
          color: var(--clr-primary);
          text-decoration: underline;
        }
      }
    }
  }
}

dialog {
  width: 40rem;
  overflow: visible;
  border: 0;
  padding: 0;

  &::backdrop {
    background: var(--clr-overlay);
    backdrop-filter: blur(5px);
  }

  &:focus-visible {
    outline: 0;
  }
}

div[popover] {
  border: 3px solid var(--clr-primary);
  width: 75%;
  &::backdrop {
    background: var(--clr-overlay);
    backdrop-filter: blur(5px);
  }
}

@media (max-width: 767px) {
  nav.store-nav {
    & div {
      flex-direction: column;
      & form {
        justify-content: flex-start;
        width: 100%;
        & input[type="text"] {
          font-size: 1rem;
          flex-grow: 1;
        }
      }

      & div {
        align-items: flex-start;
        width: 100%;
        padding: 5px 0;
      }
    }
  }
}

body {
  & footer {
    background: var(--clr-primary);
    height: 70px;
    background-image: url("/images/7-eleven-white-logo.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
    background-repeat: no-repeat;
    background-position: right 10px center;
  }
}

div.receipt-expanded {
  opacity: 1;
  align-items: center;
  flex-direction: column;
  display: flex;
  animation: fold-down 0.5s ease forwards;
  transform-origin: top center;

  div.receipt {
    display: flex;
    flex-flow: column;
    width: 90%;
    padding: 6px;
    background-color: var(--clr-sand-light);
    border: 1px solid var(--clr-sand-primary);
    gap: 4px;

    & .products {
      display: flex;
      flex-flow: column;
      gap: 4px;
      background: var(--clr-sand-primary);

      & li {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 8px;
        padding-bottom: 12px;
        background: linear-gradient(
          90deg,
          var(--clr-sand-primary) 10%,
          var(--clr-bg) 10%,
          var(--clr-bg) 90%,
          var(--clr-sand-primary) 90%,
          var(--clr-sand-primary)
        );
        background-size: 100% 2px;
        background-position: bottom center;
        background-repeat: no-repeat;

        &:last-child {
          background: none;
          padding-bottom: 8px;
        }

        & .amount {
          display: flex;
          flex-flow: column;
          background: var(--clr-bg);
          border-radius: 50%;
          width: 42px;
          height: 42px;
          padding: 6px 8px;
          color: var(--clr-green-dark);
          font-size: 1rem;
          line-height: 1;

          & span:nth-child(1) {
            font-weight: 700;
          }

          & span:nth-child(2) {
            font-size: 0.825rem;
          }
        }

        & .title-and-price {
          display: flex;
          flex-flow: column;
          align-items: start;
          flex: 1;

          & span:nth-child(1) {
            color: var(--clr-green-dark);
            text-align: left;
          }

          & span:nth-child(2) {
            color: var(--clr-bg);
          }
        }

        & button {
          border: none;
          background: none;
          padding: 0;
        }

        & .product-thumbnail {
          border: 1px solid var(--clr-green-dark);
          width: 42px;
          height: 42px;
          padding: 2px;
          object-fit: contain;
          background-color: var(--clr-bg);
        }
      }
    }

    & .note {
      display: flex;
      align-items: center;
      padding: 8px;
      gap: 4px;
      background: var(--clr-sand-primary);

      & span {
        display: flex;
        justify-content: center;
        align-items: center;
        background: var(--clr-bg);
        border-radius: 50%;
        width: 42px;
        height: 42px;
        color: var(--clr-green-dark);
        font-size: 0.875rem;
      }

      & div {
        flex: 1;
        padding: 6px 8px 6px 8px;
        text-align: left;
        color: var(--clr-green-dark);
      }
    }

    & .order-buttons {
      display: flex;
      justify-content: space-between;
      padding-top: 4px;
      padding-bottom: 4px;
      & button {
        display: flex;
        align-items: center;
      }
      & .prep-time-display {
        background-color: var(--clr-bg);
        color: var(--clr-primary);
        padding: 0 2px;
        margin-left: 2px;
      }
    }
  }

  div.order-customer-data {
    display: flex;
    flex-direction: column;
    width: 85%;
    padding: 6px;
    background-color: var(--clr-bg);
    border: 1px solid var(--clr-sand-primary);
    border-top: 0px;
    gap: 4px;

    & h1 {
      font-size: 1rem;
      text-align: start;
      font-weight: 500;
    }

    & .data {
      display: flex;
      flex-flow: column;
      font-size: 0.875rem;
      justify-content: space-between;
      padding: 2px 8px 2px 8px;
      gap: 3px;

      & div {
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid var(--clr-sand-primary);
      }
    }
  }
}

.htmx-request .button-spinner,
.htmx-request.button-spinner {
  display: inline-block;
}

.order-search {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  margin: auto;
  gap: 20px;
  font-family: RightGrotesk;

  /* --- ORDER SEARCH FORM --- */
  & form {
    display: flex;
    flex-direction: column;
    width: auto;
    margin: auto;

    & .order-search-row {
      width: 100%;
      display: flex;
      align-items: center;
    }

    & label {
      color: var(--clr-primary);
      font-family: RightGrotesk;
      text-transform: uppercase;
      font-size: 1.5rem;
      margin-bottom: 16px;
      font-weight: bold;
    }

    & input {
      width: auto;
      padding: 8px 8px 8px 12px;
      font-size: 1.2rem;
      border: 1px solid var(--clr-primary);
      color: var(--clr-primary);
    }
    /* Chrome, Safari, Edge, Opera */
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
    /* Firefox */
    input[type="number"] {
      -moz-appearance: textfield;
    }
  }
}

.order-search-title {
  width: 100%;
  height: 100px;
  background-color: var(--clr-primary);
  display: flex;
  align-items: center;

  & a {
    margin: auto;
  }

  & h1 {
    font-family: RightGroteskCompact;
    text-transform: uppercase;
    color: var(--clr-on-primary);
    margin: auto;
    font-size: 2rem;
  }
}

.order-display {
  width: 80%;
  margin: auto;
  margin-top: 16px;
}

/* --- SEARCH RESULT DIV --- */
.order-search-result {
  border: 1px solid var(--clr-primary);
  padding: 10px;
  margin-bottom: 32px;
  background-color: white;

  & h2 {
    text-transform: uppercase;
    color: var(--clr-primary);
    margin-bottom: 12px;
  }
  /* --- TABLE --- */
  & table {
    width: 100%;
    border-collapse: collapse;
    border: none;

    & thead {
      background-color: var(--clr-primary);
      color: var(--clr-on-primary);
      height: 48px;
      font-size: 1.2rem;
    }

    & tbody tr {
      font-size: 1.25rem;
      border-bottom: 2px solid var(--clr-primary);

      &:last-child {
        border: 0;
      }
    }

    & tr td,
    & tr th {
      padding: 10px 0 10px 10px;
      text-align: left;
      margin-bottom: 16px;
      padding-left: 12px;
      max-width: 200px;
      white-space: normal;
      word-wrap: break-word;
      word-break: break-word;
      overflow-wrap: break-word;

      &.order-search-error {
        text-align: center;
      }
    }
  }
}

@media (max-width: 767px) {
  .order-search-title {
    flex-direction: column;
    height: 100px;
    padding: 10px;
    & h1 {
      font-size: 2rem;
      padding-left: 15px;
    }
  }
  .order-search form,
  .order-display {
    width: 100%;
    padding: 0 16px;
  }

  .order-search form {
    display: flex;
    flex-direction: column;

    & .order-search-row {
      flex-direction: column;
    }

    & input {
      width: 100%;
    }

    & button {
      margin: 16px 0 0 0;
      width: 100%;
    }
  }

  .order-search-result {
    width: 95%;
    margin: auto;
    margin-bottom: 16px;
  }

  .order-search-result table {
    & table,
    & thead,
    & tbody,
    & th,
    & td,
    & tr {
      display: block;
    }

    & thead {
      display: none;
    }

    & tbody tr {
      margin-bottom: 16px;
    }

    & tbody tr td {
      padding: 0;
    }

    & tr td {
      display: flex;
      justify-content: space-between;
      max-width: 100%;
      text-align: right;

      &.order-search-error {
        display: block;
        margin-top: 16px;
      }
    }

    & tbody td::before {
      content: attr(data-label);
      flex-basis: 50%;
      flex-shrink: 0;
      text-align: left;
    }
  }
}

div.orders-page {
  font-family: RightGrotesk;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  width: 100%;
  color: var(--clr-primary);
  justify-content: center;
  gap: 20px;
  padding: 20px;

  & h1 {
    background-color: var(--clr-primary);
    color: var(--clr-on-primary);
    width: fit-content;
    padding: 5px;
    font-size: 1rem;
    font-weight: 800;
    font-family: RightGroteskCompact;
    align-self: center;
  }

  & .order-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
    & h2 {
      text-align: center;
      margin-bottom: 4px;
    }
  }

  & .order-list {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 10px;
    width: 100%;

    & .order-list-item {
      & div.summary {
        display: grid;
        padding: 8px 12px;
        border: 1px solid var(--clr-primary);
        list-style-type: none;
        background-color: var(--clr-primary);
        color: var(--clr-on-primary);
        grid-template-areas:
          "orderno loader status"
          "orderno loader date"
          "orderno loader time";
        grid-template-columns: min-content 1fr 1fr;

        &.new-order {
          background-color: var(--clr-tertiary);
          border-color: var(--clr-tertiary);
        }

        & .button-spinner {
          grid-area: loader;
          justify-self: start;
          align-self: center;
          border-color: white;
          border-top: 2px solid transparent;
        }

        & h1 {
          grid-area: orderno;
          text-align: left;
          font-size: 2.5rem;
          background-color: transparent;
        }

        & .status {
          grid-area: status;
          text-align: right;
        }

        & .date {
          grid-area: date;
          text-align: right;
          padding-right: 16px;
          background-image: url("../images/calendar-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
          background-repeat: no-repeat;
          background-position: right center;
        }

        & .time {
          grid-area: time;
          text-align: right;
          padding-right: 16px;
          background-image: url("../images/time-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
          background-color: var(--clr-bg);
          color: var(--clr-primary);
          background-repeat: no-repeat;
          background-position: right center;
          width: fit-content;
          justify-self: end;
        }

        &.htmx-request {
          background: linear-gradient(
            135deg,
            var(--clr-primary),
            var(--clr-primary-light),
            var(--clr-green-dark)
          );

          &.new-order {
            background: linear-gradient(135deg, var(--clr-tertiary), #f88635, #ca5807);
          }

          background-size: 450% 450%;
          background-position: 0 0;
          animation: animated-gradient 5s ease infinite;
        }
      }

      &.htmx-request {
        & div.summary {
          background: linear-gradient(
            135deg,
            var(--clr-primary),
            var(--clr-primary-light),
            var(--clr-green-dark)
          );

          &.new-order {
            background: linear-gradient(135deg, var(--clr-tertiary), #f88635, #ca5807);
          }

          background-size: 450% 450%;
          background-position: 0 0;
          animation: animated-gradient 5s ease infinite;
        }

        & .receipt-expanded {
          animation: fold-up 0.5s ease forwards;
          transform-origin: top center;
        }
      }

      &:has(div > .receipt-expanded) {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        overflow: scroll;
        padding-bottom: 30px;
        backdrop-filter: blur(5px);
        z-index: 10;
        background-color: rgba(0, 0, 0, 0.3);

        & div.summary {
          position: sticky;
          top: 0px;
          z-index: +1;
        }
      }
    }
  }
}

@keyframes animated-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fold-down {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes fold-up {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0);
  }
}

div.store-management-page {
  font-family: RightGrotesk;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 100%;
  color: var(--clr-primary);
  justify-content: center;
  gap: 20px;

  & .banner {
    height: 25px;
    width: 100%;
    justify-self: flex-start;
    background-color: var(--clr-primary);
  }

  & .content {
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;

    & .store-list {
      display: flex;
      flex-direction: column;
      margin-top: 30px;
      gap: 20px;
      text-align: center;
      cursor: pointer;

      & .store-item {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 32px;

        & button {
          flex: 1 1 auto;
          width: 100%;
          border: 1px solid var(--clr-primary);
          color: var(--clr-primary);
          background: var(--clr-bg);
          padding: 10px;
          cursor: pointer;
          transition: 0.3s;

          & h2 {
            margin: 8px;
          }

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

        & .store-toggles {
          margin-left: auto;
          display: flex;
          gap: 8px;
          justify-content: flex-end;
          align-items: flex-start;
          flex: 0 0 280px;
          flex-direction: column;
        }

        & h4 {
          color: var(--clr-primary-disabled);
          font-style: italic;
          margin-block: 4px 4px;
        }

        & .store-toggles .toggle-switch {
          display: flex;
          align-items: center;
          gap: 8px;
          position: relative;

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

          & .slider {
            width: 40px;
            height: 22px;
            background: #ccc;
            border-radius: 22px;
            position: relative;
            transition: background 0.2s;
            cursor: pointer;
            flex-shrink: 0;
            display: inline-block;

            &::before {
              content: "";
              position: absolute;
              left: 2px;
              top: 2px;
              width: 18px;
              height: 18px;
              background: #fff;
              border-radius: 50%;
              transition: transform 0.2s;
            }
          }

          & input[type="checkbox"]:checked + .slider {
            background: #4caf50;

            &::before {
              transform: translateX(18px);
            }
          }

          & .toggle-label {
            font-size: 1rem;
            margin-left: 8px;
            white-space: nowrap;
            flex: 1 1 auto;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
      }
    }
  }
}

@media (max-width: 767px) {
  div.store-management-page {
    & .content {
      & .store-list {
        gap: 32px;

        & .store-item {
          flex-direction: column;
          align-items: center;
          gap: 0px;

          & button {
            width: 90%;
            margin-bottom: 16px;
          }

          & .store-toggles {
            margin-left: 0;
            justify-content: flex-start;
            width: 50%;
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: flex-start;
            flex: auto;
          }
        }
      }
    }
  }
}

div.subcategory {
  margin: 10px;
  & h1 {
    margin-bottom: 15px;
    font-size: 1.6rem;
  }
}

.search-page {
  & .search-result-title {
    color: var(--clr-primary);
    font-family: RightGroteskCompact;
    margin: 20px 0;

    & span {
      display: inline-block;
      background: var(--clr-primary);
      color: var(--clr-bg);
      padding: 5px;
    }
  }

  & .search-results {
    max-width: 98rem;
    margin: auto;
    padding: 10px;

    & .product-block {
      animation: 1s fade-up;
      animation-fill-mode: both;

      &:nth-child(1) {
        animation-delay: 0.1s;
      }
      &:nth-child(2) {
        animation-delay: 0.3s;
      }
      &:nth-child(3) {
        animation-delay: 0.5s;
      }
      &:nth-child(4) {
        animation-delay: 0.7s;
      }
      &:nth-child(n + 5) {
        animation-delay: 0.9s;
      }
    }
  }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #eee;
  border-top: 3px solid var(--clr-primary);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
  animation: spin 1s linear infinite;
  align-self: center;
}

.htmx-request .spinner,
.htmx-request.spinner {
  opacity: 1;
  visibility: visible;
}

#change-pw-popup {
  width: 25rem;

  & form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--clr-primary);
    padding: 10px;
    gap: 5px;
    text-align: center;

    & > input {
      width: 100%;
      height: 50px;
      border: 1px solid var(--clr-primary);
      color: var(--clr-primary);
      padding: 6px 8px 6px 8px;
    }

    & > div {
      width: 100%;
      margin: 5px;
      display: flex;
      justify-content: space-between;
      flex-direction: row;
      text-transform: uppercase;
    }
  }
}

.sign-in-page {
  font-family: RightGrotesk;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--clr-bg);
  color: var(--clr-primary);
  & form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    background: var(--clr-bg);
    border: 1px solid var(--clr-primary);
  }

  & label {
    font-weight: 500;
    color: var(--clr-primary);
    margin-bottom: 4px;
  }

  & input[type="text"],
  & input[type="password"] {
    padding: 10px 8px;
    font-size: 1rem;
    border: 1px solid var(--clr-primary);
    background: #fff;
    color: var(--clr-primary);
    outline: none;
    box-shadow: none;
    border-radius: 0;
    font-family: inherit;
  }

  & button[type="submit"] {
    padding: 12px 0;
    background: var(--clr-primary);
    color: var(--clr-on-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    &:hover {
      background: var(--clr-green-dark);
    }
  }

  & .error-message {
    color: var(--clr-secondary);
  }
}

@media (max-width: 767px) {
  .sign-in-page {
    & form {
      max-width: 100%;
      border: none;
      box-shadow: none;
    }
  }
}

.user-management-page {
  font-family: RightGrotesk;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  color: var(--clr-bg);

  & .banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 144px;
    width: 100%;
    padding: 0 32px 0 32px;
    background-color: var(--clr-primary);
    margin-bottom: 16px;

    & a {
      justify-self: start;
    }

    & h2 {
      justify-self: center;
    }
  }

  & .list-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 90%;
    margin-bottom: 16px;

    & .header-col {
      background-color: var(--clr-primary);
      font-size: 1.2rem;
      padding: 16px 8px;
      text-align: left;
      color: var(--clr-bg);
      display: flex;
      align-items: center;

      &:first-child {
        border-right: 4px solid var(--clr-bg);
      }

      &:last-child {
        background-color: transparent;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 10px;

        & .header-title {
          background-color: var(--clr-primary);
          flex: 1;
          height: 100%;
          display: flex;
          align-items: center;
          padding: 0 8px;
        }

        & .new-user-btn {
          font-family: RightGrotesk;
          font-size: 1rem;
          text-transform: uppercase;
          color: var(--clr-bg);
          background: var(--clr-primary);
          border-radius: 75px;
          padding: 10px 16px 10px 16px;
          border: none;
          cursor: pointer;
        }
      }
    }
  }

  & .list-body {
    display: flex;
    flex-direction: column;
    width: 90%;
    gap: 16px;

    & .user-row {
      display: flex;
      width: 100%;
      margin-top: 4px;
      position: relative;
      border: 0px solid transparent;
      transition: all 0.3s ease-in-out;

      & .row-content {
        flex: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        background: var(--clr-sand-light);
        padding: 8px;
        & .col-user {
          align-content: center;
          border-right: 4px solid var(--clr-sand-primary);
          padding-right: 8px;
        }

        & .col-store {
          width: 100%;
          background-color: var(--clr-sand-light);
          padding: 8px;
          display: flex;
          flex-direction: column;
          justify-content: center;

          & > .select-container {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            background-color: var(--clr-bg);
            border: 1px solid var(--clr-primary);
            min-height: 50px;
            padding: 8px;
            gap: 8px;

            & > .tag-list {
              display: flex;
              flex-wrap: wrap;
              gap: 4px;

              & .store-tag {
                height: 32px;
                display: flex;
                align-items: center;
                background: var(--clr-primary);
                color: var(--clr-bg);
                padding: 0 8px;

                &.new-tag {
                  background: var(--clr-tertiary);
                }

                & .remove-tag {
                  background: transparent;
                  border: none;
                  color: var(--clr-bg);
                  font-size: 1.1rem;
                  margin-left: 6px;
                  cursor: pointer;
                }
              }
            }

            & > input {
              flex: 1;
              height: auto;
              min-width: 100px;
              border: none;
              outline: none;
              background: transparent;
              color: var(--clr-primary);
              font-size: 1rem;
              padding: 0px;
            }

            & > .store-results {
              position: absolute;
              top: 100%;
              left: 50%;
              transform: translateX(-50%);
              width: 95%;
              z-index: 100;

              background: var(--clr-bg);
              box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.2);

              &:has(li) {
                border: 1px solid var(--clr-primary);
              }

              & > ul {
                max-height: 150px;
                overflow-y: auto;

                & > li {
                  display: flex;
                  padding: 10px;
                  color: var(--clr-primary);
                  border-bottom: 1px solid var(--clr-primary);
                  cursor: pointer;

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

      & .row-actions {
        position: absolute;
        right: -50px;
        top: 0;
        height: 100%;
        opacity: 0;
        visibility: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background-color: var(--clr-tertiary);
        transition: all 0.3s ease-in-out;

        & button {
          text-decoration: none;
          background: none;
          cursor: pointer;
          border: 0;
        }
      }

      &:has([data-changed="true"]) {
        border: 8px solid var(--clr-tertiary);

        & .row-actions {
          opacity: 1;
          visibility: visible;
        }
      }
    }
  }

  & .user-info-grid {
    display: grid;
    font-family: RightGrotesk;
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "delete name name name"
      "email email email change-pw";
    gap: 8px;
    align-items: center;

    & .delete-user-btn {
      grid-area: delete;
      width: 40px;
      height: 40px;
      background: var(--clr-primary);
      border: none;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    & input {
      font-size: 1rem;
      padding: 8px;
      border: 1px solid var(--clr-primary);
      background-color: var(--clr-bg);
      outline: 0;
      color: var(--clr-primary);
      background-image: url("../images/pencil-icon.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
      background-repeat: no-repeat;
      background-position: right 12px center;
    }

    & .user-name-input {
      grid-area: name;
    }

    & .user-email-input {
      grid-area: email;
    }

    & .change-pw-btn {
      grid-area: change-pw;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--clr-primary);
      background: var(--clr-sand-light);
      border: 1px solid var(--clr-primary);
      padding: 10px 16px;
      border-radius: 75px;
      margin-left: 8px;
      text-decoration: none;
    }

    & input[data-changed="true"] {
      border: 1px solid var(--clr-tertiary);
      outline: 1px solid var(--clr-tertiary);
      color: var(--clr-tertiary);
    }
  }
}

.user-row-spinner {
  position: absolute;
  z-index: 100;
  width: 48px;
  height: 48px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-color: var(--clr-bg);
  box-shadow: 0px 4px 6px 1px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;

  &::after {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--clr-sand-light);
    border-top: 3px solid var(--clr-tertiary);
    animation: spin 1s linear infinite;
  }
}

.htmx-request .user-row,
.htmx-request.user-row {
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 50;
  }

  & .user-row-spinner {
    opacity: 1;
    visibility: visible;
  }
}

section.products-grid {
  display: grid;
  font-family: RightGrotesk;
  color: var(--clr-primary);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  & .product-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: 0.3s;
    position: relative;
    background-color: color-mix(in srgb, var(--clr-ui), white 60%);
    border: 1px solid var(--clr-ui);

    & .details {
      padding: 5px 5px;
      align-self: start;
      background-color: var(--clr-bg);
      width: 100%;
      border-top: 1px solid var(--clr-ui);
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;

      & div {
        display: flex;
        flex-direction: column;

        & p {
          margin: 0;
          font-size: 1.6rem;
          font-weight: 800;
          font-family: RightGroteskCompact;
          white-space: nowrap;
          text-align: right;

          &:first-child {
            font-size: 1rem;
            font-weight: 200;
            text-align: left;
          }

          & span {
            font-size: 1rem;
            font-weight: 200;
            white-space: nowrap;
            text-align: right;
          }
        }
      }

      & > h1 {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

    &.unavailable {
      opacity: 0.6;
      & .product-image {
        position: relative;
        & span {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: rgba(0, 0, 0, 0.5);
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          & p {
            color: var(--clr-bg);
          }
          & p:first-of-type {
            font-size: 1.6rem;
            font-weight: bold;
          }
          & p:last-of-type {
            font-size: 1rem;
            background: var(--clr-primary);
            width: 100%;
            position: absolute;
            bottom: 0;
            text-align: center;
            padding: 6px;
          }
        }
      }
    }

    & .product-image {
      width: 100%;
      transition: 0.3s;

      & img {
        width: 100%;
        height: 300px;
        padding: 10px;
        object-fit: contain;
      }
    }

    & .product-image:active {
      border: 1px solid var(--clr-primary);
    }

    &:hover {
      transform: scale(1.1);
      z-index: 2;

      & .product-image {
        background-color: color-mix(in srgb, var(--clr-ui), white 30%);
        cursor: pointer;
      }
    }
  }
}

@media (max-width: 767px) {
  & section.products-grid {
    grid-template-columns: 1fr 1fr;

    & .product-block {
      width: 100%;
      max-width: calc(50vw - 22.5px);

      & .details {
        overflow-wrap: break-word;
        height: 100%;
      }

      & .product-image {
        & img {
          height: 200px;
        }
      }
    }
  }
}

#delete-user-popup {
  width: 25rem;

  & form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--clr-primary);
    padding: 10px;
    gap: 5px;
    text-align: center;

    & > div {
      width: 100%;
      margin: 5px;
      display: flex;
      justify-content: space-between;
      flex-direction: row;
      text-transform: uppercase;
    }
  }
}

main.error-page {
  font-family: RightGrotesk;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--clr-primary);
  gap: 20px;

  & .divider,
  .down {
    width: 100%;
  }
}

@keyframes background-slide-up {
  from {
    background-position: 0px 100px;
  }
  to {
    background-position: 0 -200px;
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

@keyframes fade-up {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

dialog.notification-overlay {
  & section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--clr-primary);
    padding: 10px;
    gap: 5px;
    text-align: center;

    & button {
      width: 200px;
    }

    & > div {
      width: 100%;
      margin: 5px;
      display: flex;
      justify-content: space-between;
      flex-direction: row;
    }
  }
}

#order-reason-popup {
  width: 25rem;

  & form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--clr-primary);
    padding: 10px;
    gap: 5px;
    text-align: center;

    & > select {
      width: 100%;
      height: 50px;
      border: 1px solid var(--clr-primary);
      color: var(--clr-primary);
      padding: 6px 8px 6px 8px;
    }

    & > textarea {
      justify-content: start;
      width: 100%;
      height: 100px;
      border: 1px solid var(--clr-primary);
      color: var(--clr-primary);
      padding: 6px 8px 6px 8px;
    }

    & > div {
      width: 100%;
      margin: 5px;
      display: flex;
      justify-content: space-between;
      flex-direction: row;
      text-transform: uppercase;
    }
  }
}

div.skeleton {
  display: flex;
  justify-content: stretch;
  flex-wrap: wrap;
  width: 100%;
  max-width: 98rem;
  margin: auto;
  gap: 20px;
  padding: 50px 15px;

  & > div {
    min-width: 150px;
    max-width: 300px;
    min-height: 300px;
    width: 100%;
    background: linear-gradient(-45deg, var(--clr-ui), var(--clr-bg));
    background-size: 400% 400%;
    animation: gradient 4s ease infinite;
    border: 1px solid var(--clr-ui);
  }
}

div.categories {
  position: fixed;
  overflow-y: scroll;
  overflow-x: hidden;
  height: 100vh;
  width: 100vw;
  background-color: var(--clr-bg);
  & nav {
    & ul {
      display: flex;
      flex-direction: row;
      padding: 0 10px;
      width: 100%;
      background-color: var(--clr-primary);
      color: var(--clr-on-primary);
      gap: 20px;
      overflow-x: scroll;
      scrollbar-width: none;
      justify-content: center;

      & li {
        & a {
          color: var(--clr-on-primary);
          text-decoration: none;
          padding: 10px 5px;
          display: block;
          transition: 0.3s;
          white-space: nowrap;
          text-transform: uppercase;

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

  & div.category {
    font-family: RightGrotesk;
    color: var(--clr-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 98rem;
    margin: auto;

    & + div.divider {
      max-height: 300px;
      transition: 0.3s;
      opacity: 1;
    }

    &:has(header > input:checked) {
      & + div.divider {
        max-height: 0;
        opacity: 0;
        transform: none;
        margin: 0;
      }

      & header {
        & h1 {
          &::before {
            transform: rotate(-180deg);
          }
        }
      }

      & .products {
        max-height: 0px;
        opacity: 0;
        overflow-y: hidden;
      }
    }

    & header {
      padding: 15px;
      font-size: 1.6rem;
      font-family: RightGroteskCompact;

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

      & h1 {
        width: fit-content;
        padding: 5px 10px;
        padding-left: 39px;
        position: relative;
        cursor: pointer;
        text-transform: uppercase;
        font-size: 1.6rem;
        color: var(--clr-on-primary);
        background-color: var(--clr-primary);

        &::before {
          background-image: url("/images/chevron.svg?v=SZ6LWHWzBmPfkuzjHyj5Ii9L0uA");
          background-repeat: no-repeat;
          background-size: 24px;
          content: "";
          width: 24px;
          height: 24px;
          position: absolute;
          left: 5px;
          top: 50%;
          margin-top: -12px;
          transform: rotate(-90deg);
          transition: 0.3s;
        }
      }
    }

    & .products {
      margin: 5px;
      transition: 0.3s;
      max-height: fit-content;
      opacity: 1;

      & .product {
        margin: 10px;

        & > h1 {
          margin-bottom: 15px;
          font-size: 1.6rem;
        }
      }
    }
  }
}

@media (max-width: 767px) {
  div.products-page {
    & header {
      & h1 {
        font-size: 1.5rem;
      }
    }

    & .products {
      & .product {
        & h1 {
          font-size: 1.2rem;
        }
      }
    }
  }
}

@media (max-width: 767px) {
  div.categories {
    & nav {
      & ul {
        justify-content: flex-start;
      }
    }
  }
}

