/*

Hallo Carsten. Ich hab schonmal mit Chatgpt Styles erzeugt. Tut mir also nicht sonderlich weh,
wenn du sie komplett löscht und was eigenes machst. ;)

*/

.factorial-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
}

.factorial-controls label {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.factorial-jobs-list {
    display: grid;
    gap: 1rem;
}

.factorial-job {
    border: 1px solid #ddd;
    padding: 1rem;
    /*border-radius: .5rem;*/
}

/*.factorial-job__title {*/
/*    margin: 0 0 .25rem;*/
/*}*/

.factorial-job__meta {
    list-style: none;
    margin: .5rem 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.factorial-job__more {
    text-decoration: none;
}

.factorial-empty {
    opacity: .7;
    font-style: italic;
}

.factorial-job-detail {
    max-width: 60rem;
}

.factorial-job__desc {
    margin-top: 1rem;
}

.factorial-job__table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.factorial-job__table th, .factorial-job__table td {
    border: 1px solid #eee;
    padding: .5rem;
    text-align: left;
    vertical-align: top;
}

/* ===== Apply Form ===== */
.fj-apply {
    max-width: 100%;
    margin: 1rem auto;
}

.fj-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.fj-field {
    display: block;
}

.fj-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.fj-field textarea,
.fj-field input[type="text"],
.fj-field input[type="email"],
.fj-field input[type="tel"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d9d9df;
    /*border-radius: 8px;*/
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

.fj-field textarea {
    min-height: 130px;
    resize: vertical;
}

.fj-field input[type="file"] {
    display: block;
    padding: 0.4rem 0;
    border: 1px dashed #d9d9df;
    /*border-radius: 8px;*/
    background: #fafafa;
}

.fj-field input[type="text"]:focus,
.fj-field input[type="email"]:focus,
.fj-field input[type="tel"]:focus,
.fj-field textarea:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, .15);
}

/* Checkbox-Reihe (Label enthält das Input) */
.fj-field label > input[type="checkbox"] {
    margin-right: .5rem;
    transform: translateY(1px);
}

/* Datenschutz-Hinweis */
.factorial-datenschutzhinweis {
    margin-top: .25rem;
    color: #555;
    font-size: .95rem;
}

.factorial-datenschutzhinweis a {
    color: #1e88e5;
    text-decoration: underline;
}

/* Actions */
.fj-actions {
    margin-top: .75rem;
}

.fj-btn {
    appearance: none;
    border: 0;
    border-radius: 0;
    padding: 10px 15px;
    background: #3c6395;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, transform .02s ease;
}

.fj-btn:hover {
    background: #005f8c;
}

.fj-btn:active {
    transform: translateY(1px);
}

/*!* Kleines Responsive-Finetuning *!*/
/*@media (min-width: 680px) {*/
/*    .fj-apply {*/
/*        max-width: 840px;*/
/*    }*/
/*}*/

/* ===== Multiple-Choice (Answers) ===== */
/*fieldset.fj-field {*/
/*    border: 1px solid #cfcfd6;*/
/*    !*border-radius: 10px;*!*/
/*    padding: 1rem 1rem 0.25rem;*/
/*    margin: 0.5rem 0 1rem;*/
/*    background: #fff;*/
/*}*/

/*fieldset.fj-field > legend {*/
/*    padding: 0 .5rem;*/
/*    font-weight: 700;*/
/*    font-size: 1.05rem;*/
/*    color: #222;*/
/*}*/

/*.fj-opt {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    gap: .55rem;*/
/*    padding: .5rem .25rem;*/
/*    margin: 0;*/
/*    font-weight: 600;*/
/*    line-height: 1.35;*/
/*    !*border-radius: 8px;*!*/
/*    cursor: pointer;*/
/*    transition: background-color .15s ease, box-shadow .15s ease;*/
/*}*/

/*.fj-opt + .fj-opt {*/
/*    margin-top: .25rem;*/
/*}*/

/*.fj-opt:hover {*/
/*    background: #f6f8fb;*/
/*}*/

/*.fj-opt input[type="checkbox"] {*/
/*    margin: 0;*/
/*    width: 1.1rem;*/
/*    height: 1.1rem;*/
/*    accent-color: #1e88e5; !* moderne Browser *!*/
/*}*/

/*!* Kompakter auf größeren Screens *!*/
/*@media (min-width: 700px) {*/
/*    fieldset.fj-field {*/
/*        padding: 1rem 1.25rem .5rem;*/
/*    }*/

/*    fieldset.fj-field .fj-opt {*/
/*        padding: .45rem .3rem;*/
/*    }*/
/*}*/

/* ===== Fehlerausgaben (Detailseite) ===== */
.factorial-job-detail__errors {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    column-gap: .6rem;
    align-items: start;

    background: #fdecea; /* zartes Rot */
    border: 1px solid #f5c2c7;
    border-left: 4px solid #d32f2f; /* Akzent links */
    color: #611a15;
    /*border-radius: 10px;*/
    padding: .9rem 1rem;
    margin: 1rem 0 1.25rem;
}

.factorial-job-detail__errors::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    margin-top: .15rem;

    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: #d32f2f;
    /*border-radius: 50%;*/
}

