/* * * * * * * * * * Formular * * * * * * * * * */

button {
    background-color: #f3f3f3;
    border: 1px solid #7f7f7f;
    border-radius: 5px;
    box-sizing: border-box;
    color: #3e3e3e;
    cursor: pointer;
    font-size: 100%;
    height: auto;
    margin-top: 20px;
    padding: 0.5em 1em;
    width: auto;
}

button:hover {
    border-color: #0072ba
}

button:active {
    background-color: #c4c4c4
}

/* Rahmen und Abstände (bedingt durch User-Agent-Style-Sheet) entfernen */
fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/* * * * * * * * * * Formular Login Mitglieder * * * * * * * * * */

div.mod_login form,
div.mod_lostPassword form {
    line-height: 2;
    margin: 1em 0;
}

div.mod_login label,
div.mod_lostPassword label {
    float: left;
    margin-right: 10px;
    width: 110px;
}

/* Breite der Text-Felder festlegen (für IE) */
div.mod_login input.text,
div.mod_lostPassword input.text {
    width: 200px;
}

div.mod_login div.widget-checkbox label,
div.mod_lostPassword div.widget-checkbox label {
    float: none;
    margin-left: 0.5em;
    margin-right: 0;
}

div.mod_login div.widget-checkbox input,
div.mod_login div.widget-submit button,
div.mod_lostPassword div.widget-submit button {
    margin-left: 120px;
}

/* Link zum Passwort-Reset ausrichten */
div.ce_text.passwordreset {
    margin-left: 130px;
}

/* TODO: Wo wird das verwendet? */
div.mod_login div.widget-submit button[value="Abmelden"] {
    margin-left: 0;
}

/* * * * * * * * * * Formular Veranstaltung * * * * * * * * * */

/* Listensymbol für alle Navigationselemente deaktivieren */
form.veranstaltung fieldset {
    border: 1px solid #c4c4c4;
}

/* Rahmen und Abstände für Fieldsets um Radio-Buttons zurücksetzen */
form.veranstaltung fieldset.radio_container,
form.veranstaltung fieldset.checkbox_container {
    border: none;
    margin: 0;
    padding: 0;
}

form.veranstaltung input.text {
    width: 300px;
}

form.veranstaltung div.widget {
    margin-bottom: 1em;
    margin-top: 1em;
}

form.veranstaltung div.widget p.error {
    color: #cc0000;
    display: inline;
    float: right;
    margin: 0;
}

form.veranstaltung fieldset > legend,
form.veranstaltung label {
    float: left;
    margin: 0;
    margin-right: 10px;
    padding: 0;
    width: 185px;
}

form.veranstaltung fieldset.radio_container label,
form.veranstaltung fieldset.checkbox_container label {
    float: none;
    margin-right: auto;
    width: auto;
}

form.veranstaltung fieldset.radio_container span {
    margin-right: 1em;
}


/* * * * * * * * * * Formular Umfrage * * * * * * * * * */

/* Formatierung für Fieldsets mit Ausnahme der Checkbox-Gruppen (Klasse fieldset.checkbox_container) */
form.umfrage fieldset:not(.checkbox_container) {
    background-color: #f3f3f3;
    border: 1px solid #c4c4c4;
    border-radius: 10px;
    margin: 30px 0;
}

form.umfrage fieldset legend {
    background-color: #ffffff;
    border: 1px solid #c4c4c4;
    border-radius: 10px;
    margin-left: 20px;
    padding: 5px 10px;
}

form.umfrage fieldset.radio_container legend {
    margin-left: 0;
}

form.umfrage fieldset.radio_container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
}

/* Aussenabstand für Widgets mit Ausnahme der Radio-Gruppen */
form.umfrage div.widget {
    margin: 20px;
}

form.umfrage div.widget-radio {
    margin: 0;
}

/* Die Formatierung soll nicht für die Label von Checkbox-Gruppen gelten */
form.umfrage div.widget-select label,
form.umfrage div.widget-text label,
form.umfrage div.widget-textarea label {
    display: inline-block;
    margin: 0;
    margin-right: 10px;
    padding: 0;
    width: 100%;
}

/* Formatierung für die Label von Checkbox-Gruppen */
form.umfrage div.widget-checkbox label {
    margin: 0;
    margin-left: 10px;
    padding: 0;
}

form.umfrage input.text,
form.umfrage select,
form.umfrage textarea {
    border: 1px solid #c4c4c4;
    border-radius: 5px;
    box-sizing: border-box;
    color: #3e3e3e;
    font: 100% 'Source Sans Pro';
    height: 2em;
    width: 100%;
}

