body.salary-page {
    min-height: 100vh;
}

.salary-page .salary-page-layout {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 100vh;
}

.salary-container {
    width: 100%;
    padding-bottom: 24px;
}

.salary-page-loader {
    align-self: stretch;
    width: 100%;
    max-width: 1152px;
    flex: 1 1 auto;
    min-height: calc(100dvh - 380px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-primary);
    border-radius: 24px;
    margin-top: 16px;
    box-sizing: border-box;
}

.salary-page-content {
    align-self: stretch;
    width: 100%;
}

.salary-title-section {
    margin-top: 8px;
    width: 100%;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1279px) {
    .salary-title-section {
        width: 100%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

.salary-title {
    margin: 0 0 8px 0;
    font-size: var(--fs-40);
    letter-spacing: var(--ls-40);
    line-height: var(--lh-40);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

.salary-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-16);
    letter-spacing: var(--ls-16);
    line-height: var(--lh-16);
}

.salary-muted-text {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: var(--fs-16);
    line-height: 1.45;
}

.salary-main-content > * + * {
    margin-top: 16px;
}

.salary-mobile-controls {
    display: none;
}

.salary-container .content-with-filters {
    margin-top: 16px;
    margin-bottom: 0px !important;
    width: 100%;
}

.salary-is-hidden {
    display: none !important;
}

.salary-locked-card .btn {
    width: 100%;
}

.salary-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.salary-chart-container {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: 16px;
    background: var(--surface-secondary);
    /* Less outer padding so Y labels sit closer to the edge, like other pages */
    padding: 10px 8px;
    box-sizing: border-box;
}

.salary-unlock-info {
    margin-bottom: 12px;
}

.salary-locked-card .cv-analysis-title {
    margin-bottom: 8px;
}

.salary-chart-card .cv-analysis-title {
    margin-bottom: 0;
}

.salary-median-section .cv-analysis-title {
    margin-bottom: 12px;
}

.salary-recommendations .cv-analysis-title {
    margin-bottom: 12px;
}

.salary-chart-note {
    margin: 12px 0 0 0;
    color: var(--text-muted);
    font-size: var(--fs-14);
    line-height: 1.4;
}

.salary-similar-jobs {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.salary-recommendations {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.salary-similar-jobs .job-card {
    flex: 0 0 270px;
    width: 270px;
    min-width: 270px;
}

.salary-empty-state {
    width: 270px;
    min-height: 270px;
    background: var(--surface-primary);
    border-radius: 24px;
    padding: 16px;
    color: var(--text-muted);
    font-size: var(--fs-16);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

.salary-median-copy {
    margin-top: 16px;
    font-size: var(--fs-16);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
}

.salary-median-copy p {
    margin: 0 0 8px 0;
}

.salary-median-copy p:last-child {
    margin-bottom: 0;
}

.salary-submit-btn {
    width: 100%;
}

.salary-filters-locked .filter-chip {
    pointer-events: none;
    opacity: 0.55;
    cursor: default;
}

.salary-filters-locked .filter-chip.active {
    opacity: 1;
}

.salary-sidebar {
    width: 300px;
    max-width: 300px;
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.salary-market-summary-desktop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.salary-market-summary-desktop-item {
    background: var(--surface-primary);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.salary-market-summary-desktop-label {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-14);
    line-height: var(--lh-14);
    letter-spacing: var(--ls-14);
    font-weight: var(--fw-regular);
    text-transform: lowercase;
}

.salary-market-summary-desktop-value-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.salary-market-summary-desktop-value {
    font-size: var(--fs-18);
    line-height: var(--lh-18);
    letter-spacing: var(--ls-18);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

.salary-market-summary-desktop-plus {
    font-size: var(--fs-18);
    line-height: var(--lh-18);
    letter-spacing: var(--ls-18);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

.salary-market-summary-desktop-percent {
    font-size: var(--fs-14);
    line-height: var(--lh-14);
    letter-spacing: var(--ls-14);
    color: var(--text-muted);
}

.salary-market-summary-card {
    background: var(--surface-secondary);
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 0;
}

.salary-market-summary-label {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-14);
    line-height: var(--lh-14);
    letter-spacing: var(--ls-14);
    font-weight: var(--fw-regular);
    text-transform: lowercase;
}

.salary-market-summary-main {
    margin: 0px 0 8px 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.salary-market-summary-main-value {
    font-size: var(--fs-18);
    line-height: var(--lh-18);
    letter-spacing: var(--ls-18);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
    display: inline-flex;
    align-items: baseline;
}

.salary-market-summary-main-plus {
    font-size: var(--fs-18);
    line-height: var(--lh-18);
    letter-spacing: var(--ls-18);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

.salary-market-summary-user-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.salary-market-summary-user-value {
    font-size: var(--fs-18);
    line-height: var(--lh-18);
    letter-spacing: var(--ls-18);
    font-weight: var(--fw-semibold);
    color: var(--text-color);
}

.salary-market-summary-user-percent {
    font-size: var(--fs-14);
    line-height: var(--lh-14);
    letter-spacing: var(--ls-14);
    color: var(--text-muted);
}

.salary-market-summary-mobile {
    display: none;
}

.salary-page .filter-chip .chip-text {
    margin-right: 0;
}

.salary-page .salary-filter-modal-chip .filter-modal-chip-text {
    margin-right: 0;
}

#salarySubcategoryChips .chip-text {
    text-transform: lowercase;
}

#salaryFilterModalSubcategoryChips .filter-modal-chip-text {
    text-transform: lowercase;
}

/* Match our resume-style select look inside the filter modal */
.filter-modal .resume-select.salary-modal-select {
    margin-bottom: 12px;
}

.filter-modal .resume-select.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.filter-modal .resume-select.salary-modal-select:last-of-type {
    margin-bottom: 0;
}

.filter-modal .resume-select {
    position: relative;
    border-radius: 16px;
    background: var(--surface-secondary);
    cursor: pointer;
    padding: 10px 40px 10px 16px;
    height: 44px;
    box-sizing: border-box;
    font-size: var(--fs-16);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
}

.filter-modal .resume-select .resume-select-value {
    position: absolute;
    left: 16px;
    right: 40px;
    top: 19px;
    font-size: var(--fs-16);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-modal .resume-select .floating-label {
    position: absolute;
    left: 16px;
    top: 12px;
    font-size: var(--fs-16);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
    color: var(--placeholder-color);
    pointer-events: none;
    transition: all 0.2s ease;
}

.filter-modal .resume-select .floating-label.active {
    top: 4px;
    font-size: var(--fs-12);
    line-height: var(--lh-12);
    letter-spacing: var(--ls-12);
    opacity: 0.9;
}

.filter-modal .resume-select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.18762 8.20419C5.30791 8.08405 5.47096 8.01657 5.64097 8.01657C5.81098 8.01657 5.97403 8.08405 6.09432 8.20419L11.8425 13.9523L17.5906 8.20419C17.6493 8.14116 17.7202 8.0906 17.7989 8.05554C17.8776 8.02047 17.9625 8.00162 18.0486 8.0001C18.1348 7.99858 18.2203 8.01443 18.3002 8.04669C18.3801 8.07896 18.4527 8.12698 18.5136 8.1879C18.5745 8.24882 18.6225 8.32139 18.6548 8.40127C18.6871 8.48115 18.7029 8.56671 18.7014 8.65285C18.6999 8.73899 18.681 8.82394 18.646 8.90264C18.6109 8.98133 18.5603 9.05216 18.4973 9.11089L12.2958 15.3124C12.1755 15.4325 12.0125 15.5 11.8425 15.5C11.6725 15.5 11.5094 15.4325 11.3891 15.3124L5.18762 9.11089C5.06748 8.9906 5 8.82754 5 8.65754C5 8.48753 5.06748 8.32447 5.18762 8.20419Z' fill='%23121212'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    pointer-events: none;
}

html.dark-theme .filter-modal .resume-select::after {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.18762 8.20419C5.30791 8.08405 5.47096 8.01657 5.64097 8.01657C5.81098 8.01657 5.97403 8.08405 6.09432 8.20419L11.8425 13.9523L17.5906 8.20419C17.6493 8.14116 17.7202 8.0906 17.7989 8.05554C17.8776 8.02047 17.9625 8.00162 18.0486 8.0001C18.1348 7.99858 18.2203 8.01443 18.3002 8.04669C18.3801 8.07896 18.4527 8.12698 18.5136 8.1879C18.5745 8.24882 18.6225 8.32139 18.6548 8.40127C18.6871 8.48115 18.7029 8.56671 18.7014 8.65285C18.6999 8.73899 18.681 8.82394 18.646 8.90264C18.6109 8.98133 18.5603 9.05216 18.4973 9.11089L12.2958 15.3124C12.1755 15.4325 12.0125 15.5 11.8425 15.5C11.6725 15.5 11.5094 15.4325 11.3891 15.3124L5.18762 9.11089C5.06748 8.9906 5 8.82754 5 8.65754C5 8.48753 5.06748 8.32447 5.18762 8.20419Z' fill='%23ffffff'/%3E%3C/svg%3E");
}

.filter-modal .resume-select.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.filter-modal .resume-select.placeholder .resume-select-value {
    color: var(--placeholder-color);
}

.filter-modal .resume-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-primary);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(20, 20, 20, 0.08);
    display: none;
    flex-direction: column;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1100;
}

.filter-modal .resume-select.open .resume-select-dropdown {
    display: flex;
}

.salary-filter-modal .filter-modal-apply-btn {
    width: 100%;
}

.filter-modal .resume-select-dropdown button {
    border: none;
    background: none;
    padding: 8px 16px;
    text-align: left;
    cursor: pointer;
    color: var(--text-color);
    font-size: var(--fs-16);
    font-weight: var(--fw-regular);
    line-height: var(--lh-16);
    letter-spacing: var(--ls-16);
}

.filter-modal .resume-select-dropdown button:hover {
    background: var(--hover-light);
}

/* If browser still shows number spinners, hide them. */
.filter-modal input.salary-number-input::-webkit-outer-spin-button,
.filter-modal input.salary-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-modal input.salary-number-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

@media (min-width: 1280px) {
    .salary-container .main-content-area {
        width: 820px;
        max-width: 820px;
        flex: 0 0 820px;
    }

    .salary-container .filters-container {
        width: 300px;
        max-width: 300px;
        flex: 0 0 300px;
    }

    .salary-sidebar .filters-container {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }
}

@media (max-width: 1279px) {
    .salary-page-loader {
        min-height: calc(100dvh - 320px);
        width: 100%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .salary-chart-container {
        height: 300px;
    }

    .salary-mobile-controls {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 0 auto 8px;
    }

    .salary-mobile-controls #salaryOpenFilterModalBtn {
        width: 100%;
        height: 44px;
        border-radius: 16px;
        justify-content: center;
    }

    .salary-chart-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #salaryOpenSubmitModalBtnTop {
        align-self: stretch;
        width: 100%;
    }

    .salary-container .filters-container {
        display: none;
    }

    .salary-sidebar {
        display: none;
    }

    .salary-market-summary-desktop {
        display: none;
    }

    .salary-market-summary-mobile {
        display: block;
        margin-bottom: 0;
        background: var(--surface-primary);
    }

    .salary-main-content > .salary-market-summary-mobile {
        margin-top: 8px;
    }

    /* Salary submit modal: full-height on mobile like filter modal. */
    #salarySubmitModalBackdrop {
        align-items: center !important;
    }

    #salarySubmitModalBackdrop .complaint-modal {
        width: calc(100% - 32px);
        height: calc(100% - 32px) !important;
        max-width: 600px;
        max-height: 100%;
        margin: 0 auto !important;
        padding-bottom: 0 !important;
        border-radius: 24px;
        overflow: hidden;
    }

    .salary-similar-jobs {
        flex-direction: column;
        gap: 4px;
    }

    .salary-similar-jobs .job-card,
    .salary-empty-state {
        width: 100%;
        min-width: 0;
    }

    .salary-similar-jobs .job-card {
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        margin: 0 auto;
    }

    .salary-similar-jobs .job-card .job-card-body {
        padding-top: 32px;
    }
}

@media (min-width: 1280px) {
    .salary-market-summary-mobile {
        display: none;
    }
}