.factorial-job-detail__errors p {
    margin: 0;
    line-height: 1.45;
    white-space: pre-line; /* falls Zeilenumbrüche ohne <br> kommen */
}

.factorial-job-detail__errors p br {
    line-height: 1.2; /* engerer Abstand zwischen einzelnen Fehlerzeilen */
}


/*Carsten*/
* strong {
    font-weight: bold;
}
form.factorial-controls {
    .suche {
        width: 100%;
        background: #d0e0f5;
        padding: 20px;
        font-weight: bold;
        justify-content: center;

        span {
            margin-right: 20px;
        }

        input {
            width: 100%;
            max-width: 800px;
            background: #ffffff;
            padding: 10px;
            border: 0;
        }
    }
}

div.filter {
    width: 100%;
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-around;
    align-items: center;
    background: #d0e0f5;
    padding: 20px;

    label {
        font-weight: bold;
    }

    select {
        background: #ffffff;
        border: 1px solid #9ca9bb;
        padding: 5px 10px;
        font-size: 1rem;
    }

    button[type="submit"] {
        background: #ffffff;
        padding: 10px 15px;
        font-size: 1rem;
        font-weight: bold;
        border: 0;
    }
}

.factorial-jobs-list {
    article.factorial-job {
        border-left: 5px solid #d0e0f5;
        display: flex;
        justify-content: space-between;
        position: relative;
        border-radius: 0;

        a {
            text-decoration: none !important;
        }

        strong {
            font-weight: bold;
        }

        h3.factorial-job__title {
            flex: 0 0 50%;
            font-weight: bold;
        }

        ul.factorial-job__meta {
            flex: 0 0 50%;
            align-items: center;
        }

        li {
            flex: 0 0 calc(50% - .5rem);
        }

        p {
            background: #d0e0f5;
            height: 100%;
            margin: 0;
            padding: 0 20px;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            line-height: 20px;
            display: flex;
            align-items: center;

            img {
                width: 20px;
                height: 20px;
            }

            a {
                line-height: 20px;
                padding: 0;
                margin: 0;
            }
        }
    }
}

.factorial-job-detail {
    h2 {
        font-size: 2.5rem;
        font-weight: bold;
    }

    .fj-apply {
        margin-top: 50px;
        background: #d0e0f5;
        padding: 20px;

        .fj-form {
            flex-wrap: wrap;
            flex-direction: row;

            .fj-field {
                &:has(input[type="text"]),
                &:has(input[type="tel"]),
                &:has(input[type="email"]) {
                    flex: 0 0 48%;
                    @media all and (max-width: 768px) {
                        flex: 0 0 100%;
                    }
                }

                &:has(textarea) {
                    flex: 0 0 100%;
                }
            }

            fieldset {
                flex: 0 0 100%;
                display: flex;
                flex-direction: column;
                max-width: fit-content;
                legend {

                }
            }
        }

        .fj-actions {
            display: flex;
            justify-content: end;
            width: 100%;
        }
    }

    .detail-meta-list {
        display: flex;
        gap: 10px;
        margin: 0;
        padding: 0;

        > div {
            list-style-type: none;
            border-left: 5px solid #d0e0f5;
            padding: 5px 10px;
        }
    }

    .job-desc-box {
        border-left: 5px solid #d0e0f5;
        padding: 20px;
        margin: 20px 0;

        h3 {
            font-weight: bold;
        }
    }
}
