*, *::before, *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    interpolate-size: allow-keywords;
}

body {
    margin: 0;
    padding: 0;
}

button {
    cursor: pointer;
}

#content {
    display: grid;
    grid-template-columns: 50vw 0;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: 
          radial-gradient(ellipse 70% 55% at 50% 50%, rgba(255, 107, 61, 0.10), transparent 50%),
          radial-gradient(ellipse 160% 130% at 10% 10%, rgba(58, 159, 107, 0.08), transparent 60%),
          radial-gradient(ellipse 160% 130% at 90% 90%, rgba(179, 58, 58, 0.20), transparent 65%),
          radial-gradient(ellipse 110% 50% at 80% 30%, rgba(255, 122, 0, 0.14), transparent 40%),
         #000;
    color: #f8f9fa;
    transition: grid-template-columns 0.3s ease;
    padding: 0 20px;
    place-items: center;
}

#main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1;
    height: auto;
    padding: 20px 0;
    width: 100%;
}

#logo {
    width: 340px;
}

#info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    
    h1 {
        font-family: "Manrope", sans-serif;
        font-weight: 500;
        font-size: 20px;
        margin-bottom: 0;
        color: #FFB347;
        text-shadow: 2px 2px 20px #A8743A;
        width: fit-content;
        padding: 5px 15px;
        border-radius: 5px;
        text-align: center;
    }
    
    #info-btn {
        position: relative;
        font-family: "Inter", sans-serif;
        font-weight: 400;
        font-size: 15px;
        padding: 10px 15px;
        width: 100%;
        transition: all 0.3s ease;
        color: #14FF8A;
        border: solid 1px #3A9F6B;
        margin-bottom: 0;
        border-radius: 5px;
        background: rgba(7, 26, 16, 0.42);
        backdrop-filter: blur(22px) saturate(182%);
        -webkit-backdrop-filter: blur(22px) saturate(182%);

        span {
            position: absolute;
            right: 10px;
            transition: all 0.5s ease;
        }

        &:hover {
            cursor: pointer;
            background: rgba(7, 26, 16, 0.80);
        }

        &:has(+ #info-content-wrapper.info-content-show) {
            span {
                transform: rotate(-180deg) translateY(-3px);
                transform-origin: center center;
            }
        }
    }

    #info-content-wrapper {
        overflow: hidden;
        height: 0;
        transition: height 0.5s ease-in-out;

        &.info-content-show {
            height: max-content;
        }
    }

    #info-content {
        height: max-content;
        margin-top: 0;
        background: rgba(13, 43, 30, 0.3);
        backdrop-filter: blur(30px) saturate(140%);
        -webkit-backdrop-filter: blur(30px) saturate(140%);
        font-family: "Inter", sans-serif;
        padding: 10px;
        border: solid 1px #2FA36B;
        border-radius: 5px;
        margin-top: 5px;

        h2, h3, p {
            font-size: 14px;
        }

        h2 {
            font-weight: 500;
            font-size: 18px;
            color: #94d2bd;
            font-family: "Manrope", sans-serif;
            margin-top: 0;
        }

        h3 {
            font-weight: 300;
            color: #78c6a3;
        }

        p {
            font-style: italic;
            font-size: 12px;
            color: #2FA88A;
            margin-bottom: 0;

            a {
                color: #94d2bd;
                text-decoration: none;
                font-weight: 400;

                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }
}

.content-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    width: 100%;
    min-height: 340px;
    margin-top: 10px;
}

