/*
 * PRE20.9C / R1914
 *
 * Uzupełnienie dark mode wyłącznie dla publicznych podstron
 * Czelendży oraz strony systemu kaucyjnego.
 *
 * Jasne pole pod ilustracjami pozostaje celowo białe.
 */


/* -------------------------------------------------------------------------
   STRONY CZELENDŻY
   ------------------------------------------------------------------------- */

html[data-theme="dark"] .challenge-story-page,
.theme-dark .challenge-story-page{
    color:var(--text)!important;
    background:
        linear-gradient(
            180deg,
            rgba(255,90,0,.065),
            transparent 520px
        )!important;
}


/* główne powierzchnie */

html[data-theme="dark"] :is(
    .challenge-story-section,
    .challenge-story-float
),
.theme-dark :is(
    .challenge-story-section,
    .challenge-story-float
){
    background:var(--surface)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}


/* lekko odróżnione kafelki wewnętrzne */

html[data-theme="dark"] :is(
    .challenge-story-pills span,
    .challenge-story-stat,
    .challenge-story-side,
    .challenge-story-step,
    .challenge-story-card,
    .challenge-story-example__visual,
    .challenge-story-duration article,
    .challenge-story-benefits article,
    .challenge-story-details,
    .challenge-story-faq,
    .challenge-story-faq-list details,
    .challenge-story-related a
),
.theme-dark :is(
    .challenge-story-pills span,
    .challenge-story-stat,
    .challenge-story-side,
    .challenge-story-step,
    .challenge-story-card,
    .challenge-story-example__visual,
    .challenge-story-duration article,
    .challenge-story-benefits article,
    .challenge-story-details,
    .challenge-story-faq,
    .challenge-story-faq-list details,
    .challenge-story-related a
){
    background:var(--surface-2)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}


/* tekst podstawowy */

html[data-theme="dark"] :is(
    .challenge-story-section h2,
    .challenge-story-section h3,
    .challenge-story-section strong,
    .challenge-story-float strong,
    .challenge-story-duration strong,
    .challenge-story-related strong
),
.theme-dark :is(
    .challenge-story-section h2,
    .challenge-story-section h3,
    .challenge-story-section strong,
    .challenge-story-float strong,
    .challenge-story-duration strong,
    .challenge-story-related strong
){
    color:var(--text)!important;
}


/* tekst drugorzędny */

html[data-theme="dark"] :is(
    .challenge-story-heading p,
    .challenge-story-float span,
    .challenge-story-stat small,
    .challenge-story-side__caption,
    .challenge-story-step p,
    .challenge-story-card p,
    .challenge-story-muted,
    .challenge-story-duration span,
    .challenge-story-benefits p,
    .challenge-story-details__body,
    .challenge-story-faq-list p,
    .challenge-story-related span,
    .challenge-story-microcopy,
    .challenge-story-example-note
),
.theme-dark :is(
    .challenge-story-heading p,
    .challenge-story-float span,
    .challenge-story-stat small,
    .challenge-story-side__caption,
    .challenge-story-step p,
    .challenge-story-card p,
    .challenge-story-muted,
    .challenge-story-duration span,
    .challenge-story-benefits p,
    .challenge-story-details__body,
    .challenge-story-faq-list p,
    .challenge-story-related span,
    .challenge-story-microcopy,
    .challenge-story-example-note
){
    color:var(--muted)!important;
}


html[data-theme="dark"] .challenge-story-lead,
.theme-dark .challenge-story-lead{
    color:var(--text)!important;
}


/* pomarańczowe elementy */

html[data-theme="dark"] :is(
    .challenge-story-kicker,
    .challenge-story-eyebrow,
    .challenge-story-stat__label,
    .challenge-story-secondary a:not(.btn),
    .challenge-story-source-links a
),
.theme-dark :is(
    .challenge-story-kicker,
    .challenge-story-eyebrow,
    .challenge-story-stat__label,
    .challenge-story-secondary a:not(.btn),
    .challenge-story-source-links a
){
    color:#ff9257!important;
}


html[data-theme="dark"] .challenge-story-card__tag,
.theme-dark .challenge-story-card__tag{
    background:var(--orange-pale)!important;
    color:#ff9257!important;
}


/* komunikaty */

html[data-theme="dark"] :is(
    .challenge-story-highlight,
    .challenge-story-notice
),
.theme-dark :is(
    .challenge-story-highlight,
    .challenge-story-notice
){
    background:
        color-mix(
            in srgb,
            var(--orange) 10%,
            var(--surface-2)
        )!important;
    color:var(--text)!important;
}


html[data-theme="dark"] .challenge-story-notice--important,
.theme-dark .challenge-story-notice--important{
    background:var(--red-soft)!important;
    color:var(--text)!important;
}


/* podobne Czelendże */

html[data-theme="dark"] .challenge-story-related a:hover,
.theme-dark .challenge-story-related a:hover{
    background:
        color-mix(
            in srgb,
            var(--orange) 12%,
            var(--surface-2)
        )!important;
    border-color:
        color-mix(
            in srgb,
            var(--orange) 42%,
            var(--border)
        )!important;
}


