div.popup form.form {
    flex-grow: 1;
}

form.form {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
}

@media screen and (min-width: 768px) {
    :not(div.popup) form.form {
        min-width: 500px;
    }
}

form.form div.form-header {
    font-size: 24px;
    background-color: var(--dark-2);
}

form.form div.form-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
}
form.form div.form-group:last-child {
    margin-top: auto;
}
form.form div.form-group div.form-box {
    flex-basis: 0;
    flex-grow: 1;
}

form.form div.form-box {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
}
form.form div.form-box:last-child {
    margin-top: auto;
}

form.form input {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--dark);
}

form.form label.necessary, form.form span.necessary {
    color: var(--error);
}

form.form textarea {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--dark);
    min-height: 140px;
    max-height: 400px;
    resize: vertical;
}

form.form select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--dark);
}

/* PASS VIEWER BUTTON */
form.form button#passwordviewer {
    cursor: pointer;
    background: linear-gradient(168deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    border: none;
    justify-content: center;
    align-content: center;

    transition: color 0.1s;
}
form.form button#passwordviewer:hover {
    color: var(--dark-2);

    transition: color 0.1s;
}
form.form button#passwordviewer span {
    padding: 8px;
}


form.form div.checkboxes {
    display: grid;
    gap: 10px;
    padding: 10px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    background-color: white;
    border-radius: 10px;
    border: 1px solid black;
}
form.form div.checkboxes label {
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    background-color: var(--dark-2);
    color: var(--light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;

    transition: background-color 0.1s;
}
form.form div.checkboxes label:hover {
    background-color: var(--dark);

    transition: background-color 0.1s;
}
form.form div.checkboxes label:has(input[type="checkbox"]:checked) {
    background-color: var(--question-dark);

    transition: background-color 0.1s;
}

form.form div.checkboxes label input[type="checkbox"] {
    display: none;
}