#jobs-search {
    --jobsBaseFontSize: 16px;

    grid-column: 1;
    display: flex;
    background: rgba(47, 22, 13, 0.32);
    backdrop-filter: blur(22px) saturate(182%);
    -webkit-backdrop-filter: blur(22px) saturate(182%);
    color: #FF6A3D;
    border: solid 1px #9A3F28;
    border-radius: 5px;
    font-family: "Manrope", sans-serif;
    font-weight: bold;
    min-height: 0;

    & > * {
        flex-shrink: 1;
    }

    label {
        margin-top: 15px;
        font-size: var(--jobsBaseFontSize);

        &:nth-of-type(1) {
            margin-top: 0;
        }
    }

    input {
        width: 250px;
        height: 30px;
        margin-top: 5px;
        background: #2A1C16;
        color: #FF6840;
        border: solid 1px #8F4A34;
        border-radius: 4px;
        padding: 0px 5px;
        font-size: calc(var(--jobsBaseFontSize) - 3px);

        &:focus {
            outline: 1px solid #FF7A00;
        }

        &::placeholder {
            color: rgba(255, 104, 64, 0.4);
            font-style: italic;
        }
    }

    #experience-radiobtns {
        display: flex;
        align-items: center;
        margin-top: 20px;
        
        input {
            width: auto;
            height: auto;
            margin: 0 3px 0 8px;
            background: red;
            accent-color: #FF7A00;
        }

        label:not(:first-of-type){
            margin-top: 0;
            font-family: "Inter", sans-serif;
            font-size: calc(var(--jobsBaseFontSize) - 3.5px);
            font-weight: 400;
        }
    }

    #job-sites {
        display: flex;
        align-items: center;
        width: 100%;
        margin-top: 10px;

        p {
            font-size: var(--jobsBaseFontSize);
        }

        #companies {
            display: grid;
            grid-template-columns: repeat(5, 70px);
            align-items: center;
            justify-items: center;

            .company-logo {
                cursor: pointer;
                width: 30px;
                height: 30px;
                background-position: center;
                background-size: 40px;
                border-radius: 50%;
                opacity: 0.5;
                transition: all 0.5s ease;
                
                /* set opacity of logo whenever it's being hovered or it has been selected */
                &:hover, &[class*="selected"] {
                    opacity: 1;
                }

                /* set opacity of logo's company name when logo is being hovered */
                &:hover + .company-name {
                    opacity: 1;
                }

                /* set opacity of logo's company name when logo has been selected */
                &[class*="selected"] + .company-name {
                    opacity: 1;
                }
            }
    
            #ejobs {
                background-image: url('./icons/ejobs-romania-1.svg');
                grid-column: 1;   
            }
    
            #bestjobs {
                background-image: url('./icons/bestjobs-1.svg');
                grid-column: 2;
            }
            #hipo {
                background-image: url('./icons/hipo-1.svg');
                grid-column: 3;
            }
            #undelucram {
                background-image: url('./icons/undelucram-ro-1.svg');
                grid-column: 4;
            }

            #jooble {
                background-image: url('./icons/jooble-1.svg');
                grid-column: 5;
            }

            .company-name {
                font-size: calc(var(--jobsBaseFontSize) - 5px);
                margin-top: 3px;
                opacity: 0.5;
                transition: all 0.5s ease;

                &:nth-child(2) {
                    grid-column: 1;
                    grid-row: 2;
                }

                &:nth-child(4) {
                    grid-column: 2;
                    grid-row: 2;
                }

                &:nth-child(6) {
                    grid-column: 3;
                    grid-row: 2;
                }

                &:nth-child(8) {
                    grid-column: 4;
                    grid-row: 2;
                }

                &:nth-child(10) {
                    grid-column: 5;
                    grid-row: 2;
                }
            }
        }
    }

    #search-btn {
        position: relative;
        width: 100px;
        height: 30px;
        background: #3F1A12;
        color: #FF5A2E;
        border: solid 1px #B1452B;
        text-shadow: 1px 1px 15px #B1452B;
        transition: all 0.5s ease;
        z-index: 0;
        font-size: calc(var(--jobsBaseFontSize) - 2px);
        font-weight: 700;

        &::after {
            content: "";
            position: absolute;
            width: 0;
            height: 100%;
            top: 0;
            left: 0;
            background-color: #FF5A2E;
            transition: width 0.3s ease;
            z-index: -1;
        }

        &:hover::after {
            width: 100%;
        }

        &:hover {
            color: #3F1A12;
        }
    }

    #results {
        display: none;
        flex-direction: row;
        margin-top: 15px;

        #scraper-comms {
            margin: 0;
            font-family: "Inter", sans-serif;
            font-weight: 300;
            font-size: calc(var(--jobsBaseFontSize) - 3px);
            line-height: 20px;
        }

        a {
            display: none;
            width: 120px;
            height: 20px;
            margin-left: 10px;
            border-radius: 5px;
            background: #402100;
            color: #FF7A00;
            border: solid 1px #C75A1A;
            font-size: calc(var(--jobsBaseFontSize) - 5px);
            font-weight: 600;
            font-family: "Inter", sans-serif;
            text-align: center;
            text-decoration: none;
            margin-left: 15px;
            line-height: 18px;
        }
    }
}