/* mobile */

html[data-theme="dark"] :is(
    .challenge-mobile-tabs,
    .challenge-mobile-quicknav
),
.theme-dark :is(
    .challenge-mobile-tabs,
    .challenge-mobile-quicknav
){
    background:
        color-mix(
            in srgb,
            var(--bg) 94%,
            transparent
        )!important;
}


html[data-theme="dark"] :is(
    .challenge-mobile-tabs label,
    .challenge-mobile-quicknav a
),
.theme-dark :is(
    .challenge-mobile-tabs label,
    .challenge-mobile-quicknav a
){
    background:var(--surface)!important;
    border-color:var(--border)!important;
    color:var(--muted)!important;
}


html[data-theme="dark"] .challenge-mobile-section-toggle-static,
.theme-dark .challenge-mobile-section-toggle-static{
    color:var(--text)!important;
}


html[data-theme="dark"]
.challenge-mobile-section-check:checked
+
.challenge-mobile-static-collapsible
.challenge-mobile-section-toggle-static,
.theme-dark
.challenge-mobile-section-check:checked
+
.challenge-mobile-static-collapsible
.challenge-mobile-section-toggle-static{
    background:var(--surface-2)!important;
}


/* dolne CTA */

html[data-theme="dark"] .challenge-story-final__actions .btn--ghost,
.theme-dark .challenge-story-final__actions .btn--ghost{
    background:var(--surface)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}


html[data-theme="dark"] .challenge-story-final__actions .btn--ghost:hover,
.theme-dark .challenge-story-final__actions .btn--ghost:hover{
    background:var(--surface-2)!important;
    color:var(--text)!important;
}


/*
 * ILUSTRACJE
 * Jasna kartka jest tutaj zamierzona.
 * Nie zamieniamy jej w ciemny kafel.
 */

html[data-theme="dark"] :is(
    .challenge-story-person,
    .challenge-story-person img,
    .challenge-story-side img,
    .challenge-story-example__visual img
),
.theme-dark :is(
    .challenge-story-person,
    .challenge-story-person img,
    .challenge-story-side img,
    .challenge-story-example__visual img
){
    background:#fff!important;
}


/* -------------------------------------------------------------------------
   SYSTEM KAUCYJNY
   ------------------------------------------------------------------------- */

html[data-theme="dark"] :is(
    .deposit-section,
    .deposit-floating-stat
),
.theme-dark :is(
    .deposit-section,
    .deposit-floating-stat
){
    background:var(--surface)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}


html[data-theme="dark"] :is(
    .deposit-benefit-pills span,
    .deposit-stat-card,
    .deposit-rate-grid article,
    .deposit-details,
    .deposit-disclaimer,
    .deposit-side-visual,
    .deposit-step,
    .deposit-counter-panel,
    .deposit-highlight,
    .deposit-day-example__visual,
    .deposit-zero__message,
    .deposit-duration-grid article,
    .deposit-benefits-grid article,
    .deposit-faq,
    .deposit-faq-list details,
    .deposit-related-grid a
),
.theme-dark :is(
    .deposit-benefit-pills span,
    .deposit-stat-card,
    .deposit-rate-grid article,
    .deposit-details,
    .deposit-disclaimer,
    .deposit-side-visual,
    .deposit-step,
    .deposit-counter-panel,
    .deposit-highlight,
    .deposit-day-example__visual,
    .deposit-zero__message,
    .deposit-duration-grid article,
    .deposit-benefits-grid article,
    .deposit-faq,
    .deposit-faq-list details,
    .deposit-related-grid a
){
    background:var(--surface-2)!important;
    border-color:var(--border)!important;
    color:var(--text)!important;
}


html[data-theme="dark"] :is(
    .deposit-section p,
    .deposit-section small,
    .deposit-floating-stat span,
    .deposit-duration-grid span,
    .deposit-benefits-grid p,
    .deposit-related-grid span
),
.theme-dark :is(
    .deposit-section p,
    .deposit-section small,
    .deposit-floating-stat span,
    .deposit-duration-grid span,
    .deposit-benefits-grid p,
    .deposit-related-grid span
){
    color:var(--muted)!important;
}


html[data-theme="dark"] .deposit-counter-panel__tag,
.theme-dark .deposit-counter-panel__tag{
    background:var(--orange-pale)!important;
    color:#ff9257!important;
}


html[data-theme="dark"] .deposit-related-grid a:hover,
.theme-dark .deposit-related-grid a:hover{
    background:
        color-mix(
            in srgb,
            var(--orange) 12%,
            var(--surface-2)
        )!important;
    border-color:
        color-mix(
            in srgb,
            var(--orange) 42%,
            var(--border)
        )!important;
}


/* ilustracje strony kaucyjnej */

html[data-theme="dark"] :is(
    .deposit-person,
    .deposit-person img,
    .deposit-side-visual img,
    .deposit-day-example__visual img
),
.theme-dark :is(
    .deposit-person,
    .deposit-person img,
    .deposit-side-visual img,
    .deposit-day-example__visual img
){
    background:#fff!important;
}
