form {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 40px auto;
    align-items: center;
    justify-content: center;
    background-color: var(--other-bg-color);
    border-radius: 20px;
    padding: 20px 0;

    div {
        width: 60%;
        margin: 10px auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;

        div {
            width: 100%;
        }
    }

    input:not([type=checkbox]), select, textarea {
        background-color: var(--a-color);
        border: none;
        border-radius: 5px;
        width: calc(100% - 20px);
        min-height: 3em;
        padding: 0 10px;
    }

    select {
        width: 100%;
    }

    button {
        border: none;
        border-radius: 5px;
        padding: 10px 20px;
        background-color: var(--buttons-bg-color);
        cursor: pointer;
        font-weight: bold;
        margin: 10px;
        color: var(--buttons-color);

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

    a {
        color: var(--header-bg-color);
        text-decoration: none;
        font-weight: bold;

        &:hover {
            color: var(--a-color-hover);
            text-decoration: underline;
        }
    }

    .event-place {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        width: 100%;

        select {
            width: 67%;
        }

        div {
            width: 30%;
        }
    }
}

.form-btn-link {
    width: 60%;
    display: flex;
    justify-content: center;

    .a-btn {
        background-color: var(--events-a-color);
        width: 100%;
        height: 100%;
        margin: auto;
        color: var(--a-color);
        font-weight: bold;
        text-align: center;
        border-radius: 5px;
        text-decoration: none;
        padding: 10px 0;

        &:hover {
            background-color: var(--a-color);
            color: var(--events-a-color);
            text-decoration: underline;
        }
    }
}

.save-btn {
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 10px;

    button {
        min-width: 40%;
    }
}

.separator {
    border-top: 1px solid var(--bg-main-color);
    padding-top: 20px;
    width: 100%;
}

.events-filters {
    background-color: var(--other-bg-color);
    padding: 0 20px;
    margin: 0;

    form {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;

        div {
            align-items: flex-start;
            width: fit-content;
        }
    }
}

.filters-checkboxes {
    align-items: flex-start;

    h3 {
        font-size: 1em;
        margin: 0;
    }

    div {
        flex-direction: row;
        width: 100%;
        margin: 0;
        justify-content: flex-start;
    }
}

.author {
    width: 60%;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    p {
        width: 100%;
        text-align: center;
    }
}

.form-errors {
    ul {
        width: 100%;
        list-style-type: none;
        padding: 0;
        margin: 20px auto;
        text-align: center;
    }
}

.error {
    font-size: 0.8em;
    font-style: italic;
    color: red;
}

.modal-btn {
    width: 100%;
    min-height: 3em;
    margin: 0;
}

#modal-container {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;

    .modal {
        background-color: var(--other-bg-color);
        position: relative;
        border-radius: 10px;
        max-height: 80vh;
        overflow: auto;
        width: calc(60% - 40px);
        padding: 20px;

        #close-modal {
            font-size: 2em;
            padding: .1em .4em;
            background-color: var(--red);
            border-radius: 100%;
            font-weight: bold;
            position: absolute;
            top: 5px;
            right: 5px;
            cursor: pointer;

            &:hover {
                color: white;
            }
        }

        #place-modal, #group-modal {
            display: none;
            width: 100%;
        }

        #group div {
            width: 100%;
        }

        .tag-container {
            flex-direction: row;
            margin: 0;
            width: 100%;
        }

        #address div, #coordinates div {
            width: 100%;
        }

        #coordinates {
            display: none;
        }

        #place_save {
            margin: auto;
        }
    }
}

@media (max-width: 430px) {
    form {
        width: 95%;
        margin: 5px auto;
        padding: 0;

        div {
            width: 95%;
            padding: 7px;
            margin: 0;

            .event-place {
                display: flex;
                flex-direction: column;
                width: 100%;
                padding:  5px 0 0 0;
                margin: 0;

                select, button {
                    width: 100%;
                }
            }
        }
    }

    .events-filters {
        padding: 0;

        form {
            margin: 0;
            flex-direction: column;
            align-items: center;

            div {
                width: 95%;
                padding: 7px;
                margin: 0;
            }
        }
    }

    .save-btn {
        width: 100%;

        button {
            width: 100%;
        }


    }
}