#jobs-search.show, #jobs-overview.show, #jobs-news.show, #jobs-help.show {
    display: flex;
}

#scraper-content {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    height: 100vh;
    padding: 20px 0;

    #ai-prompts {
        width: 100%;
        display: none;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;

        button {
            width: calc(50% - 5px);
            height: 30px;
            font-size: 12px;
            font-family: "Inter", sans-serif;
            font-weight: 500;
            border-radius: 15px;
            transition: all 0.3s ease;

            &:disabled, &:disabled:hover {
                background: #333;
                color: gray;
                border-color: gray;
            }

            &:disabled:hover {
                text-shadow: none;
                cursor: not-allowed;
            }
        }

        .ai-filters { 
            background-color: rgba(27, 30, 35, 1);
            color: #FF2E88;
            border: solid 2px #A1446F;

            &:hover {
                background-color: rgba(27, 30, 35, 1);
                color: #ff167b;
                text-shadow: 0px 0px 20px rgba(255, 22, 123, 0.74);
            }
        }

        .reset-button {
            display: none;
            background: #0D2B1E;
            color: #00FF7F;
            border: solid 2px #2FA36B;
        }

        #ai-comms {
            flex-basis: 100%;
            font-family: "Inter", sans-serif;
            font-size: 16px;
            text-align: center;
            margin-top: 20px;
            background: rgba(47, 22, 13, 0.2);
            backdrop-filter: blur(17px) saturate(182%);
            -webkit-backdrop-filter: blur(17px) saturate(182%);
            padding: 10px;
            border-radius: 5px;
            border: dotted 2px #9A3F28;
            color: #FF6A3D;
        }
    } 

    #jobs-found {
        position: relative;
        display: none;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
        justify-items: center;
        border: solid 2px rgba(255, 90, 46, 0.5);
        border-radius: 5px;
        overflow: auto;
        padding: 5px;
        z-index: 0;
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);

        &::-webkit-scrollbar {
            width: 7px;
        }
        
        &::-webkit-scrollbar-track {
            background: transparent;
        }

        &::-webkit-scrollbar-thumb {
            background: #9a1f45;
            border-radius: 20px;
        }

        &::-webkit-scrollbar-thumb:hover {
            background: #b33a3a;
        }

        &.filters-running {
            overflow: hidden;

            &::after {
                position: absolute;
                content: '';
                display: block;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: #000;
                opacity: 0.5;
                z-index: 1;
            }
        }

        .job {
            position: relative;
            z-index: 0;
            display: flex;
            flex-wrap: wrap;
            width: 100%;
            height: auto;
            min-height: 100px;
            font-family: "Manrope", sans-serif;
            padding: 10px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s ease-in-out;
            overflow: hidden;

            &::before {
                content: "";
                position: absolute;
                inset: 10px;
                transform: translate(0px, 0px);
                z-index: -1;
                background: inherit;
                filter: blur(35px) opacity(0.7);
            }

            &::after {
                content: "";
                position: absolute;
                z-index: 1;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                background-color: #FF5A2E;
                transition: opacity 0.5s ease;
                opacity: 0;
                filter: blur(20px);
                transform-origin: center center;
            }

            &:hover::after {
                opacity: 0.2;
            }
    
            a {
                background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(245,235,220,1) 50%, rgba(220,200,170,1) 100%);
                color: transparent;
                background-clip: text;
                text-decoration: none;
                z-index: 2;
                
                &:nth-child(1) {
                    font-weight: bold;
                    flex-basis: 100%;
                }
    
                &:nth-child(3) {
                    margin-left: 3px;
                }

                &:hover {
                    text-decoration: underline;
                }
            }
    
            span, a:nth-child(3) {
                font-style: italic;
                font-size: 14px;

                background: linear-gradient(90deg, rgba(230,230,230,1) 0%, rgba(200,200,210,1) 50%, rgba(170,180,190,1) 100%);
                color: transparent;
                background-clip: text;
            }

            span {
                font-weight: bold;
                z-index: 2;
            }

            a:nth-child(3) {
                font-weight: 600;
                padding-right: 1px;
                z-index: 2;
            }
        }
    }
}