form.umfrage input.text,
form.umfrage textarea {
    padding: 0.5em;
}

form.umfrage select {
    padding: 0;
    padding-left: 0.5em;
}

form.umfrage textarea {
    height: 100px;
    resize: vertical;
}

@media screen and (min-width: 1200px) {

    /* Die Formatierung soll nicht für die Label von Checkbox-Gruppen gelten */
    form.umfrage div.widget-select label,
    form.umfrage div.widget-text label,
    form.umfrage div.widget-textarea label {
        min-width: 320px;
        vertical-align: top;
        width: 30%;
    }

    form.umfrage input.text,
    form.umfrage select,
    form.umfrage textarea {
        max-width: calc(100% - 360px);
        width: 70%;
    }
}


/* * * * * * * * * * Formular Suche (Header) * * * * * * * * * */

/* Ausrichtung des Formulars */
#header div.mod_form {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 100;
}

#header #suchformular {
    margin: 0;
}

#header #suchformular input.suchfeld {
    color: #6f6f6f;
    font-size: 80%;
    margin: 0;
    padding: 0 0.25em;
    width: 125px;
}

#header #suchformular .lupe {
    height: 90%;
    position: absolute;
    right: 1%;
    top: 5%;
}

/* Suchbegriffe im Text hervorheben */
.mod_search .highlight {
    background-color: rgba(0, 180, 0, .4);
}

/* * * * * * * * * * * * * * * * * * * * Media Queries * * * * * * * * * * * * * * * * * * * */

@media (max-width: 767px) {

    /* * * * * * * * * * Suchformular (Header) * * * * * * * * * */
    /* Auf Mobiles nicht anzeigen */
    #header div.mod_form {
        display: none;
    }
}

/* TODO: Wo wird das verwendet? Eventuell Newsletteranmeldung */
.mod_subscribe,
.mod_unsubscribe {
    margin-bottom: 1em;
}

/* * * * * * * * * * Filter * * * * * * * * * */

/* Filter (schmal): Formular auf Seiten mit Seitennavigation */
form.filter-schmal {
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #e4e4e4;
    border: 1px solid #c4c4c4;
}

/* Filter (schmal): Container für die Formularelemente */
form.filter-schmal > div.w50 {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    box-sizing: border-box;
}

/* Filter (schmal): Sub-Container für die Formularelemente */
form.filter-schmal > div.w50 > div {
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Filter (schmal): Label über den Formularfelder ausgeben */
form.filter-schmal label {
    display: block;
    font-size: 0.9rem;
}

/* Filter (schmal): Gestaltung der Formularelemente und volle Breite innerhalb des Containers zuweisen */
form.filter-schmal input,
form.filter-schmal select,
form.filter-schmal textarea {
    width: 100%;
    height: 2.4em;
    padding: 5px;
    background-color: #fefefe;
    border: 1px solid #7f7f7f;
    line-height: 1.4em;
    color: #444444;
    box-sizing: border-box;
}

/* Filter (schmal): Gestaltung inaktiver Formularelemente */
form.filter-schmal input[disabled],
form.filter-schmal select[disabled] {
    background-color: #f3f3f3;
    border-color: #c4c4c4;
    color: #7f7f7f;
}

/* Formular: Gestaltung Button */
input[type="submit"],
form.filter-schmal input[type="submit"] {
    width: auto;
    height: auto;
    margin-top: 20px;
    padding: 0.5em 1em;
    background-color: #f3f3f3;
    border: 1px solid #7f7f7f;
    border-radius: 5px;
    color: #444444;
    box-sizing: border-box;
    cursor: pointer;
}

/* Formular: Rahmenfarbe (Hover) */
input[type="submit"]:hover,
form.filter-schmal input[type="submit"]:hover {
    border-color: #86bce1;
}

/* Formular: Gestaltung Button (Active) */
input[type="submit"]:active,
form.filter-schmal input[type="submit"]:active {
    background-color: #c4c4c4;
}

/* Daten: Gestaltung der Formularelemente in den Standardobjekten */
form.daten select {
    width: 30%;
    height: 2em;
    margin-right: 2%;
    background-color: #fefefe;
    border: 1px solid #7f7f7f;
    font-size: 0.8rem;
    line-height: 1.4em;
    color: #444444;
    box-sizing: border-box;
}

@media (min-width: 960px) {

    /* Filter (schmal): zwei Container mit Formularelementen nebeneinander und mit jeweils halber Breite ausgeben */
    form.filter-schmal > div.w50 {
        width: 50%;
        float: left;
        display: inline;
    }
}
