/**
 * ClassiPress Dark Switcher — Wersja PRO 2.2 (Modern UI)
 * Ujednolicony tryb ciemny dla motywu "Sprytny Spawacz Child" + ClassiPress.
 * Wszystkie reguły trybu ciemnego są prefiksowane .cp-dark / body.cp-dark,
 * dzięki czemu NIE wpływają na tryb jasny i wygrywają specyficznością z motywem.
 */

:root {
  --cpds-bg: #0f172a;
  --cpds-surface: #1e293b;
  --cpds-surface-highlight: #334155;
  --cpds-text: #f1f5f9;
  --cpds-text-dim: #94a3b8;
  --cpds-border: rgba(148, 163, 184, 0.15);
  --cpds-accent-glow: rgba(31, 214, 205, 0.25);
  --cpds-shadow-card: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.15);
  --cpds-shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.2);
}

/* --- Płynne przejście TYLKO w trybie ciemnym --- */
.cp-dark, .cp-dark body,
.cp-dark .site-header, .cp-dark .card, .cp-dark .widget,
.cp-dark .listing-item, .cp-dark input, .cp-dark a {
  transition: background-color 0.35s cubic-bezier(0.4,0,0.2,1),
              color 0.35s cubic-bezier(0.4,0,0.2,1),
              border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ==========================================================================
   1. GŁÓWNA STRUKTURA
   ========================================================================== */

html.cp-dark, .cp-dark body {
  background-color: var(--cpds-bg) !important;
  color: var(--cpds-text);
  scrollbar-color: var(--cpds-surface) var(--cpds-bg);
}
.cp-dark ::-webkit-scrollbar { width: 10px; }
.cp-dark ::-webkit-scrollbar-track { background: var(--cpds-bg); }
.cp-dark ::-webkit-scrollbar-thumb { background: var(--cpds-surface-highlight); border-radius: 5px; }

.cp-dark .site, .cp-dark .site-content, .cp-dark .off-canvas-content,
.cp-dark .wrapper, .cp-dark #main {
  background-color: var(--cpds-bg) !important;
}

/* ==========================================================================
   2. NAGŁÓWEK (Glassmorphism)
   ========================================================================== */

.cp-dark .site-header, .cp-dark .top-bar, .cp-dark .site-branding {
  background-color: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--cpds-border) !important;
}
.cp-dark .top-bar ul, .cp-dark .top-bar .menu { background: transparent !important; }
.cp-dark .main-menu > li > a, .cp-dark .top-bar-right a {
  color: var(--cpds-text) !important; font-weight: 500;
}
.cp-dark .main-menu > li > a:hover {
  color: var(--cpds-link) !important; text-shadow: 0 0 8px var(--cpds-accent-glow);
}
.cp-dark .dropdown.menu .is-dropdown-submenu {
  background: var(--cpds-surface) !important; border: 1px solid var(--cpds-border);
  box-shadow: var(--cpds-shadow-hover); border-radius: 8px; padding: 5px;
}

/* ==========================================================================
   3. KARTY, OGŁOSZENIA, WIDGETY
   ========================================================================== */

.cp-dark .card, .cp-dark .panel, .cp-dark .widget,
.cp-dark .listing-item, .cp-dark .post-block, .cp-dark .box,
.cp-dark .content-wrap, .cp-dark .entry-content, .cp-dark .comment-list li {
  background-color: var(--cpds-surface) !important;
  border: 1px solid var(--cpds-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--cpds-shadow-card) !important;
  color: var(--cpds-text) !important;
}
.cp-dark .listing-item:hover, .cp-dark .post-block:hover {
  box-shadow: var(--cpds-shadow-hover) !important;
  border-color: var(--cpds-link) !important;
}
.cp-dark h1, .cp-dark h2, .cp-dark h3, .cp-dark h4, .cp-dark .widget-title {
  color: #fff !important; letter-spacing: -0.02em;
}
.cp-dark .price, .cp-dark .amount, .cp-dark .post-price {
  color: var(--cpds-link) !important; font-weight: bold;
}

/* ==========================================================================
   4. FORMULARZE I PRZYCISKI
   ========================================================================== */

.cp-dark input[type="text"], .cp-dark input[type="email"],
.cp-dark input[type="password"], .cp-dark input[type="number"],
.cp-dark textarea, .cp-dark select, .cp-dark .search-field {
  background-color: var(--cpds-bg) !important;
  border: 1px solid var(--cpds-surface-highlight) !important;
  color: #fff !important; border-radius: 8px !important;
}
.cp-dark input:focus, .cp-dark textarea:focus, .cp-dark select:focus {
  border-color: var(--cpds-link) !important;
  box-shadow: 0 0 0 3px var(--cpds-accent-glow) !important; outline: none;
}
.cp-dark .button, .cp-dark input[type="submit"], .cp-dark .search-submit {
  background: var(--cpds-link) !important; color: #0f172a !important;
  font-weight: 700; border: none !important;
  box-shadow: 0 4px 12px var(--cpds-accent-glow);
}

