:root {
    --color-main: #043C7B;
    --color-main-hover: #2063ae;
    --color-secondary: #4D92CF;
    --color-error: #d02f2f;
    --color-input-border: rgb(142, 150, 175);
}

#page {
    overflow: unset;
}

.job-details {
    display: block;
    max-width: 950px;
    margin-inline: auto;

    h2:has(+ ul):not(:has(+ ul > li)) {
        display: none;
    }

    .chip {
        border-radius: 900000px;
        background: #F6F6F6;
        font-weight: 600;
        font-size: 1.1rem;
        width: max-content;
        display: inline-flex;
        align-items: center;
        padding-inline: 1.5rem;
        padding-block: .7rem;
        gap: .7rem;

        svg {
            display: inline-block;
            width: 2rem;
            aspect-ratio: 1 / 1;
        }

        &.small {
            font-size: .9rem;
            padding-inline: 1rem;
            padding-block: .2rem;
            gap: .3rem;

            svg {
                width: 1.5rem;
            }
        }
    }

    .chip-wrap {
        display: flex;
        flex-shrink: 0;
        flex-grow: 0;
        flex-wrap: wrap;
        gap: 1rem;
    }

    h1, h2, h3, h4, label{
        font-weight: 600;
        color: #000;
        font-size: 2.5rem;
        text-transform: none;
        text-wrap: balance;
        line-height: 1.3 !important;
    }

    h4, label {
        font-size: 1.6rem;
    }

    h3 {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
        font-size: 1.2rem;
        margin-bottom: .7rem !important;
        font-weight: 500;
        opacity: .8;
    }

    p, ul, ol, li {
        font-weight: 300;
        line-height: 1.5 !important;
        font-size: 1.5rem;
        max-width: 90ch;

        + h2, + p, + .candidatar-btn {
            margin-top: 3rem;

            @media (max-width: 800px) {
                margin-top: 1.5rem;
            }
        }

        &:has(+ a) {
            margin-bottom: 4rem;

            @media (max-width: 800px) {
                margin-top: 2rem;
            }
        }
    }

    ul {
        padding-left: 40px;
    }
    

    h2 {
        font-size: 2rem;
        margin-bottom: 5px !important;
    }

    a {
        color: #474747;
        font-weight: 600;
        transition: .12s;

        &:hover {
            color: var(--color-secondary);
        }
        
    }

    nav {
        margin-bottom: 3rem;

        br {
            display: none;
        }
    }

    header {
        display: flex;
        flex-direction: row;
        align-items: center;

        margin-bottom: 5rem;

        @media (max-width: 800px) {
            margin-bottom: 2rem;
        }
    }

    .candidatar-btn, button {
        margin-left: auto;
        background: var(--color-main);
        color: #fff;
        padding-inline: 2rem;
        padding-block: 1rem;
        border-radius: .6rem;
        border: none;
        font-family: inherit;

        &:hover {
            background-color: var(--color-main-hover);
        }

        @media (max-width: 800px) {
            &:not([type="submit"]) {
                display: none;
            }
            
        }

        &:hover {
            color: #fff;
        }
    }

    button {
        font-weight: 600;
    }

    
}

.job-details.job-listing {
    h1 {
        margin-top: 2rem !important;
    }

    .jobs {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.2rem;
        margin-top: 3rem;

        @media (max-width: 900px) {
            grid-template-columns: 1fr 1fr;
        }
        
        @media (max-width: 600px) {
            grid-template-columns: 1fr;
        }
    }

    .job-card {
        padding: 1.2rem;
        display: flex;
        flex-direction: column;
        width: 100%;
        min-height: 100px;
        box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
        border-radius: .4rem;

        &:hover {
            color: initial;
        }

        p {
            font-size: 1.1rem;
            margin-top: 1rem !important;
            height: max-content;
            margin-bottom: auto;
        }

        span {
            display: block;
            position: relative;
            margin-top: 1rem;
            font-weight: 600;
            font-size: 1.2rem;
        }
    }
}

.job-details.job-application {
    form {
        .input-group {
            display: flex;
            flex-direction: column;

            + .input-group {
                margin-top: 2rem;
            }

            &:has(input[required]):not(:has(label span), &[type="checkbox"]) label,
            &:has(input[required]) label span{
                &::after {
                    content: "*";
                    color: rgb(180, 2, 2);
                }
            }

            label {
                font-weight: 400;

                span {
                    margin-bottom: .5rem;
                    display: block;
                }
            }

            input, .drop-cv, select, textarea {
                border-radius: 6px;
                box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px;
                transition: .12s;
                padding-block: .3rem;
                box-sizing: content-box;
                border: 1.2px solid var(--color-input-border);
                min-height: 37px;
                line-height: 37px;
                padding-inline: 1rem;

                &:focus {
                    border-color: var(--color-main);
                }

                &:not(:placeholder-shown):invalid {
                    border-color: var(--color-error);
                }
            }

            textarea {
                line-height: 1.4 !important;
                padding-block: 1rem;
            }

            .drop-cv {
                min-height: 180px;
                display: flex;
                justify-content: center;
                align-items: center;
                background: rgba(0,0,0, 3%);
                flex-direction: column;
                cursor: pointer;

                p {
                    text-align: center;
                    font-weight: 550;
                    color: var(--color-main);
                }

                svg {
                    width: 8rem;
                }

                > * {
                    pointer-events: none;
                }
                
                > div {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;

                    &:not(:nth-child(1)) {
                        display: none;
                    }
                }

               
            }

            #uniform-CV {
                display: none;
            }
        }
    }

    header {
        margin-bottom: 2rem;
    }

    button[type="submit"] {
        margin-top: 2rem;
    }
}

body.beingDragged .job-details.job-application .drop-cv {
    background: rgb(207, 232, 255);
}

body.fileIsTooBig .job-details.job-application .drop-cv {
    .noFile {
        display: none !important;
    }

    &:has(.tooBig) {
        border-color: var(--color-error);
        background-color: #ffeeee;

        .tooBig {
            display: flex !important;
            
            p {
                color: var(--color-error);
            }
        }
    }
}

body.fileUploaded .job-details.job-application .drop-cv {
    .noFile {
        display: none !important;
    }

    &:has(.fileUploaded) {
        border-color: var(--color-main);
        background-color: #e6f2ff;

        .fileUploaded {
            display: flex !important;
        }
    }
}