.main-flexbox {
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
}

.form-header,
.form-footer {
    width: 80%;
    background-image: linear-gradient(to bottom, var(--theme-background-colour), var(--theme-fade-out-background-color));
    border: solid 2px var(--theme-border-colour);
    border-style: solid solid none solid;
    border-radius: .5rem .5rem 0 0;
    margin: 0 0 .5rem 0;
    padding: .5rem;
    min-height: 5vh;
    & a{
        text-decoration: none;
    }
}

.form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    border-style: none solid solid solid;
    border-radius: 0 0 .5rem .5rem;
    margin: .5rem 0 .5rem 0;
    background-image: linear-gradient(to top, var(--theme-background-colour), var(--theme-fade-out-background-color));

    & button {
        padding: .2rem;
        margin: .5rem;
        width: 60%;
        font-size: 1.5rem;
        filter: var(--filter-button);
    }
}

input {
    &[type='checkbox'] {
        width: 1.5rem;
        filter: var(--filter-button);
        accent-color: var(--theme-background-colour);
    }

    &.fit {
        width: 60%;
        flex-grow: 2;
    }

    &.long {
        width: 100%;
    }

    &.short {
        width: 25%;
    }

    &.very-short {
        width: 15%;
    }

    &.medium {
        width: 40%;
    }
}

.chooser {
    display: flex;
    justify-content: center;

    & #shoots {
        font-size: 1.5rem;
        text-align: center;
        width: 60%;
        background-color: var(--theme-input-colour);
        color: var(--theme-contrast-colour);
        border-color: var(--theme-background-colour);
        border-radius: .3rem;

        & option {
            text-align: center;
        }
    }
}


form {
    width: 80%;
    padding: .5rem;

    & textarea {
        resize: none;
        width: 100%;
        height: 32vh;
        padding-left: .5rem;
        font-size: 1rem;
        background-color: var(--theme-input-colour);
        color: var(--theme-contrast-colour);
    }

    & input:not([type='checkbox']) {
        margin: .3rem;
        padding: .2em .2em .2em .5em;
        font-size: 1.2rem;
        background-color: var(--theme-input-colour);
        color: var(--theme-contrast-colour);
        border: 1px solid black;
    }

    & .form-input{
        display:flex;
        flex-direction:column;
        align-items: center;

        & label{
            text-align: center;
            font-size: 1.5rem;
            color: red;
        }
    }
}

fieldset {
    border: 1px solid #999;
    padding: .5rem 1rem .8rem;
    color: var(--theme-contrast-colour);

    &>div {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        width: 100%;
    }

    & .address {
        flex-flow: row wrap;
    }
}

.button {
    width: min(32vw, 20rem);
    height: min(8vw, 6rem);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--theme-background-colour);
    color: var(--theme-button-color);
    border-radius: .5rem .5rem 0 0;
    box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.5);
    margin: .5rem .5rem -2px .5rem;
    user-select: none;
    font-size: min(3vw, 2rem);

    &:not(.selected-button) {
        background-color: var(--theme-transparant-background-colour);
    }

    &.selected-button {
        z-index: 1;
        box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.5);
        border: solid 2px var(--theme-border-colour);
        border-style: solid solid none solid;
    }
}

#new-contact {
    display: block;
    width:100%;
}

#vraag-form {
    &>textarea {
        margin-top: .5rem;
    }

    &input {
        height: 2rem;
        padding-left: .5rem;
        margin-left: 0;
    }
}

    .hidden{
        display:none;
    }
    .visible{
        display:block;
    }

.contact-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 80%;
}

.address-fieldset {
    display: none;
}

.checkbox-container {
    display: flex;
    justify-content: center;
    width: 60%;
    margin: .3rem;
    margin-left: auto;
    margin-right: auto;
    padding: .2em;
    font-size: 1.2rem;
    border-radius: 3px;
    background-color: var(--theme-input-background);
    color: var(--theme-contrast-colour);

    & label {
        margin-left: 1rem;
    }

    &:has(input:checked)~.address-fieldset {
        display: block;
    }
}

@media only screen and (max-width: 600px),
(max-width: 880px) and (min-aspect-ratio: 3/2) {

    fieldset>div {
        display: flex;
        flex-flow: column nowrap;
        justify-content: space-between;
    }

    input {
        &.long {
            width: max(100%, 50vw);
        }

        &.short {
            width: 100%;

            &.indent {
                width: 50%;
                margin-left: 2rem;
            }
        }

        &.medium {
            width: 100%;
        }
    }

    form input:not([type='checkbox']) {
        width: 100%;
        padding: .1em .1em .1em .5em;
        margin: .5vw;
    }

    .checkbox-container {
        margin: .5vw auto;
        padding: .1em;

        & input[type='checkbox'] {
            width: 1rem;
        }
    }

    .chooser #shoots {
        font-size: 1.2rem;
    }
}

@media only screen and (max-width: 600px) {
    .form-footer button {
        font-size: 1rem;
    }

    .checkbox-container {
        width: 90%
    }

    .chooser #shoots {
        width: 90%
    }
}

@media only screen and (max-width: 880px) {
    input.short {
        width: 100%;
    }
}

@media only screen and (max-width: 880px) and (min-aspect-ratio: 3/2) {
    .main-flexbox {
        flex-direction: row;
        margin-top: 0;
    }

    .checkbox-container {
        font-size: .8rem;
        padding: .1em;
        width: 50%;
    }

    fieldset {
        padding: .2rem .4rem .2rem;

        & legend {
            font-size: .8rem;
        }

        & .address {
            justify-content: space-evenly;
        }
    }

    .button {
        width: min(18vw, 8rem);
        font-size: min(2.5vw, 1rem);
        transform: rotate(-90deg);
        height: 7.2vw;

        &:not(.selected-button) {
            background-color: var(--theme-transparant-background-colour);
        }

        &.selected-button {
            z-index: 1;
            box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.5);
            border: solid 2px var(--theme-border-colour);
            border-bottom-color: var(--theme-background-colour);
            z-index: 2;
        }
    }

    .contact-buttons {
        flex-direction: column;
        height: 100vh;
        width: calc(18vw * 2 / 5 - .3rem);
        overflow: visible;
        align-items: center;
    }


    .form-header,
    .form-footer {
        height: 90vh;
        width: 5vw;
        border-style: solid none solid solid;
        background-image: linear-gradient(to right, var(--theme-background-colour), var(--theme-fade-out-background-color));
        border-radius: .5rem 0 0 .5rem;
        margin: 0 .5rem 0 0;
        padding: .5rem;
        z-index: 1;
    }

    .form-footer {
        border-style: solid solid solid none;
        background-image: linear-gradient(to left, var(--theme-background-colour), var(--theme-fade-out-background-color));
        border-radius: 0 .5rem .5rem 0;
        margin: 0 .5rem 0 .5rem;
        width: 3rem;

        & button {
            padding: .2rem 4rem .2rem 4rem;
            margin: .5rem;
            width: 100vh;
            font-size: 1rem;
            transform: rotate(-90deg);
        }
    }

    form {
        width: 70%;
        max-height: 60%;

        & textarea {
            height: 20vh;
            font-size: 3.5vh;
        }

        &>textarea {
            height: 64vh;
        }

        & input:not([type='checkbox']) {
            margin: .5vh .5vh .5vh .5em;
            padding: .5vh;
            font-size: 3vh;
        }
    }

    .chooser {
        border-style: none;
        padding: 0;

        & #shoots {
            font-size: 3vh;
        }

        & legend {
            float: left;
            margin-right: 5vw;
        }
    }
}

h1 {
    text-align: center;
}