/*
|--------------------------------------------------------------------------
| PROJECT REDLINE - JOBS SYSTEM
|--------------------------------------------------------------------------
*/

.jobs-page {

    position: relative;

    isolation: isolate;

    width: 100%;

    min-height:
        calc(
            100vh -
            var(--navbar-height, 90px)
        );

    overflow: hidden;

    background:
        var(--background-color);
}

/*
|--------------------------------------------------------------------------
| MONEY ICON
|--------------------------------------------------------------------------
*/

.job-card-income i,
.active-job-income i {
    margin-right: 6px;

    color: #FF4747;
}

.money-income-job {
    font-weight: bold;
    color: #FF4747;
}

/*
|--------------------------------------------------------------------------
| BACKGROUND
|--------------------------------------------------------------------------
*/

.jobs-background {
    position: absolute;

    pointer-events: none;

    z-index: -1;

    inset: 0;

    min-height: 100%;

    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.74),
            rgba(0, 0, 0, 0.82)
        ),
        url('/assets/backgrounds/jobs-bg.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    opacity: 0.94;
}

/*
|--------------------------------------------------------------------------
| CONTENT
|--------------------------------------------------------------------------
*/

.jobs-content {

    position: relative;

    z-index: 2;

    width: 100%;

    min-height: inherit;

    padding:
        16px
        34px
        34px;

    display: flex;

    flex-direction: column;
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

.jobs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jobs-title {
    color: var(--text-color);

    font-size: 54px;
    font-weight: 900;

    line-height: 0.95;
}

.jobs-subtitle {
    margin-top: 10px;

    color:
        var(--text-muted);

    font-size: 15px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| ACTIVE JOB
|--------------------------------------------------------------------------
*/

.active-job-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 24px;

    border-radius: 24px;

    background:
        rgba(255, 52, 52, 0.08);

    border:
        1px solid rgba(255, 52, 52, 0.18);

    backdrop-filter: blur(10px);
}

.active-job-title {
    color:
        var(--text-muted);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;
}

.active-job-name {
    margin-top: 8px;

    color: var(--text-color);

    font-size: 24px;
    font-weight: 900;
}

.active-job-income {
    margin-top: 10px;

    color:
        var(--text-muted);

    font-size: 14px;
    font-weight: 700;
}

.active-job-stop {
    height: 52px;

    padding:
        0
        22px;

    border: none;
    border-radius: 16px;

    background:
        var(--card-background);

    color:
        var(--text-color);

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| GRID
|--------------------------------------------------------------------------
*/

.jobs-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 22px;
}

/*
|--------------------------------------------------------------------------
| JOB CARD
|--------------------------------------------------------------------------
*/

.job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 28px;

    border-radius: 30px;

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    backdrop-filter: blur(10px);
}

.job-card-top {
    display: flex;

    gap: 18px;
}

.job-card-icon {
    width: 72px;
    height: 72px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 22px;

    background:
        rgba(255, 52, 52, 0.12);

    font-size: 34px;
}

.job-card-title {
    color: var(--text-color);

    font-size: 28px;
    font-weight: 900;
}

.job-card-description {

    position: relative;

    margin-top: 12px;

    min-height: 72px;

    max-height: 72px;

    overflow: hidden;

    color:
        var(--text-muted);

    font-size: 14px;

    font-weight: 600;

    line-height: 1.65;

    letter-spacing: 0.2px;

    word-break: break-word;
}

.job-card-description::after {

    content: '';

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 28px;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(6,6,6,0.96)
        );
}

.job-card-info {

    margin-top: 22px;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}

.job-card-income {
    color: #FF4A4A;

    font-size: 14px;
    font-weight: 600;
}

.job-card-time {
    color: #FF4A4A;

    font-size: 14px;
    font-weight: 600;
}

.job-card-level {
    color: #FF4A4A;

    font-size: 14px;
    font-weight: 600;
}

.job-data{
    font-weight: bold;
    color: var(--text-color);
}

.job-card-button {
    width: 100%;
    height: 56px;

    margin-top: 18px;

    border: none;
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #FF3434,
            #FF2020
        );

    color: #FFFFFF;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| LOCKED JOB BUTTON
|--------------------------------------------------------------------------
*/

.job-card-button--locked {

    opacity: 0.45;

    cursor: not-allowed !important;

    background:
        rgba(255,255,255,0.06) !important;

    border:
        1px solid rgba(255,255,255,0.08);

    box-shadow: none !important;

    transform: none !important;
}

.job-card-button--locked:hover {

    transform: none !important;

    box-shadow: none !important;
}

/*
|--------------------------------------------------------------------------
| ACTIVE TIMER
|--------------------------------------------------------------------------
*/

.active-job-timer {

    margin-top: 12px;

    color: #2CFF94;

    font-size: 32px;

    font-weight: 900;

    letter-spacing: 1px;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 1200px) {

    .jobs-grid {
        grid-template-columns: 1fr;
    }
}

