/* =====================================================================
   "Serenity" — LearnDash design system for ZP (Zaufaj Położnej)
   Scoped to .learndash-wrapper / .ld-focus, loaded ONLY on LearnDash
   pages (functions.php). Never touches WordPress / WooCommerce / Elementor.
   LearnDash injects inline `!important` rules, so contested declarations
   here also use `!important`.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Nunito+Sans:wght@400;600;700&display=swap');

.learndash-wrapper, .ld-focus, #ld-focus-header, #ld-focus-sidebar {
	--c-primary:#ff008c; --c-primary-700:#cc0070; --c-primary-050:#ffeaf5; --c-primary-300:#ff5cb0;
	--c-mint:#1ea97c; --c-amber:#e8a23d;
	--c-plum:#36285a; --c-ink:#4f4860; --c-muted:#8b8597;
	--c-bg:#fbf6fa; --c-card:#fff; --c-line:#efe6ed;
	--r-lg:20px; --r-md:14px; --r-pill:999px;
	--shadow-md:0 2px 6px rgba(54,40,90,.06),0 14px 30px rgba(54,40,90,.06);
	--font-head:'Poppins',system-ui,-apple-system,'Segoe UI',sans-serif;
	--font-body:'Nunito Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
}

/* ============================ BASE ============================ */
.learndash-wrapper { font-family:var(--font-body) !important; color:var(--c-ink); font-size:16.5px; line-height:1.75; }
.learndash-wrapper, .learndash-wrapper * { box-sizing:border-box; }
.learndash-wrapper a { color:var(--c-primary); }
.learndash-wrapper img, .learndash-wrapper iframe, .learndash-wrapper video { max-width:100%; }

/* (3) ALL content headings share the SAME plum as H1/H2 — no dark-red */
.learndash-wrapper .wp-block-heading,
.learndash-wrapper .ld-tab-content h1, .learndash-wrapper .ld-tab-content h2,
.learndash-wrapper .ld-tab-content h3, .learndash-wrapper .ld-tab-content h4,
.learndash-wrapper .ld-tab-content h5, .learndash-wrapper .ld-tab-content h6,
.ld-focus .ld-focus-content h1, .ld-focus .ld-focus-content h2, .ld-focus .ld-focus-content h3 {
	font-family:var(--font-head) !important; color:var(--c-plum) !important; line-height:1.25; letter-spacing:-.01em;
}
.learndash-wrapper .ld-tab-content h2, .learndash-wrapper .wp-block-heading {
	font-size:1.6rem !important; font-weight:700 !important; margin:1.8em 0 .55em !important;
	padding-bottom:.35em !important; border-bottom:3px solid var(--c-primary-050) !important;
}
.learndash-wrapper .ld-tab-content h3 { font-size:1.22rem !important; font-weight:700 !important; border:0 !important; }
.learndash-wrapper .ld-tab-content p { margin:0 0 1.15em; }
.learndash-wrapper .ld-tab-content strong { color:var(--c-plum); font-weight:700; }
.learndash-wrapper .ld-tab-content ul, .learndash-wrapper .ld-tab-content .wp-block-list { padding-left:1.4em; margin:0 0 1.3em; }
.learndash-wrapper .ld-tab-content li { margin:.45em 0; }
.learndash-wrapper .ld-tab-content li::marker { color:var(--c-primary); font-weight:700; }
.learndash-wrapper .ld-tab-content .wp-block-separator { border:0; border-top:2px solid var(--c-line); opacity:1; margin:2em 0; }
.learndash-wrapper .ld-tab-content iframe { border-radius:var(--r-lg) !important; box-shadow:var(--shadow-md); }

/* =================== INFOBAR (top status card) =============== */
.learndash-wrapper .ld-topic-status, .learndash-wrapper .ld-lesson-status, .learndash-wrapper .ld-course-status {
	background:var(--c-card) !important; border:1px solid var(--c-line) !important;
	border-radius:var(--r-lg) !important; box-shadow:var(--shadow-md) !important; padding:8px 6px !important;
}
.learndash-wrapper .ld-progress-label { color:var(--c-plum) !important; font-family:var(--font-head) !important; font-weight:700 !important; }
.learndash-wrapper .ld-progress-percentage, .learndash-wrapper .ld-progress-percentage.ld-secondary-color { color:var(--c-primary) !important; font-family:var(--font-head) !important; font-weight:800 !important; }
.learndash-wrapper .ld-progress-steps { color:var(--c-muted) !important; font-weight:600; }
.learndash-wrapper .ld-breadcrumbs a, .learndash-wrapper .ld-breadcrumbs-segments a { color:var(--c-primary) !important; font-weight:700 !important; font-family:var(--font-head) !important; }

