body {
  color: var(--text-color);
  background-color: var(--alt-background);
}

.banner-hero {
  & {
    display: flex;
    flex-direction: column;
    padding: 10vh 15vw;
    /* min-height: 70vh; */
    box-sizing: border-box;

    background-image: linear-gradient(#001a3b69 60%, #ffffff20),
      url("https://www.brandtbil.se/wp-content/uploads/bil-pa-vag-genom-skog.jpg.webp");
    background-size: cover;
    background-position: center;
    color: var(--alt-text-color);
  }

  .banner-title-container {
    & {
      margin-top: auto;
      margin-bottom: auto;
    }
    & > h1 {
      & {
        text-align: center;
        font-size: var(--banner-title-fontsize);
        position: relative;
        width: max-content;
        margin: 0 auto;
        margin-bottom: 0.25em;

        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        background-color: rgba(0, 0, 0, 0.1);
      }

      &::before {
        content: "- Har du några -";
        width: max-content;
        font-size: 1.25rem;
        position: absolute;
        top: -0.75em;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
      }
    }
    & a {
      color: var(--alt-text-color);
      text-decoration: underline;
    }
    & > p {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      
      max-width: 100%;
      width: max-content;
      margin: 0 auto;
      font-weight: 300;
      font-size: var(--banner-text-fontsize);

      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      background-color: rgba(0, 0, 0, 0.1);
    }
    & > p:not(:last-of-type) {
      margin-bottom: 0.5em;
    }
  }
}

.padded-wrapper {
  & {
    width: 96ch;
    max-width: 100%;
    margin: 0 auto;
    padding: 4rem 5vw;
    box-sizing: border-box;
  }

  & a {
    text-decoration: underline;
  }
}

.public-form {
    & {
        /* border: 2px solid var(--main-color); */
        border: 1px solid var(--rimlight);
        border-radius: var(--card-border-radius);
        box-shadow: 2px 2px 6px var(--shadow);
        padding: 2rem;
        background-color: var(--background);
    }

    .flex {
        & {
            display: flex;
            gap: 2rem;
        }

        .input:not(:first-child) {
            margin-top: 0rem;
        }
    }

    .input {
        & {
            /* width: 32ch; */
            width: 100%;
            max-width: 100%;
            display: flex;
            flex-direction: column;
        }

            &:not(:first-child) {
                margin-top: 1rem;
            }

            & input,
            & textarea {
                & {
                    border: 0;
                    border: 1px solid var(--main-color);
                    border-radius: 4px;
                    font-family: var(--font);
                    font-size: var(--default-fontsize);
                    font-weight: 300;
                    padding: 0.5rem 0.75rem;
                    display: block;
                    resize: none;
                }
            }

            & textarea {
                height: 18ch;
            }

            & input[type="submit"] {
                margin: auto;
                font-family: var(--font);
                font-size: var(--default-fontsize);
                font-weight: 600;
                padding: 0.9rem;
            }

            & > label,
            .title {
                display: block;
                margin-bottom: 0.25rem;
            }

            &.multi-check {
                & {
                    gap: 0.15em;
                }

                    & > label {
                        margin-bottom: 0;
                    }

                .note {
                    font-size: max(12px, 0.75rem);
                }

                .custom-checkbox-wrapper {
                    & {
                        display: flex;
                        flex-direction: row;
                        gap: 0.5rem;
                        font-weight: 300;

                    }

                    input[type="checkbox"] {
                        position: absolute;
                        opacity: 0;
                        cursor: pointer;
                        height: 0;
                        width: 0;
                        margin: 0;
                    }

                    label {
                        position: relative;
                        padding-left: 1.5em;
                        cursor: pointer;
                        display: inline-block;
                        -webkit-user-select: none;
                        user-select: none;
                        font-size: 1rem;
                    }

                        label::before {
                            content: "";
                            position: absolute;
                            left: 0;
                            top: 0;
                            width: 0.875em;
                            height: 0.875em;
                            border: 2px solid var(--main-color);
                            background-color: var(--background);
                            border-radius: 2px;
                            transition: all 0.2s ease;
                        }

                        label:hover::before {
                            background-color: var(--alt-background);
                        }

                    input[type="checkbox"]:checked + label::before {
                        background-color: var(--main-color);
                        border-color: var(--main-color);
                    
                    }

                    label::after {
                        content: "";
                        position: absolute;
                        display: none;
                        left: 0.3125em;
                        top: 0.125em;
                        width: 0.33em;
                        height: 0.66em;
                        border: solid white; /* need to be changed, if main color is changed */
                        border-width: 0 3px 3px 0;
                        transform: rotate(33deg);
                    }

                    input[type="checkbox"]:checked + label::after {
                        display: block;
                    }

                    input[type="checkbox"]:focus + label::before {
                        outline: 2px solid blue;
                        outline-offset: 2px;
                    }

                    input[type="checkbox"]:focus {
                        outline: none;
                    }
                }
            }

            &:has(> *[required])::after {
                content: "*Obligatoriskt";
                font-size: max(12px, 0.75rem);
            }
    }
}

@media only screen and (max-width: 600px) {
  .banner-hero {
    & {
      padding: 10vh 5vw;
    }

    .banner-title-container {
      & {
        margin-top: unset;
        margin-bottom: 2rem;
      }
      &:has(> h1) {
        & > * {
          transform: translateY(0);
        }
      }

      & > h1 {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 2rem;
        margin-top: 1rem;
        &::before {
          top: -1em;
        }
      }

      & > p {
        max-width: 100%;
        /* text-align: center; */
        font-size: 1.15rem;
      }
    }
  }

  .public-form {
    & > .flex {
      flex-direction: column;
      gap: 1rem;
    }
  }
}