/*
|--------------------------------------------------------------------------
| AAA MOBILE JOBS SYSTEM
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    /*
    |--------------------------------------------------------------------------
    | PAGE
    |--------------------------------------------------------------------------
    */

    .jobs-page {

        width: 100%;

        min-height:
            calc(
                100vh -
                var(--navbar-height, 90px)
            );

        margin: 0;

        padding: 0;

        overflow-x: hidden;

        overflow-y: auto;

        background:
            var(--background-color);
    }

    /*
    |--------------------------------------------------------------------------
    | BACKGROUND
    |--------------------------------------------------------------------------
    */

    .jobs-background {

        position: fixed;

        inset: 0;

        width: 100vw;

        height: 100vh;

        z-index: 0;

        opacity: 0.92;

        background-size: cover;

        background-position: center;
    }

    /*
    |--------------------------------------------------------------------------
    | CONTENT
    |--------------------------------------------------------------------------
    */

    .jobs-content {

        position: relative;

        z-index: 2;

        width: 100%;

        max-width: 100%;

        padding:
            12px
            12px
            24px;

        margin: 0;

        overflow-x: hidden;

        box-sizing: border-box;
    }

    /*
    |--------------------------------------------------------------------------
    | HEADER
    |--------------------------------------------------------------------------
    */

    .jobs-header {

        width: 100%;

        margin-top: 4px;
    }

    /*
    |--------------------------------------------------------------------------
    | TITLE
    |--------------------------------------------------------------------------
    */

    .jobs-title {

        font-size: 34px;

        line-height: 0.95;

        letter-spacing: 0.5px;
    }

    /*
    |--------------------------------------------------------------------------
    | SUBTITLE
    |--------------------------------------------------------------------------
    */

    .jobs-subtitle {

        margin-top: 10px;

        max-width: 100%;

        font-size: 12px;

        line-height: 1.5;
    }

    /*
    |--------------------------------------------------------------------------
    | ACTIVE JOB
    |--------------------------------------------------------------------------
    */

    .active-job-panel {

        margin-top: 18px;
    }

    .active-job-card {

        width: 100%;

        padding:
            18px;

        display: flex;

        flex-direction: column;

        align-items: flex-start;

        gap: 14px;

        border-radius: 24px;
    }

    /*
    |--------------------------------------------------------------------------
    | ACTIVE TITLE
    |--------------------------------------------------------------------------
    */

    .active-job-title {

        font-size: 10px;

        letter-spacing: 1px;
    }

    /*
    |--------------------------------------------------------------------------
    | ACTIVE NAME
    |--------------------------------------------------------------------------
    */

    .active-job-name {

        margin-top: 6px;

        font-size: 22px;

        line-height: 1.1;
    }

    /*
    |--------------------------------------------------------------------------
    | ACTIVE INCOME
    |--------------------------------------------------------------------------
    */

    .active-job-income {

        margin-top: 10px;

        font-size: 12px;

        line-height: 1.5;
    }

    /*
    |--------------------------------------------------------------------------
    | TIMER
    |--------------------------------------------------------------------------
    */

    .active-job-timer {

        margin-top: 10px;

        font-size: 28px;

        letter-spacing: 1px;
    }

    /*
    |--------------------------------------------------------------------------
    | STOP BUTTON
    |--------------------------------------------------------------------------
    */

    .active-job-stop {

        width: 100%;

        height: 48px;

        border-radius: 16px;

        font-size: 12px;
    }

    /*
    |--------------------------------------------------------------------------
    | GRID
    |--------------------------------------------------------------------------
    */

    .jobs-grid {

        width: 100%;

        max-width: 100%;

        overflow: hidden;

        margin-top: 18px;

        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 12px;

        align-items: stretch;
    }

    /*
    |--------------------------------------------------------------------------
    | CARD
    |--------------------------------------------------------------------------
    */

    .job-card {

        width: 100%;

        min-height: 100%;

        overflow: hidden;

        box-sizing: border-box;

        padding:
            14px;

        border-radius: 22px;
    }

    /*
    |--------------------------------------------------------------------------
    | CARD TOP
    |--------------------------------------------------------------------------
    */

    .job-card-top {

        display: flex;

        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }

    /*
    |--------------------------------------------------------------------------
    | ICON
    |--------------------------------------------------------------------------
    */

    .job-card-icon {

        width: 52px;
        height: 52px;

        border-radius: 16px;

        font-size: 22px;
    }

    /*
    |--------------------------------------------------------------------------
    | JOB TITLE
    |--------------------------------------------------------------------------
    */

    .job-card-title {

        font-size: 18px;

        line-height: 1.1;
    }

    /*
    |--------------------------------------------------------------------------
    | DESCRIPTION
    |--------------------------------------------------------------------------
    */

    .job-card-description {

        margin-top: 6px;

        min-height: auto;

        max-height: 56px;

        overflow: hidden;

        font-size: 11px;

        line-height: 1.5;
    }

    .job-card-description::after {

        display: none;
    }

    /*
    |--------------------------------------------------------------------------
    | INFO
    |--------------------------------------------------------------------------
    */

    .job-card-info {

        margin-top: 14px;

        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 8px;
    }

    /*
    |--------------------------------------------------------------------------
    | STATS
    |--------------------------------------------------------------------------
    */


    .job-card-income,
    .job-card-time,
    .job-card-level {

        font-size: 11px;

        line-height: 1.4;
    }

    /*
    |--------------------------------------------------------------------------
    | BUTTON
    |--------------------------------------------------------------------------
    */

    .job-card-button {

        width: 100%;

        height: 46px;

        margin-top: 6px;

        border-radius: 16px;

        font-size: 11px;

        letter-spacing: 0.4px;
    }

    /*
    |--------------------------------------------------------------------------
    | LOCKED
    |--------------------------------------------------------------------------
    */

    .job-card-button--locked {

        opacity: 0.42;
    }

    /*
    |--------------------------------------------------------------------------
    | SAFE AREA
    |--------------------------------------------------------------------------
    */

    @supports (-webkit-touch-callout: none) {

        .jobs-content {

            padding-bottom:
                calc(
                    24px +
                    env(safe-area-inset-bottom)
                );
        }
    }
}

