

/*  */
/*  */
/*  */
/* ! BEG: Forms =============================================================================*/

/* currently there is no class for the form element itself */

/* Form outline is a line for a form element */
.form-outline~.form-outline {margin-top: 0}
.form-outline {
    position: relative;
    display: flex;
    /* margin: 1.5rem; */

    width: calc(100% - 3rem);
}

/* transition on all children of the form line*/
.form-outline * {
    transition: all .2s linear;
    -webkit-transition: all .2s linear;
}

/* inputs in the form element */
.form-control:focus { outline: none; border-color: var(--sc-secondary-background) }
.form-control {
    /* default: font-size = 1rem, line-height = 1.3 */
    padding: .6rem 1rem;
    
    /* 1.3 + 1.2 = 2.5 */
    height: 2.5rem;

    border: 0;
    background: transparent;
    outline: none;

    width: 100%;

    color: inherit;
    border: 2px solid var(--sc-foreground);
    border-radius: 0.3rem;
    /*z-index: 1; /* we want to select the input even if we click on the down arrow -> corrected via javascript*/
}

/* labels in the form element */
.form-control:focus~.form-label {color: var(--sc-secondary-background)}
.form-label {
    position: absolute;
    left: 0.5rem;
    top: -0.5rem;
    padding: 0 0.3rem;
    background-color: var(--sc-background);
    font-size: 0.9rem;
    line-height: 0.9rem;
    /*z-index: 2; /* we want to select the input even if we click on the down arrow -> corrected via javascript*/
}

/* Dropdowns */
.form-dropdownContainer {

}

.form-dropdownContainer.bottom-right {right: 0; top: 100%}
.form-dropdownContainer {
    display: none;
    position: absolute;

    top: 100%; left: 0;

    background-color: var(--sc-surface-background);
    box-shadow: var(--std-box-shadow);
    
    max-height: 40vh; /* to prevent long lists to be too long*/
    overflow-y: auto;
    width: 100%;

    z-index: 1;
}

.form-dropdownContainer .dropdown-item {width: 100%; text-align: left;}


.form-dropdownContainer:hover,
/* .form-control:hover~.form-label~.form-dropdownContainer, */
.form-control:focus~.form-label~.form-dropdownContainer {display: block}


/* We position the "caret down" inside the form line */
.form-outline .fas.fa-caret-down:hover {cursor: pointer}
.form-outline .fas.fa-caret-down {
    position: absolute;
    right: 0.5rem;
    top: 0; bottom: 0;
    margin: auto;

    font-size: 1.5rem;
    line-height: 2.5rem;
    /*z-index: 0; /* we want to select the input even if we click on the down arrow -> corrected via javascript*/
}


/* ?Checkboxes */

/* .form-checkbox:hover {background-color: var(--sc-primary-light-background); color: var(--sc-primary-light-foreground)} */
.form-checkbox-input:hover {cursor: pointer}
.form-checkbox-input {
    height: 1.5rem;
    width: 1.5rem;
}

.form-checkbox-label:hover {cursor: pointer}
.form-checkbox-label {
    flex: 1;
    text-align: left;
    padding-left: 1rem;
    line-height: 1.5rem;
    user-select: none;
}


/* ! END: Forms =============================================================================*/
/*  */
/*  */
/*  */