/*
|--------------------------------------------------------------------------
| AfroJobs Dashboard Dark Card Contrast Fix V2
|--------------------------------------------------------------------------
| Goal:
| - Make text on dark/blue gradient dashboard cards white.
| - Slightly enlarge important headings/text inside those dark cards.
| - Keep light/white inner buttons and surfaces readable.
|--------------------------------------------------------------------------
*/

.afrojobs-dark-surface-v2,
.afrojobs-dark-surface-v2:link,
.afrojobs-dark-surface-v2:visited,
.afrojobs-dark-surface-v2:hover,
.afrojobs-dark-surface-v2:focus,
.afrojobs-dark-surface-v2:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.afrojobs-dark-surface-v2 svg {
    color: #ffffff !important;
}

.afrojobs-dark-surface-v2 svg [fill]:not([fill="none"]) {
    fill: currentColor !important;
}

.afrojobs-dark-surface-v2 svg [stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
}

/* The dark card container itself. */
.afrojobs-dark-card-v2 {
    color: #ffffff !important;
}

.afrojobs-dark-card-v2 h1,
.afrojobs-dark-card-v2 h2,
.afrojobs-dark-card-v2 h3,
.afrojobs-dark-card-v2 h4,
.afrojobs-dark-card-v2 h5,
.afrojobs-dark-card-v2 h6,
.afrojobs-dark-card-v2 .title,
.afrojobs-dark-card-v2 .heading,
.afrojobs-dark-card-v2 [class*="title"],
.afrojobs-dark-card-v2 [class*="heading"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

.afrojobs-dark-card-v2 p,
.afrojobs-dark-card-v2 .text,
.afrojobs-dark-card-v2 .sub,
.afrojobs-dark-card-v2 .desc,
.afrojobs-dark-card-v2 .description,
.afrojobs-dark-card-v2 small,
.afrojobs-dark-card-v2 span,
.afrojobs-dark-card-v2 li,
.afrojobs-dark-card-v2 a:not(.btn):not(.theme-btn):not([class*="btn-"]) {
    color: rgba(255,255,255,.95) !important;
    -webkit-text-fill-color: rgba(255,255,255,.95) !important;
}

/* Slightly larger typography only inside dark dashboard cards. */
.afrojobs-dark-card-v2 h1,
.afrojobs-dark-card-v2 h2,
.afrojobs-dark-card-v2 h3,
.afrojobs-dark-card-v2 h4,
.afrojobs-dark-card-v2 h5,
.afrojobs-dark-card-v2 h6 {
    font-size: clamp(22px, 1.45vw, 28px) !important;
}

.afrojobs-dark-card-v2 p,
.afrojobs-dark-card-v2 .text,
.afrojobs-dark-card-v2 .sub,
.afrojobs-dark-card-v2 .desc,
.afrojobs-dark-card-v2 .description {
    font-size: 15.5px !important;
    line-height: 1.72 !important;
}

/* Keep light nested buttons readable if they live inside a dark card. */
.afrojobs-light-surface-v2,
.afrojobs-light-surface-v2:link,
.afrojobs-light-surface-v2:visited,
.afrojobs-light-surface-v2:hover,
.afrojobs-light-surface-v2:focus,
.afrojobs-light-surface-v2:active {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

.afrojobs-light-surface-v2 svg {
    color: #101828 !important;
}

.afrojobs-light-surface-v2 svg [fill]:not([fill="none"]) {
    fill: currentColor !important;
}

.afrojobs-light-surface-v2 svg [stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
}

/* Hard fallbacks for known dashboard primary surfaces. */
body .user-dashboard .aj21-primary,
body .user-dashboard .aj21-primary *,
body .user-dashboard .aja-featured-card,
body .user-dashboard .aja-featured-card *,
body .user-dashboard .aj-candidate-cv-card,
body .user-dashboard .aj-candidate-cv-card *,
body .user-dashboard [class*="gradient-card"],
body .user-dashboard [class*="gradient-card"] *,
body .user-dashboard [class*="dark-card"],
body .user-dashboard [class*="dark-card"] *,
body .user-dashboard [class*="candidate-cv"],
body .user-dashboard [class*="candidate-cv"] *,
body .main-content .aj21-primary,
body .main-content .aj21-primary *,
body .main-content .aja-featured-card,
body .main-content .aja-featured-card *,
body .main-content [class*="gradient-card"],
body .main-content [class*="gradient-card"] *,
body .main-content [class*="dark-card"],
body .main-content [class*="dark-card"] * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