/*
|--------------------------------------------------------------------------
| SMALL MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .jobs-grid {

        gap: 10px;
    }

    .job-card {

        padding: 12px;
    }

    .job-card-title {

        font-size: 16px;
    }

    .job-card-description {

        font-size: 10px;
    }

    .jobs-content {

        padding:
            10px
            10px
            24px;
    }

    .jobs-title {

        font-size: 30px;
    }

    .job-card-title {

        font-size: 20px;
    }

    .active-job-name {

        font-size: 20px;
    }

    .active-job-timer {

        font-size: 26px;
    }

    .levelup-button,
    .job-card-button,
    .active-job-stop {

        height: 50px;

        font-size: 12px;
    }
}

/*
|--------------------------------------------------------------------------
| LIGHT THEME
|--------------------------------------------------------------------------
*/

body.theme-light .jobs-background {

    background-image:
        linear-gradient(
            rgba(255,255,255,0.82),
            rgba(255,255,255,0.90)
        ),
        url('/assets/backgrounds/jobs-bg.png');
}

/*
|--------------------------------------------------------------------------
| ACTIVE JOB
|--------------------------------------------------------------------------
*/

body.theme-light .active-job-card {

    background:
        rgba(255,52,52,0.08);

    border:
        1px solid rgba(255,52,52,0.18);
}

body.theme-light .active-job-stop {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    color:
        var(--text-color);
}

body.theme-light .active-job-stop:hover {

    background:
        var(--card-background-hover);

    border-color:
        rgba(255,52,52,0.18);
}

/*
|--------------------------------------------------------------------------
| JOB CARDS
|--------------------------------------------------------------------------
*/

body.theme-light .job-card {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);
}

body.theme-light .job-card:hover {

    border-color:
        rgba(255,52,52,0.18);

    box-shadow:
        0 10px 24px rgba(255,52,52,0.08);
}

/*
|--------------------------------------------------------------------------
| DESCRIPTION FADE
|--------------------------------------------------------------------------
*/

body.theme-light .job-card-description::after {

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(255,255,255,0.96)
        );
}

/*
|--------------------------------------------------------------------------
| ICONS
|--------------------------------------------------------------------------
*/

body.theme-light .job-card-icon {

    background:
        rgba(255,52,52,0.10);
}

/*
|--------------------------------------------------------------------------
| LOCKED BUTTON
|--------------------------------------------------------------------------
*/

body.theme-light .job-card-button--locked {

    background:
        var(--card-background) !important;

    border:
        1px solid var(--card-border);

    color:
        var(--text-muted);
}

/*
|--------------------------------------------------------------------------
| JOB STATS CARDS
|--------------------------------------------------------------------------
*/

.job-card-income,
.job-card-time,
.job-card-level,
.job-card-exp {

    min-width: 0;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 4px;

    min-height: 68px;

    padding: 10px;

    border-radius: 16px;

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    text-align: center;

    transition: 0.2s ease;
}

.job-card-income:hover,
.job-card-time:hover,
.job-card-level:hover,
.job-card-exp:hover {

    border-color:
        rgba(255,52,52,0.18);

    transform:
        translateY(-2px);
}

.job-card-income {

    color: #22C55E;
}

.job-card-time {

    color: #F59E0B;
}

.job-card-level {

    color: #3B82F6;
}

.job-card-exp {

    color: #A855F7;
}

.job-data {

    margin-top: 2px;

    font-size: 15px;

    font-weight: 900;

    color:
        var(--text-color);

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.job-card-income span,
.job-card-time span,
.job-card-level span,
.job-card-exp span {

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}

