/* A dialog's chosen palette must win over the surrounding page's theme. */
html body #dossierModal #dossierContainer:not(.is-light) {
    --text-main: #f1f5f9;
    --text-muted: #bac9db;
    color: #f1f5f9 !important;
    background: #080e19 !important;
    color-scheme: dark;
}
html body #dossierModal #dossierContainer.pathway-4:not(.is-light) {--dossier-text-accent: #c084fc;}
html body #dossierModal #dossierContainer:not(.is-light) * {
    -webkit-text-fill-color: currentColor !important;
}
html body #dossierModal #dossierContainer:not(.is-light) :is(h1,h2,h3,h4,h5,h6,strong,b) {
    color: #f1f5f9 !important;
    opacity: 1 !important;
}
html body #dossierModal #dossierContainer:not(.is-light) :is(p,li,small,.ea-profile-location,.ea-dossier-copy,.ea-dossier-clearance,.ea-dossier-clearance > span) {
    color: #bac9db !important;
    opacity: 1 !important;
}
html body #dossierModal #dossierContainer:not(.is-light) :is(.ea-dossier-id-badge,.ea-profile-tag,.ea-kicker,.ea-capability-chip,.ea-timeline-entry time,.ea-metric-card strong,.ea-spon-data strong,.ea-request-banner strong,.ea-request-button,.ea-dossier-theme,.ea-close-dossier,.ea-operations-id) {
    color: var(--dossier-text-accent,var(--dossier-accent)) !important;
}
html body #dossierModal #dossierContainer:not(.is-light) #modal-dossier-id {color: inherit !important;}
html body #dossierModal #dossierContainer:not(.is-light) .ea-dossier-header {background: #050a12 !important;}
html body #dossierModal #dossierContainer:not(.is-light) .ea-dossier-scroll {background: #080e19 !important;}
html body #dossierModal #dossierContainer:not(.is-light) .ea-profile-main {background: #080e19 !important;}
html body #dossierModal #dossierContainer:not(.is-light) .ea-profile-rail {background: #060c15 !important;}
html body #dossierModal #dossierContainer:not(.is-light) .layout-technical {background: #080e19 !important;}
html body #dossierModal #dossierContainer:not(.is-light) :is(.ea-intel-item,.ea-metric-card,.ea-request-banner) {
    background: #0d1726 !important;
    border-color: rgba(148,163,184,.25) !important;
}
html body #dossierModal #dossierContainer:not(.is-light) :is(.ea-request-button,.ea-dossier-theme,.ea-close-dossier):is(:hover,:focus-visible) {
    color: #050b15 !important;
    background: var(--dossier-text-accent,var(--dossier-accent)) !important;
}
html body #dossierModal #dossierContainer:not(.is-light) :is(.ea-request-button,.ea-dossier-theme,.ea-close-dossier):focus-visible {
    outline: 2px solid var(--dossier-text-accent,var(--dossier-accent));
    outline-offset: 3px;
}

/* Vacancy Dark View remains readable even when the page behind it is light. */
html body #vacancyModal:not(.is-light) {
    --job-ink: #f0f6fc;
    --job-muted: #c2cedc;
    --job-panel: #0b1624;
    color: var(--job-ink) !important;
}
html body #vacancyModal:not(.is-light) * {-webkit-text-fill-color: currentColor !important;}
html body #vacancyModal:not(.is-light) :is(.ea-modal-title,.ea-vacancy-detail-section dd,strong) {color: var(--job-ink) !important;}
html body #vacancyModal:not(.is-light) :is(.ea-modal-meta,.ea-vacancy-detail-section dt,.ea-vacancy-detail-section li,.ea-vacancy-detail-section p,.ea-modal-notice,.ea-vacancy-modal-request p,.ea-vacancy-modal-request span) {
    color: var(--job-muted) !important;
    opacity: 1 !important;
}
html body #vacancyModal:not(.is-light) :is(.ea-modal-kicker,.ea-modal-kicker span,.ea-vacancy-detail-section h3,.ea-vacancy-theme-toggle,.ea-modal-close) {color: var(--cyan) !important;}
html body #vacancyModal:not(.is-light) .ea-vacancy-detail-section {background: var(--job-panel) !important;}
html body #vacancyModal:not(.is-light) .ea-modal-action.employer,
html body #vacancyModal:not(.is-light) .ea-modal-action.employer :is(small,strong) {color: #021017 !important;}
html body #vacancyModal:not(.is-light) .ea-modal-action.worker,
html body #vacancyModal:not(.is-light) .ea-modal-action.worker :is(small,strong) {color: var(--worker-gold) !important;}
html body #vacancyModal:not(.is-light) .ea-modal-action.worker:is(:hover,:focus-visible),
html body #vacancyModal:not(.is-light) .ea-modal-action.worker:is(:hover,:focus-visible) :is(small,strong) {color: #050b15 !important;}
html body #vacancyModal:not(.is-light) :is(.ea-vacancy-theme-toggle,.ea-modal-close):is(:hover,:focus-visible) {
    color: #050b15 !important;
    background: var(--cyan) !important;
}
html body #vacancyModal.is-light :is(.ea-vacancy-theme-toggle,.ea-modal-close):is(:hover,:focus-visible) {background: var(--cyan) !important;}
html body #vacancyModal:not(.is-light) .ea-vacancy-modal-request :is(button,a) {color: var(--cyan) !important;}

/* Inactive shortlist actions stay visibly disabled without fading the labels. */
html.ea-clean-white body :is(#workerRequestPanel,#vacancyRequestPanel) :is(button,a),
html body:is(.light-mode,.ea-clean-white,.ea-theme-light) :is(#workerRequestPanel,#vacancyRequestPanel) :is(button,a) {
    color: #007b92 !important;
    -webkit-text-fill-color: currentColor !important;
    border-color: #8db9c5 !important;
    background: #fff !important;
    opacity: 1 !important;
}
html.ea-clean-white body :is(#workerRequestPanel,#vacancyRequestPanel) :is(button:not(:disabled),a:not([aria-disabled="true"])):is(:hover,:focus-visible),
html body:is(.light-mode,.ea-clean-white,.ea-theme-light) :is(#workerRequestPanel,#vacancyRequestPanel) :is(button:not(:disabled),a:not([aria-disabled="true"])):is(:hover,:focus-visible) {
    color: #fff !important;
    background: #007b92 !important;
    border-color: #007b92 !important;
}
html.ea-clean-white body :is(#workerRequestPanel,#vacancyRequestPanel) :is(button:disabled,a[aria-disabled="true"]),
html body:is(.light-mode,.ea-clean-white,.ea-theme-light) :is(#workerRequestPanel,#vacancyRequestPanel) :is(button:disabled,a[aria-disabled="true"]) {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: not-allowed;
}
html.ea-clean-white body :is(#workerRequestPanel,#vacancyRequestPanel) :is(#workerSelectionStatus,#vacancySelectionStatus),
html body:is(.light-mode,.ea-clean-white,.ea-theme-light) :is(#workerRequestPanel,#vacancyRequestPanel) :is(#workerSelectionStatus,#vacancySelectionStatus) {
    color: #475569 !important;
    -webkit-text-fill-color: currentColor !important;
    opacity: 1 !important;
}