/* progress bar */
.learndash-wrapper .ld-progress-bar { height:9px !important; border-radius:var(--r-pill) !important; background:#f1eaf0 !important; overflow:hidden; }
.learndash-wrapper .ld-progress-bar .ld-progress-bar-percentage,
.learndash-wrapper .ld-progress-bar .ld-progress-bar-percentage.ld-secondary-background { background:linear-gradient(90deg,var(--c-primary),var(--c-primary-300)) !important; border-radius:var(--r-pill) !important; }

/* status pill */
.learndash-wrapper .ld-status { border-radius:var(--r-pill) !important; padding:6px 15px !important; font-family:var(--font-head) !important; font-weight:700 !important; letter-spacing:.04em; text-transform:uppercase; font-size:10.5px !important; }
.learndash-wrapper .ld-status-progress, .learndash-wrapper .ld-status-waiting { background:var(--c-amber) !important; color:#fff !important; }

/* (1) COMPLETED = green circle + white check (everywhere) */
.learndash-wrapper .ld-status-complete,
.learndash-wrapper .ld-status-icon.ld-status-complete,
.learndash-wrapper .ld-status-complete.ld-status, .learndash-wrapper .ld-status-completed {
	background-color:var(--c-mint) !important; border-color:var(--c-mint) !important; color:#fff !important;
}
.learndash-wrapper .ld-status-complete .ld-icon, .learndash-wrapper .ld-status-complete:before,
.learndash-wrapper .ld-status-complete *, .learndash-wrapper .ld-status-icon.ld-status-complete:before { color:#fff !important; }

/* ============ COURSE/LESSON CONTENT TABLE + ROWS ============= */
.learndash-wrapper .ld-table-list { border:1px solid var(--c-line) !important; border-radius:var(--r-lg) !important; overflow:hidden; background:var(--c-card); box-shadow:var(--shadow-md); }
.learndash-wrapper .ld-table-list-header.ld-primary-background, .learndash-wrapper .ld-table-list-header { background:linear-gradient(135deg,var(--c-primary),var(--c-primary-300)) !important; color:#fff !important; border:0 !important; padding:20px 24px !important; font-family:var(--font-head) !important; font-weight:700 !important; }
.learndash-wrapper .ld-table-list-header * { color:#fff !important; }
.learndash-wrapper .ld-item-list-item-preview, .learndash-wrapper .ld-table-list-item-preview { padding:17px 24px !important; }
.learndash-wrapper .ld-item-list-item:hover { background:var(--c-primary-050) !important; }
.learndash-wrapper .ld-item-name, .learndash-wrapper .ld-item-title { color:var(--c-plum) !important; font-family:var(--font-head) !important; font-weight:600 !important; }

/* (2) ANY solid-pink surface → white text + white icons */
.learndash-wrapper .ld-primary-background,
.learndash-wrapper .ld-primary-background *,
.learndash-wrapper .ld-primary-background .ld-icon { color:#fff !important; }

/* ===================== BUTTONS — readable everywhere ========= */
.learndash-wrapper .ld-button:not(.ld-button-transparent):not(.ld-button-alternate),
.learndash-wrapper .learndash_mark_complete_button, .learndash-wrapper #learndash_mark_complete_button,
.learndash-wrapper input.learndash_mark_complete_button, .learndash-wrapper .ld-expand-button:not(.ld-button-alternate) {
	background:var(--c-primary) !important; border-color:var(--c-primary) !important; color:#fff !important;
	border-radius:var(--r-pill) !important; font-family:var(--font-head) !important; font-weight:700 !important;
	padding:14px 30px !important; box-shadow:0 8px 22px rgba(255,0,140,.20) !important;
	max-width:100% !important; white-space:normal !important;
}
.learndash-wrapper .ld-button:not(.ld-button-transparent):not(.ld-button-alternate) *,
.learndash-wrapper .learndash_mark_complete_button *,
.learndash-wrapper .ld-expand-button:not(.ld-button-alternate),
.learndash-wrapper .ld-expand-button:not(.ld-button-alternate) .ld-text,
.learndash-wrapper .ld-expand-button:not(.ld-button-alternate) .ld-icon { color:#fff !important; }
.learndash-wrapper .ld-button:not(.ld-button-transparent):not(.ld-button-alternate):hover,
.learndash-wrapper .learndash_mark_complete_button:hover { background:var(--c-primary-700) !important; border-color:var(--c-primary-700) !important; }
.learndash-wrapper .ld-button.ld-button-transparent, .learndash-wrapper .ld-course-step-back,
.learndash-wrapper .ld-expand-button.ld-button-alternate { color:var(--c-primary) !important; font-family:var(--font-head) !important; font-weight:700 !important; }

/* FOCUS-MODE TOP HEADER buttons — white text on pink (no invisible text) */
#ld-focus-header .ld-button, .ld-focus-header .ld-button,
#ld-focus-header .learndash_mark_complete_button, #ld-focus-header input.learndash_mark_complete_button,
#ld-focus-header #sfwd-mark-complete #learndash_mark_complete_button {
	background:var(--c-primary) !important; color:#fff !important; border-radius:var(--r-pill) !important; box-shadow:none !important;
}
#ld-focus-header .ld-button *, #ld-focus-header .ld-text, #ld-focus-header .ld-icon,
#ld-focus-header .learndash_mark_complete_button *, #ld-focus-header .sfwd-mark-complete:after { color:#fff !important; }
.learndash-wrapper .ld-alert .ld-button { color:#fff !important; }

/* =========================== ALERTS ========================= */
.learndash-wrapper .ld-alert { border-radius:var(--r-md) !important; padding:16px 18px !important; }

/* ===================== FOCUS MODE: shell + clean SIDEBAR ===== */
.ld-focus .ld-focus-content { max-width:840px; margin-inline:auto; padding:40px 28px 80px; }
#ld-focus-sidebar, .ld-focus-sidebar, .ld-focus-sidebar .ld-course-navigation,
.ld-focus-sidebar .ld-table-list, .ld-focus-sidebar .ld-table-list-items { background:#fff !important; }
.ld-focus-sidebar .ld-table-list, .ld-focus-sidebar .ld-table-list-items { border:0 !important; box-shadow:none !important; }
#ld-focus-mode-course-heading, .ld-focus-sidebar .ld-course-navigation-heading { background:linear-gradient(135deg,var(--c-primary),var(--c-primary-300)) !important; color:#fff !important; font-family:var(--font-head) !important; font-weight:700 !important; }
#ld-focus-mode-course-heading * { color:#fff !important; }
.ld-focus-sidebar .ld-lesson-item-section-heading, .ld-focus-sidebar .ld-lesson-section-heading { background:#fff !important; color:var(--c-plum) !important; font-family:var(--font-head) !important; font-weight:700 !important; }
.ld-focus-sidebar .ld-table-list-item { border-bottom:1px solid var(--c-line) !important; }
.ld-focus-sidebar .ld-lesson-item-preview, .ld-focus-sidebar .ld-table-list-item-preview { padding:12px 18px !important; border-left:3px solid transparent !important; transition:background-color .12s ease; }
.ld-focus-sidebar .ld-lesson-item-preview:hover, .ld-focus-sidebar .ld-table-list-item-preview:hover { background:var(--c-primary-050) !important; }
.ld-focus-sidebar .ld-topic-title, .ld-focus-sidebar .ld-lesson-title, .ld-focus-sidebar .ld-item-title { color:var(--c-ink) !important; font-size:14.5px !important; }
.ld-focus-sidebar .ld-is-current-item, .ld-focus-sidebar .ld-active, .ld-focus-sidebar .ld-is-current-item .ld-table-list-item-preview { background:var(--c-primary-050) !important; border-left-color:var(--c-primary) !important; }
.ld-focus-sidebar .ld-is-current-item .ld-topic-title, .ld-focus-sidebar .ld-active .ld-topic-title { color:var(--c-primary) !important; font-weight:700 !important; }

/* ===================== ACCESSIBILITY ======================== */
.learndash-wrapper a:focus-visible, .learndash-wrapper button:focus-visible, .learndash-wrapper .ld-button:focus-visible { outline:3px solid var(--c-primary) !important; outline-offset:2px; }

/* ====================== (4) RESPONSIVE — no overflow ======== */
.learndash-wrapper { overflow-x:hidden; }
.learndash-wrapper .ld-button, .learndash-wrapper .learndash_mark_complete_button, .learndash-wrapper .ld-expand-button { max-width:100%; white-space:normal; }
@media (max-width:1024px){ .ld-focus .ld-focus-content { padding:28px 18px 60px; } }
@media (max-width:768px){
	.learndash-wrapper { font-size:16px; }
	.ld-focus .ld-focus-content { padding:22px 14px 56px; }
	.learndash-wrapper .ld-tab-content h2, .learndash-wrapper .wp-block-heading { font-size:1.32rem !important; }
	.learndash-wrapper .ld-tab-content h3 { font-size:1.1rem !important; }
	.learndash-wrapper .ld-table-list-header { padding:15px 16px !important; flex-wrap:wrap !important; gap:6px; }
	.learndash-wrapper .ld-item-list-item-preview, .learndash-wrapper .ld-table-list-item-preview { padding:13px 16px !important; }
	.learndash-wrapper .ld-topic-status, .learndash-wrapper .ld-lesson-status, .learndash-wrapper .ld-course-status { padding:6px 4px !important; }
	.learndash-wrapper .ld-breadcrumbs-segments { flex-wrap:wrap !important; }
	/* stack prev / mark-complete / next so they never run off-screen */
	.learndash-wrapper .ld-content-actions { flex-direction:column !important; align-items:stretch !important; gap:10px !important; }
	.learndash-wrapper .ld-content-action { width:100% !important; max-width:100% !important; justify-content:center !important; text-align:center; }
	.learndash-wrapper .ld-content-action .ld-button { width:100% !important; justify-content:center !important; padding:12px 16px !important; }
}

/* ===== (mobile) keep the focus-sidebar collapse toggle on-screen ===== */
@media (max-width:782px){
	.ld-focus .ld-focus-sidebar, #ld-focus-sidebar { max-width:90vw !important; overflow:visible !important; }
	/* LearnDash hangs the trigger off the right edge (negative offset) — pull it inside the viewport */
	.ld-focus .ld-focus-sidebar .ld-focus-sidebar-trigger,
	#ld-focus-sidebar-toggle,
	.ld-focus-sidebar-trigger {
		right:10px !important; left:auto !important; transform:none !important;
	}
	/* never let the focus layout create a horizontal scroll / off-screen cut */
	body.ld-in-focus-mode, .ld-focus, .ld-focus .ld-focus-main { overflow-x:hidden !important; }
}

/* ZP: większy odstęp między opisem quizu ("Quiz sprawdza…") a pytaniami/wynikami */
.single-sfwd-quiz .wpProQuiz_content { margin-top: 40px; }

/* ZP: numer pytania "N/total" na każdym pytaniu quizu */
.wpProQuiz_content .wpProQuiz_question_page{
	display:inline-block !important;
	background:#d6006e;color:#fff;font-size:12px;font-weight:700;
	padding:3px 12px;border-radius:20px;margin-bottom:10px;line-height:1.4;
}
/* ukryj zdublowany nagłówek "1. Pytanie" (numerację zastępuje "N/total") */
.wpProQuiz_content .wpProQuiz_listItem > .wpProQuiz_header{ display:none !important; }

/* ZP: ekran "brak dostępu" dla kursów w trybie Wewnętrzny (closed) bez wykupionego dostępu */
.zp-no-access{max-width:760px;margin:24px auto 8px;padding:8px 16px;text-align:center}
.zp-no-access__title{font-size:clamp(22px,4vw,30px);line-height:1.2;font-weight:700;margin:0 0 22px;text-wrap:balance}
.zp-no-access__img{display:block;max-width:100%;height:auto;margin:0 auto 26px;border-radius:12px}
.zp-no-access__cta{margin:0 0 8px;display:flex;justify-content:center}
.zp-no-access a.zp-no-access__btn{display:inline-block;cursor:pointer;font-size:17px;line-height:1.2;padding:14px 36px;border-radius:50px}