/* Obrazki lekko przyciemnione — ale NIE logo ani awatary */
.cp-dark .listing-item img, .cp-dark .entry-content img { filter: brightness(0.92); }
.cp-dark .site-branding img, .cp-dark .custom-logo,
.cp-dark img.avatar, .cp-dark .logo img { filter: none !important; }

/* Metadane */
.cp-dark .post-meta, .cp-dark .entry-footer, .cp-dark .breadcrumbs {
  color: var(--cpds-text-dim) !important;
}

/* Mapy (iframe) */
.cp-dark .map-canvas iframe, .cp-dark iframe[src*="google.com/maps"] {
  filter: invert(90%) hue-rotate(180deg) contrast(90%);
}

/* ==========================================================================
   5. POKRYCIE KOMPONENTÓW MOTYWU "SPRYTNY SPAWACZ" (białe wyspy)
   ========================================================================== */

/* --- Narzędzia Spawacza / Hub --- */
body.cp-dark #sp-tools-hub,
body.cp-dark #sp-tools-hub.active,
body.cp-dark #sp-hero-tab-switcher,
body.cp-dark .sp-hero-tab-switcher,
body.cp-dark .sp-hub-topbar,
body.cp-dark .sp-hub-tabs,
body.cp-dark #sph-tabs,
body.cp-dark .sp-hub-panels,
body.cp-dark .sp-hub-panel,
body.cp-dark .sp-tool-card,
body.cp-dark .sp-dash-wrapper {
  background: var(--cpds-surface) !important;
  color: var(--cpds-text) !important;
  border-color: var(--cpds-border) !important;
}
body.cp-dark #sp-hub-body,
body.cp-dark #sp-hub-body > div:not([class]),
body.cp-dark #sp-tools-hub div:not([class]) {
  background: var(--cpds-bg) !important; color: #cbd5e1 !important;
}
body.cp-dark #sp-hub-body a { color: #5eead4 !important; }
body.cp-dark .sp-hub-tab { background: transparent !important; color: var(--cpds-text-dim) !important; }
body.cp-dark .sp-hub-tab.active { background: var(--cpds-bg) !important; color: var(--cpds-link) !important; }
body.cp-dark #sp-tools-hub input, body.cp-dark #sp-tools-hub select,
body.cp-dark .sp-tool-card input, body.cp-dark .sp-tool-card select,
body.cp-dark .sp-tool-form input, body.cp-dark .sp-tool-form select,
body.cp-dark .sp-calc-form input, body.cp-dark .sp-calc-form select {
  background: var(--cpds-bg) !important; color: #fff !important;
  border-color: var(--cpds-surface-highlight) !important;
}
body.cp-dark #sp-tools-hub h1, body.cp-dark #sp-tools-hub h2,
body.cp-dark #sp-tools-hub h3, body.cp-dark #sp-tools-hub h4,
body.cp-dark #sp-tools-hub label, body.cp-dark #sp-tools-hub span,
body.cp-dark #sp-tools-hub p { color: #e2e8f0 !important; }
body.cp-dark .sp-hub-topbar, body.cp-dark .sp-hub-meta,
body.cp-dark .sp-hub-stat-pill { color: #e2e8f0 !important; }
body.cp-dark .sp-hub-stat-pill strong { color: #5eead4 !important; }

/* --- Karty wyróżnione / kremowe / stopki kart --- */
body.cp-dark article.item-single-featured,
body.cp-dark .content-wrap.display-featured-card,
body.cp-dark .listing-item.featured,
body.cp-dark footer.entry-footer {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}
body.cp-dark .listing-item.featured { border-left: 3px solid #facc15 !important; }

/* --- Placeholdery okładek --- */
body.cp-dark .item-cover.entry-cover,
body.cp-dark .featured-cover.entry-cover { background-color: var(--cpds-surface-highlight) !important; }

/* --- Pasek statystyk hero --- */
body.cp-dark .ss-stats-wrapper,
body.cp-dark .ss-stat-card { background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important; }
body.cp-dark .ss-stat-info strong { color: #fff !important; }
body.cp-dark .ss-stat-info span { color: var(--cpds-text-dim) !important; }

/* --- Kafle semantyczne (SEO hub w stopce) --- */
body.cp-dark .ss-semantic-footer,
body.cp-dark .ss-semantic-box { background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important; }
body.cp-dark .ss-semantic-box h4 { color: #fff !important; }
body.cp-dark .ss-semantic-box p { color: #cbd5e1 !important; }

/* --- Badge / kapsuły / przyciski niestandardowe --- */
body.cp-dark .spawik-iq-badge,
body.cp-dark .spawik-iq-badge--new,
body.cp-dark .ssai-capsule {
  background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark button.cphp-btn { background: var(--cpds-link) !important; color: #0f172a !important; border: none !important; }

/* --- Widżet pól niestandardowych / benefity / viewer --- */
body.cp-dark .widget_cp_widget_listing_custom_fields { background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important; }
body.cp-dark .listing-custom-fields tr { background: var(--cpds-bg) !important; }
body.cp-dark .listing-custom-field-title { color: var(--cpds-text-dim) !important; }
body.cp-dark .listing-custom-field-value { color: #5eead4 !important; }
body.cp-dark .benefit-item { background: var(--cpds-surface-highlight) !important; border-color: var(--cpds-border) !important; }
body.cp-dark .benefit-item span { color: #e2e8f0 !important; }
body.cp-dark .sprytny-viewer-box { background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important; }
body.cp-dark .viewer-txt { color: var(--cpds-text-dim) !important; }
body.cp-dark .viewer-txt strong { color: #fff !important; }

/* --- Dropdown tłumacza --- */
body.cp-dark .gt_selected, body.cp-dark .goog-te-gadget { background: var(--cpds-surface) !important; color: #e2e8f0 !important; }

/* ==========================================================================
   6. STOPKA — nadpisanie wymuszonego #footer { background:#fff !important }
   ========================================================================== */

body.cp-dark #footer, body.cp-dark .footer-top, body.cp-dark .footer-bottom,
body.cp-dark .ss-footer-ultra, body.cp-dark .site-footer {
  background: var(--cpds-bg) !important;
  border-top: 1px solid var(--cpds-border) !important;
}
body.cp-dark #footer p, body.cp-dark .site-footer p,
body.cp-dark .author-bio, body.cp-dark .copyright { color: #cbd5e1 !important; }
body.cp-dark #footer .menu li a { color: #cbd5e1 !important; }
body.cp-dark #footer .menu li a:hover { color: var(--cpds-link) !important; }
body.cp-dark .widget-title, body.cp-dark .section-title { color: #fff !important; border-bottom-color: var(--cpds-border) !important; }

/* ==========================================================================
   7. NAPRAWA NIECZYTELNEGO TEKSTU
   ========================================================================== */

body.cp-dark .ssh-pretitle, body.cp-dark .ss-ben-pretitle,
body.cp-dark .ss-subtitle, body.cp-dark .ssh-step-number,
body.cp-dark .ss-ben-description { color: #e2e8f0 !important; }

body.cp-dark .cat-item-name, body.cp-dark .site-description { color: #e2e8f0 !important; }

body.cp-dark .hero-lead strong, body.cp-dark .hero-sublead strong,
body.cp-dark p strong, body.cp-dark .ss-semantic-box strong,
body.cp-dark .ss-legal-info strong { color: inherit !important; }

body.cp-dark .listing-item .entry-title a,
body.cp-dark article .entry-title a,
body.cp-dark .entry-header .entry-title a { color: #fca5a5 !important; }

/* ==========================================================================
   8. POJEDYNCZE OGŁOSZENIE (single ad_listing) — dodatkowe komponenty
   ========================================================================== */

body.cp-dark .sp-sidebar-widget,
body.cp-dark .cp-modern-location-box,
body.cp-dark .spawik-iq-catbar__inner,
body.cp-dark .spawik-iq-panel,
body.cp-dark .ssr-rating-widget-wrapper,
body.cp-dark .living-card {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}
body.cp-dark .cp-modern-location-box a { color: #5eead4 !important; }
body.cp-dark .spawik-iq-panel * { color: #cbd5e1 !important; }

/* Poll / ankiety */
body.cp-dark .sp-poll-option {
  background: var(--cpds-bg) !important;
  border: 1px solid var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}

/* Etykiety, chipy, kapsuły */
body.cp-dark span.label, body.cp-dark p.label,
body.cp-dark [class*="spawik-iq-catbar__chip"],
body.cp-dark .spawik-iq-panel__score-pill {
  background: var(--cpds-surface-highlight) !important;
  color: var(--cpds-text) !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark .spawik-iq-panel__tip {
  background: var(--cpds-bg) !important; color: #cbd5e1 !important;
  border-color: var(--cpds-border) !important;
}

/* Ceny w kokpicie / ostatnie ogłoszenia */
body.cp-dark .recent-ad-price, body.cp-dark .recent-ad-meta-item { color: #5eead4 !important; }

/* Mapa (kanwa JS) — spójne przyciemnienie jak dla iframe */
body.cp-dark .listing-map { filter: invert(92%) hue-rotate(180deg) contrast(90%); }

/* Pływający przycisk asystenta AI */
body.cp-dark #sb-fab {
  background: var(--cpds-link) !important; color: #0f172a !important;
  box-shadow: 0 4px 12px var(--cpds-accent-glow) !important;
}

/* ==========================================================================
   9. BLOG (lista + pojedynczy wpis)
   ========================================================================== */

/* Panel persony / kokpit kandydata */
body.cp-dark .sp-dash-header, body.cp-dark .sp-dash-body,
body.cp-dark .sp-dash-footer, body.cp-dark [class^="sp-dash-"] {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}

/* Przycisk drugorzędny (biały wariant) -> ciemny outline; NIE rusza teal btn-golden */
body.cp-dark .sp-btn:not(.btn-golden) {
  background: var(--cpds-surface) !important;
  color: #5eead4 !important;
  border: 1px solid rgba(31,214,205,.5) !important;
}

/* Chmura tagów */
body.cp-dark .tag-cloud-link, body.cp-dark .widget_tag_cloud a { color: #5eead4 !important; }

/* Tabele w treści artykułów */
body.cp-dark .entry-content table, body.cp-dark .page-content table,
body.cp-dark .entry-content thead, body.cp-dark .entry-content tbody,
body.cp-dark .entry-content tr, body.cp-dark .entry-content td {
  background-color: transparent !important;
  color: var(--cpds-text) !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark .entry-content th {
  background: var(--cpds-surface-highlight) !important; color: #fff !important;
  border-color: rgba(148,163,184,.2) !important;
}

/* Spis treści (LuckyWP TOC) */
body.cp-dark .lwptoc, body.cp-dark .lwptoc_i {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}
body.cp-dark .lwptoc a, body.cp-dark .lwptoc_item a { color: #5eead4 !important; }
body.cp-dark .lwptoc_header, body.cp-dark .lwptoc_title { color: #fff !important; }

/* Etykiety formularzy */
body.cp-dark label { color: #cbd5e1 !important; }

/* ==========================================================================
   10. PRZYCISK PRZEŁĄCZNIKA (wstrzykiwany do menu)
   ========================================================================== */

.cpds-toggle-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 6px 14px; display: inline-flex;
  align-items: center; gap: 8px; cursor: pointer;
  transition: all 0.3s ease; color: inherit;
}
.cpds-toggle-btn:hover { background: rgba(255,255,255,0.2); }
.cpds-toggle-btn[aria-pressed="true"] {
  background: var(--cpds-link); color: #000;
  box-shadow: 0 0 10px var(--cpds-accent-glow); border-color: transparent;
}
.cpds-toggle-btn svg { width: 18px; height: 18px; fill: currentColor; }
.cpds-toggle-label { font-size: 0.85rem; font-weight: 600; }

/* ==========================================================================
   11. STRONA KATEGORII (filtry, sortowanie, opis, baner)
   ========================================================================== */

body.cp-dark .ap-sortbar, body.cp-dark .cpof-drawer, body.cp-dark #cpof-drawer,
body.cp-dark .taxonomy-description {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: #e2e8f0 !important;
}
body.cp-dark .ap-chip, body.cp-dark a.ap-chip {
  background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark .ap-chip.active, body.cp-dark .ap-chip[aria-pressed="true"] {
  background: var(--cpds-link) !important; color: #0f172a !important;
}
body.cp-dark .taxonomy-description, body.cp-dark .taxonomy-description p,
body.cp-dark .taxonomy-description li { color: #cbd5e1 !important; }
body.cp-dark .cpof-drawer *, body.cp-dark .ap-sortbar * { color: #e2e8f0 !important; }
body.cp-dark a.ssb-banner-c1__cta { background: var(--cpds-link) !important; color: #0f172a !important; }

/* ==========================================================================
   12. EDYCJA PROFILU / FORMULARZE / TABELE
   ========================================================================== */

body.cp-dark .input-group-label {
  background: var(--cpds-surface-highlight) !important; color: #cbd5e1 !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark table, body.cp-dark thead, body.cp-dark tbody,
body.cp-dark tr, body.cp-dark td {
  background-color: transparent !important; color: var(--cpds-text) !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark th {
  background: var(--cpds-surface-highlight) !important; color: #fff !important;
  border-color: rgba(148,163,184,.2) !important;
}
body.cp-dark input#url, body.cp-dark .input-group .input, body.cp-dark .input-group input {
  background: var(--cpds-bg) !important; color: #fff !important;
  border-color: var(--cpds-surface-highlight) !important;
}
body.cp-dark #cptc-verification-section, body.cp-dark .cptc-p-box,
body.cp-dark #ss-sidebar-billing-widget, body.cp-dark .ss-widget-footer,
body.cp-dark #ss-sidebar-billing-widget .ss-widget-footer {
  background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important;
  color: #e2e8f0 !important;
}
body.cp-dark #ss-sidebar-billing-widget *, body.cp-dark .cptc-p-box * { color: #e2e8f0 !important; }
body.cp-dark .help-text, body.cp-dark .text-muted { color: var(--cpds-text-dim) !important; }

/* Linki w formularzach / awatarze / mediach / właścicielu */
body.cp-dark .app-form a, body.cp-dark .content-inner a, body.cp-dark .avatar-wrap a,
body.cp-dark .change-avatar, body.cp-dark .media-attachments a,
body.cp-dark .listing-owner a { color: #5eead4 !important; }

/* Stopka prawna (Regulamin / Polityka) */
body.cp-dark .ss-footer-ultra a, body.cp-dark .copyright a,
body.cp-dark .ss-legal-info a, body.cp-dark .ss-terms a { color: #5eead4 !important; }
body.cp-dark .ss-footer-ultra, body.cp-dark .ss-footer-ultra p,
body.cp-dark .ss-legal-info, body.cp-dark .copyright { color: var(--cpds-text-dim) !important; }

/* ==========================================================================
   13. PRZYCISKI (naprawa niewidocznych napisów) + ŚCIEŻKA DODAWANIA OGŁOSZENIA
   ========================================================================== */

/* Przyciski: ciemny tekst na jasnym/teal tle. Wygrywa z regułami linków,
   które przez pomyłkę farbowały tekst przycisków na teal (niewidoczny). */
body.cp-dark a.button, body.cp-dark .button, body.cp-dark .button.small,
body.cp-dark .button.primary, body.cp-dark .button.secondary,
body.cp-dark .button.special-button, body.cp-dark .btn,
body.cp-dark input[type="submit"], body.cp-dark .search-submit {
  color: #0f172a !important;
}

/* Zakładki hero (Szukaj Ogłoszeń / Narzędzia) + ikona mikrofonu wyszukiwarki */
body.cp-dark .sp-hero-tab-btn { color: #cbd5e1 !important; }
body.cp-dark .sp-hero-tab-btn.active { background: var(--cpds-link) !important; color: #0f172a !important; }
body.cp-dark .ssai-voice { color: var(--cpds-text-dim) !important; }

/* Kreator AI wyboru kategorii + kontenery adi- */
body.cp-dark #adi-smart-ui, body.cp-dark [id^="adi-"], body.cp-dark [class*="adi-"] {
  background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important;
  color: var(--cpds-text) !important;
}
body.cp-dark #adi-smart-ui *, body.cp-dark [id^="adi-"] * { color: #e2e8f0 !important; }
body.cp-dark #adi-smart-ui a, body.cp-dark [id^="adi-"] a { color: #5eead4 !important; }

/* Upload zdjęć / PDF (mcpimu) */
body.cp-dark .mcpimu-container, body.cp-dark .mcpimu-upload-area {
  background: var(--cpds-surface) !important; border-color: rgba(148,163,184,.25) !important;
  color: var(--cpds-text) !important;
}
body.cp-dark .mcpimu-container *, body.cp-dark .mcpimu-upload-area * { color: #e2e8f0 !important; }
body.cp-dark .mcpimu-title { color: #fff !important; }

/* Edytor WP: przełączniki Wizualny/Kod + pasek quicktags */
body.cp-dark .wp-switch-editor, body.cp-dark .quicktags-toolbar {
  background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.25) !important;
}
body.cp-dark .quicktags-toolbar input[type="button"] {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.25) !important;
}
body.cp-dark .wp-editor-container, body.cp-dark .wp-editor-area {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
}

/* Miernik "Moc Twojego Ogłoszenia" (adi-seo) */
body.cp-dark #adi-seo-container { background: var(--cpds-surface) !important; border-color: var(--cpds-border) !important; }
body.cp-dark #adi-seo-container * { color: #e2e8f0 !important; }

/* Wskaźnik kroków kreatora (KATEGORIA / SZCZEGÓŁY / PODGLĄD / DZIĘKUJEMY) */
body.cp-dark .progress-indicator li span, body.cp-dark .progress-indicator li { color: #cbd5e1 !important; }
body.cp-dark .progress-indicator li.is-current span { color: #fff !important; }

/* Mapa adresu w formularzu (kanwa JS) */
body.cp-dark .cpaf-map-container, body.cp-dark #ad_listing_address_map_div {
  filter: invert(92%) hue-rotate(180deg) contrast(90%);
}

/* Popup "Koło Fortuny" (rama modala) + callout regulaminu.
   Same grafika koła (kolorowe wycinki) pozostaje bez zmian. */
body.cp-dark .ss-fortuna, body.cp-dark .ss-fortuna-header,
body.cp-dark .ss-fortuna-footer, body.cp-dark .ss-fortuna-body {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
}
body.cp-dark .ss-fortuna-header *, body.cp-dark .ss-fortuna-footer *,
body.cp-dark .ss-fortuna h1, body.cp-dark .ss-fortuna h2, body.cp-dark .ss-fortuna h3 { color: #e2e8f0 !important; }
body.cp-dark .license.callout, body.cp-dark .callout {
  background: var(--cpds-surface) !important; border-color: rgba(148,163,184,.2) !important;
  color: #e2e8f0 !important;
}

/* ==========================================================================
   14. KOKPIT UŻYTKOWNIKA (interfejs-uzytkownika): spud-*, ap-sb-*, btn-white
   ========================================================================== */

/* Panele kokpitu (Sprytny Spawacz User Dashboard) */
body.cp-dark [class^="spud-"], body.cp-dark [class*=" spud-"] {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: #e2e8f0 !important;
}
body.cp-dark [class^="spud-"] h1, body.cp-dark [class^="spud-"] h2,
body.cp-dark [class^="spud-"] h3, body.cp-dark [class^="spud-"] h4 { color: #fff !important; }
body.cp-dark [class^="spud-"] p, body.cp-dark [class^="spud-"] label,
body.cp-dark [class^="spud-"] li, body.cp-dark [class^="spud-"] td { color: #cbd5e1 !important; }
body.cp-dark .spud-chip { background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important; }
body.cp-dark .spud-chat-box, body.cp-dark #spudChat, body.cp-dark .spud-msg--ai { background: var(--cpds-bg) !important; }
body.cp-dark .spud-classic-separator { background: transparent !important; }
body.cp-dark .spud-classic-separator span { background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important; }

/* Analityka / prognozy (ap-sb-) */
body.cp-dark [class^="ap-sb-"] {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  color: #e2e8f0 !important;
}
body.cp-dark [class^="ap-sb-"] * { color: #e2e8f0 !important; }
body.cp-dark .ap-sb-forecast-slider, body.cp-dark input[type="range"] {
  accent-color: var(--cpds-link) !important; background: var(--cpds-surface-highlight) !important;
}

/* Białe przyciski i powiadomienia */
body.cp-dark .btn-white, body.cp-dark a.btn.btn-white {
  background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important;
  border-color: rgba(148,163,184,.25) !important;
}
body.cp-dark .notice, body.cp-dark .notice.warning {
  background: var(--cpds-surface) !important; border-color: rgba(148,163,184,.25) !important;
  color: #e2e8f0 !important;
}

/* Pole wyszukiwania z autouzupełnianiem */
body.cp-dark input.search_keywords, body.cp-dark #search_keywords,
body.cp-dark input.ui-autocomplete-input {
  background: var(--cpds-bg) !important; color: #fff !important; border-color: var(--cpds-surface-highlight) !important;
}

/* Badge punktów w misjach (nadpisanie białego tekstu z reguły motywu .sp-mission span) */
body.cp-dark .sp-mission .sp-points-badge, body.cp-dark .sp-sidebar-widget .sp-points-badge {
  background: var(--cpds-link) !important; color: #00181b !important;
}

/* ==========================================================================
   15. POPRAWKI UX: BIAŁE CENY I TYTUŁY + WYGLĄD MOBILNY
   ========================================================================== */

/* Ceny na biało (motyw wymusza ciemny granat --ss-navy -> niewidoczne na ciemnym).
   Wyższa specyficzność body.cp-dark .listing-item .price* wygrywa z motywem. */
body.cp-dark .listing-item .post-price, body.cp-dark .listing-item .price-wrap,
body.cp-dark .listing-item .tag-head, body.cp-dark .post-price,
body.cp-dark .price-wrap, body.cp-dark .price, body.cp-dark .amount,
body.cp-dark .cp_price, body.cp-dark .listing-price {
  color: #ffffff !important;
}

/* Tytuły ogłoszeń na biało (wcześniej jasnoczerwone). Ta sekcja jest PÓŹNIEJ
   niż sekcja 7, więc nadpisuje tamten kolor. */
body.cp-dark .listing-item .entry-title a, body.cp-dark article .entry-title a,
body.cp-dark .entry-header .entry-title a, body.cp-dark .listing-item .entry-title,
body.cp-dark article .entry-title { color: #ffffff !important; }

/* --- MOBILNE MENU (górny i dolny pasek "cpam") ---
   Paski używają zmiennych --cpam-*; motyw ustawia je na biało (rgba(255,255,255,.93))
   z ciemnym tekstem. Nadpisujemy zmienne w trybie ciemnym — kaskaduje na oba paski,
   sidebar i menu. */
html.cp-dark, body.cp-dark {
  --cpam-bg: rgba(15, 23, 42, 0.96) !important;
  --cpam-text: #e2e8f0 !important;
  --cpam-active: #1fd6cd !important;
}

/* Dolny pasek akcji na pojedynczym ogłoszeniu (mobile) — motyw daje białe tło */
body.cp-dark .sprytny-sticky-bar {
  background: rgba(15, 23, 42, 0.97) !important;
  border-top-color: rgba(31, 214, 205, 0.6) !important;
}

/* Czat / asystent AI (smai-) — na mobile motyw przełącza na białe tło */
body.cp-dark .smai-sidebar-left, body.cp-dark .smai-chat-area,
body.cp-dark [class^="smai-"] {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
  border-color: var(--cpds-border) !important;
}

/* ==========================================================================
   16. MOBILE — górne/dolne menu (cpam), karty na home, komponenty AI
   Zweryfikowane wizualnie w podgladzie mobilnym Customizera.
   ========================================================================== */

/* Górny i dolny pasek mobilny: motyw ma TWARDE białe tło przez selektor ID
   (#cpam-top-bar), którego nadpisanie zmiennej --cpam-bg nie pokonuje.
   Dlatego nadpisujemy bezposrednio na poziomie ID. */
body.cp-dark #cpam-top-bar, body.cp-dark #cpam-bottom-bar {
  background: rgba(15, 23, 42, 0.97) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}
/* Menu boczne (lewe/prawe) — białe -> ciemne */
body.cp-dark #cpam-sidebar-left, body.cp-dark #cpam-sidebar-right,
body.cp-dark .cpam-sidebar, body.cp-dark .cpam-sidebar-inner {
  background: #0f172a !important; color: #e2e8f0 !important;
}
body.cp-dark .cpam-sidebar-header, body.cp-dark .cpam-sidebar-nav, body.cp-dark .cpam-menu {
  background: transparent !important;
}
body.cp-dark .cpam-top-bar *, body.cp-dark .cpam-bottom-bar *, body.cp-dark .cpam-sidebar * {
  color: #e2e8f0 !important;
}
body.cp-dark .cpam-icon-btn.cpam-active, body.cp-dark .cpam-icon-btn.cpam-active * { color: #1fd6cd !important; }
body.cp-dark .cpam-sidebar-title { color: #fff !important; }
body.cp-dark .cpam-sidebar-nav a, body.cp-dark .cpam-menu a {
  color: #e2e8f0 !important; border-color: rgba(148, 163, 184, 0.15) !important;
}

/* Karty ogłoszeń na stronie głównej: motyw wymusza białe tło w media query
   mobilnej (.home .listing-item{background:white}). Wyższa specyficzność wygrywa. */
body.cp-dark .home .listing-item, body.cp-dark .listing-item.listing-map-data,
body.cp-dark article.listing-item, body.cp-dark .home .listing-item .content-inner {
  background-color: var(--cpds-surface) !important;
}
body.cp-dark .home .listing-item .entry-title, body.cp-dark .home .listing-item .entry-title a { color: #ffffff !important; }
body.cp-dark .home .listing-item .post-price, body.cp-dark .home .listing-item .price-wrap { color: #ffffff !important; }

/* Komponenty AI / kalkulatory na mobile */
body.cp-dark .sp-matchmaker-area {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
  border-color: var(--cpds-border) !important;
}
body.cp-dark .sp-live-badge { background: var(--cpds-surface-highlight) !important; color: #e2e8f0 !important; }
body.cp-dark .sp-calc-btn.secondary {
  background: var(--cpds-surface) !important; color: #5eead4 !important;
  border: 1px solid rgba(31, 214, 205, 0.5) !important;
}

/* ==========================================================================
   17. KONTRAST WCAG AA — drobne poprawki czytelności
   ========================================================================== */

/* Sekcja tekstu SEO na dole strony — motyw daje ciemny slate (za niski kontrast) */
body.cp-dark .ss-seo-text-home, body.cp-dark .ss-seo-text-home p,
body.cp-dark .ss-seo-text-home li, body.cp-dark .ss-seo-text-home span { color: #cbd5e1 !important; }
body.cp-dark .ss-seo-text-home strong, body.cp-dark .ss-seo-text-home h1,
body.cp-dark .ss-seo-text-home h2, body.cp-dark .ss-seo-text-home h3,
body.cp-dark .ss-seo-text-home h4 { color: #ffffff !important; }

/* Pogrubienia w treści dziedziczą jasny kolor otoczenia (nie ciemny slate) */
body.cp-dark .entry-content strong, body.cp-dark .page-content strong,
body.cp-dark .hero-lead strong, body.cp-dark .hero-sublead strong { color: inherit !important; }

/* FAB "Wystaw ogłoszenie" (#qp-fab) — biały tekst na pomarańczowym nie przechodził AA */
body.cp-dark #qp-fab, body.cp-dark #qp-fab-label, body.cp-dark #qp-fab * { color: #1a1200 !important; }

/* Badge powiadomień (biały na jasnoczerwonym) — głębsza czerwień = AA 4.76 */
body.cp-dark #sb-fab-badge, body.cp-dark .sb-fab-badge,
body.cp-dark .notification-badge, body.cp-dark .cpam-badge { background: #dc2626 !important; color: #fff !important; }

/* Badge "market" na FAB (biały na bursztynowym) — ciemny tekst dla czytelności */
body.cp-dark #sb-market-mini { color: #1a1200 !important; font-weight: 700 !important; }

/* --- Kontrast c.d.: breadcrumbs, badge, daty, karty boczne --- */
body.cp-dark .breadcrumbs, body.cp-dark .breadcrumb-trail, body.cp-dark .trail-items,
body.cp-dark .trail-items li, body.cp-dark .trail-item, body.cp-dark .breadcrumb-trail span { color: #cbd5e1 !important; }
body.cp-dark .breadcrumb-trail a, body.cp-dark .trail-items a { color: #5eead4 !important; }
body.cp-dark span.badge, body.cp-dark .sp-sidebar-widget .badge { color: #00181b !important; }
body.cp-dark .expired-date { color: #f87171 !important; }
body.cp-dark .living-card, body.cp-dark .living-card p, body.cp-dark .living-card span,
body.cp-dark .living-card small, body.cp-dark .living-card h4, body.cp-dark .living-card li { color: #cbd5e1 !important; }

/* ==========================================================================
   18. POJEDYNCZE OGŁOSZENIE — czytelność hero i tagów (WCAG)
   ========================================================================== */

/* Zdjęcie hero moze byc JASNE (logo firmy na bialym) -> bialy tekst nieczytelny.
   Ciemna nakladka gradientowa gwarantuje czytelnosc tekstu nad kazdym zdjeciem. */
body.cp-dark .hero-listing { position: relative !important; }
body.cp-dark .hero-listing::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.55), rgba(15,23,42,.88));
  z-index: 0; pointer-events: none;
}
body.cp-dark .hero-listing-wrap, body.cp-dark .hero-listing .entry-header,
body.cp-dark .hero-listing .columns, body.cp-dark .hero-listing > * { position: relative; z-index: 1; }

/* Strzalki karuzeli (bialy na bialym) */
body.cp-dark .scc-nav, body.cp-dark .scc-prev, body.cp-dark .scc-next {
  background: var(--cpds-surface) !important; color: #e2e8f0 !important;
  border: 1px solid rgba(148,163,184,.3) !important;
}
/* Nazwy autorow w karuzeli podobnych ogloszen */
body.cp-dark .listing-top-name { color: #cbd5e1 !important; }

/* Blok tagow (.prdetails ma jasne tlo; pill .label przezroczysty) */
body.cp-dark .prdetails, body.cp-dark .post-tags { background: transparent !important; }
body.cp-dark .post-tags .label { background: var(--cpds-surface-highlight) !important; }
body.cp-dark .post-tags .label, body.cp-dark .post-tags .label a { color: #e2e8f0 !important; }
body.cp-dark .listing-meta a, body.cp-dark .listing-meta { color: #cbd5e1 !important; }

/* Widget ocen */
body.cp-dark .ssr-empty-text { color: #cbd5e1 !important; }
body.cp-dark .ssr-btn-trigger { color: #fff !important; background: #dc2626 !important; }

/* ==========================================================================
   19. KONTRAST c.d. — opisy kart, filtry, badge LIVE
   ========================================================================== */

/* Opisy/excerpty na kartach ogłoszeń (motyw daje ciemny slate --ss-text-muted) */
body.cp-dark .entry-content.subheader, body.cp-dark .listing-item .entry-content,
body.cp-dark .listing-item .subheader, body.cp-dark .listing-item p { color: #94a3b8 !important; }

/* Pusty komunikat filtrów kategorii */
body.cp-dark .cpof-chips-empty { color: #94a3b8 !important; }

/* Badge LIVE — motyw wymusza biały tekst przez .sp-sidebar-widget h4 span;
   nadpisujemy wyższą specyficznością (ciemny tekst na teal = AA). */
body.cp-dark .sp-sidebar-widget h4 span.badge, body.cp-dark .sp-sidebar-widget h4 .badge,
body.cp-dark .sp-sidebar-widget .badge, body.cp-dark span.badge, body.cp-dark .badge { color: #00181b !important; }

/* --- Tagi (.label) także na blogu: sam link ma jasne tlo -> przezroczyste --- */
body.cp-dark div.prdetails, body.cp-dark .single .prdetails, body.cp-dark .post .prdetails { background: #1e293b !important; }
body.cp-dark .post-tags .label, body.cp-dark div.prdetails .label, body.cp-dark .label { background: #334155 !important; }
body.cp-dark .post-tags .label a, body.cp-dark div.prdetails .label a, body.cp-dark .label a {
  background: transparent !important; color: #e2e8f0 !important;
}

/* --- Data aktualizacji profilu (szary #777) --- */
body.cp-dark .profile-last-updated, body.cp-dark .last-updated { color: #94a3b8 !important; }

/* ==========================================================================
   20. KARTA "ZWERYFIKOWANY SPRZEDAWCA" (cptc-trust-card) — biała -> ciemna
   ========================================================================== */
body.cp-dark .cptc-trust-card-2026 {
  background: var(--cpds-surface) !important;
  border-color: var(--cpds-border) !important;
  box-shadow: var(--cpds-shadow-card) !important;
}
body.cp-dark .cptc-t-list li {
  background: transparent !important; color: #cbd5e1 !important;
  border-color: rgba(148,163,184,.14) !important;
}
body.cp-dark .cptc-t-list li strong, body.cp-dark .cptc-t-list li b { color: #fff !important; }
body.cp-dark .cptc-t-header, body.cp-dark .cptc-t-header h4, body.cp-dark .cptc-trust-card-2026 h4 { color: #fff !important; }
body.cp-dark .cptc-t-header p, body.cp-dark .cptc-trust-card-2026 p, body.cp-dark .cptc-t-list li span { color: #cbd5e1 !important; }

/* ==========================================================================
   21. STRONA GŁÓWNA — dopięcie UX (karuzela, badge, ikony społecznościowe)
   ========================================================================== */

/* Strzałki karuzeli wyróżnionych (slick) — białe koła -> ciemne + jasna strzałka */
body.cp-dark .slick-prev, body.cp-dark .slick-next,
body.cp-dark .custom-slick-prev, body.cp-dark .custom-slick-next {
  background: var(--cpds-surface) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.4) !important;
}
body.cp-dark .slick-prev::before, body.cp-dark .slick-next::before,
body.cp-dark .custom-slick-prev::before, body.cp-dark .custom-slick-next::before {
  border-color: #e2e8f0 !important; color: #e2e8f0 !important;
}

/* Badge LIVE w hubie narzędzi */
body.cp-dark .sp-tool-badge { color: #00181b !important; }
body.cp-dark .sp-result-note { color: #cbd5e1 !important; }

/* Ikony społecznościowe w stopce — białe kółka -> ciemne, jasne symbole, hover teal */
body.cp-dark .ss-social-icons a { background: var(--cpds-surface-highlight) !important; }
body.cp-dark .ss-social-icons i, body.cp-dark .ss-social-icons i.fab { color: #e2e8f0 !important; }
body.cp-dark .ss-social-icons a:hover { background: var(--cpds-link) !important; }
body.cp-dark .ss-social-icons a:hover i, body.cp-dark .ss-social-icons a:hover i.fab { color: #00181b !important; }