@media only screen and (max-width: 1350px) {
    #content {
        grid-template-columns: 75vw 0;
        grid-template-rows: auto auto;
        gap: 0;
        padding: 10px;

        #scraper-content {
            grid-row-start: 2;
            grid-column-start: 1;
        }
    }
}

@media only screen and (max-width: 865px) {
    #content {
        grid-template-columns: 85vw 0;

        #main-content {
            #logo {
                width: 220px;
            }

            #info {
                h1 {
                    font-size: 16px;
                }
                
                #info-btn {
                    font-size: 12px;
                    padding: 5px 10px;
                }

                #info-content {
                    h2 {
                        font-size: 14px;
                    }

                    h3 {
                        font-size: 11px;
                    }
            
                    p {
                        font-size: 10px;
                    }
                }
            }

            #jobs-search {
                --jobsBaseFontSize: 14px;

                #experience-radiobtns {
                    input {
                        width: 10px;
                    }
                }

                #job-sites {
                    align-items: normal;

                    #companies {
                        grid-template-columns: repeat(5, 60px);
                    }   
                }
            }

            #search-btn {
                margin-top: 10px;
                width: 90px;
                height: 25px;
            }
        }
    }
}

@media only screen and (max-width: 745px) {
    #content {
        #main-content {
            #info {
                h1 {
                    font-size: 12px;
                }

                #info-btn {
                    font-size: 10px;
                }

                #info-content {
                    h2 {
                        font-size: 12px;
                    }
    
                    h3 {
                        font-size: 10px;
                    }
            
                    p {
                        font-size: 9px;
                    }
                }
            }

            #jobs-search {
                --jobsBaseFontSize: 10px;

                input[type="text"] {
                    width: 200px;
                    height: 20px;
                }

                #experience-radiobtns {
                    input {
                        width: 8px;
                    }
                }

                #job-sites {
                    align-items: normal;

                    #companies {
                        grid-template-columns: repeat(5, 45px);

                        .company-logo {
                            width: 25px;
                            height: 25px;
                        }
                    }   
                }
            }
            
            #search-btn {
                width: 80px;
                height: 20px;
            }
        }
        
        #scraper-content {
            #ai-prompts {
                .ai-filters {
                    font-size: 10px;
                    height: 25px;
                }

                #ai-comms {
                    height: 30px;
                    padding: 5px;
                    font-size: 12px;
                }
            }

            #jobs-found {
                gap: 20px 15px;

                .job {
                    min-height: 80px;

                    a:nth-child(1) {
                        font-size: 12px;
                    }

                    span, a:nth-child(3) {
                        font-size: 10px;
                    }
                }
            }
        }
    }
}

@media only screen and (max-width: 535px) {
    #content {
        #main-content {
            #logo {
                width: 140px;
            }

            #info {
                h1 {
                    font-size: 11px;
                }
                
                #info-btn {
                    font-size: 7.5px;
                    padding: 3px 8px;
                }

                #info-content {
                    padding: 5px 8px;

                    h2 {
                        font-size: 11px;
                    }
    
                    h3 {
                        font-size: 9px;
                    }
            
                    p {
                        font-size: 8px;
                    }
                }
            }

            #jobs-search {
                --jobsBaseFontSize: 10.5px;

                #experience-radiobtns {
                    input {
                        width: 6px;
                    }
                }

                #job-sites {
                    #companies {
                        grid-template-columns: repeat(5, 45px);

                        .company-logo {
                            width: 15px;
                            height: 15px;
                        }
                    }   
                }
            }
        }
        
        #scraper-content {
            #ai-prompts {
                gap: 5px;
                
                .ai-filters {
                    width: 49%;
                    font-size: 7px;
                    height: 20px;
                }

                #ai-comms {
                    height: 20px;
                    padding: 3px;
                    font-size: 8px;
                }
            }

            #jobs-found {
                grid-template-columns: 1fr;

                .job {
                    min-height: 80px;

                    a:nth-child(1) {
                        font-size: 12px;
                    }

                    span, a:nth-child(3) {
                        font-size: 10px;
                    }
                }
            }
        }
    }
}

@media only screen and (max-width: 400px) {
    #content #main-content #jobs-search {
        overflow: auto;
    }

    #content #scraper-content {
        #ai-prompts {
            gap: 10px;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            
            .ai-filters {
                width: 100%;
            }

            #ai-comms {
                flex-basis: auto;
                width: 100%
            }
        } 
    }
}