/*
 * Certyfikaty ukończenia kursów (wtyczka 0.49.104, MCQP_Certs):
 * zakładka „Certyfikaty” w profilu, strona weryfikacji [mcq_cert], osobna strona wydruku (admin-post.php?action=mcqp_cert)
 * i blok na stronie głównej (.spotlight--certs w motywie). Sam certyfikat to SVG z kolorami zapisanymi w środku (zawsze jasny papier).
 */

/* ---------- zakładka „Certyfikaty” w profilu ---------- */
.mcqp-certs > h3 { margin: 0 0 6px; }
.mcqp-certs > p.mcqp-muted { margin: 0 0 14px; }
.mcqp-cert-nameform { margin: 0 0 16px; padding: 14px; border: 1px solid var(--mq-line); border-radius: 12px; background: var(--mq-bg); scroll-margin-top: 90px; }
.mcqp-cert-nameform .mcqp-flash { margin: 0 0 12px; }
.mcqp-cert-nameform .mcqp-field { margin: 0; }
.mcqp-field .mcqp-cert-namerow { display: flex; gap: 8px; margin: 0; font-weight: 400; }
.mcqp-cert-namerow input { flex: 1 1 auto; min-width: 0; }
.mcqp-cert-namerow .mcqp-btn { flex: none; }
.mcqp-cert-nameform .mcqp-cert-hint { margin: 6px 0 0; font-size: .8125rem; }
.mcqp-cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mcqp-cert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 14px; border: 1.5px solid var(--mq-line); border-radius: 14px; }
.mcqp-cert.is-earned { border-color: rgba(201, 154, 64, .6); background: linear-gradient(135deg, rgba(201, 154, 64, .12), rgba(201, 154, 64, 0) 62%); }
.mcqp-cert.is-earned { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.mcqp-cert.is-earned .mcqp-cert-acts { grid-column: 2; justify-content: flex-start; }
.mcqp-cert-ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--mq-track); color: var(--mq-soft); }
.mcqp-cert.is-earned .mcqp-cert-ico { background: linear-gradient(135deg, #e6c67f, #a97c26); color: #fff; box-shadow: 0 4px 12px rgba(169, 124, 38, .35); }
.mcqp-cert-i { width: 18px; height: 18px; flex: none; }
.mcqp-cert-ico .mcqp-cert-i { width: 24px; height: 24px; }
.mcqp-cert-main { display: grid; gap: 3px; min-width: 0; }
.mcqp-cert-name { color: var(--mq-strong); font-size: 1rem; }
.mcqp-cert-sub { color: var(--mq-soft); font-size: .875rem; overflow-wrap: anywhere; }
.mcqp-cert-note { color: var(--mq-text); font-size: .8125rem; }
.mcqp-cert-bar { position: relative; display: block; max-width: 320px; height: 6px; margin: 4px 0 2px; border-radius: 99px; background: var(--mq-track); overflow: hidden; }
.mcqp-cert-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--mq-primary); }
.mcqp-cert-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mcqp-cert-acts .mcqp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.mcqp-cert-acts .mcqp-btn.is-done { border-color: var(--mq-ok); color: var(--mq-strong); }
@media (max-width: 760px) {
	.mcqp-cert { grid-template-columns: auto minmax(0, 1fr); }
	.mcqp-cert .mcqp-cert-acts, .mcqp-cert.is-earned .mcqp-cert-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 440px) {
	.mcqp-field .mcqp-cert-namerow { flex-direction: column; }
	.mcqp-cert-acts .mcqp-btn { flex: 1 1 100%; }
}

/* ---------- strona weryfikacji [mcq_cert] ---------- */
.mcqp-certv { max-width: 880px; }
.mcqp-certv .mcqp-certv-lead { margin: 0 0 14px; color: var(--mq-soft); }
.mcqp-certv-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; max-width: none; }
.mcqp-certv-form .mcqp-field { flex: 1 1 260px; margin: 0; }
.mcqp-certv-form input { letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.mcqp-certv .mcqp-certv-res { max-width: none; margin: 16px 0 0; border-width: 1.5px; }
.mcqp-certv-res.is-ok { border-color: var(--mq-ok); }
.mcqp-certv-res.is-bad { border-color: var(--mq-bad); }
.mcqp-certv .mcqp-certv-st { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--mq-strong); font-size: 1.125rem; }
.mcqp-certv-st .mcqp-cert-i { width: 28px; height: 28px; }
.mcqp-certv-res.is-ok .mcqp-certv-st .mcqp-cert-i { color: var(--mq-ok); }
.mcqp-certv-res.is-bad .mcqp-certv-st .mcqp-cert-i { color: var(--mq-bad); }
.mcqp-certv-res > p.mcqp-muted { margin: 0; }
.mcqp-certv-dl { display: grid; margin: 14px 0 0; }
.mcqp-certv-dl > div { display: grid; grid-template-columns: minmax(130px, 210px) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--mq-line); }
.mcqp-certv-dl dt { color: var(--mq-soft); }
.mcqp-certv-dl dd { margin: 0; color: var(--mq-strong); font-weight: 600; overflow-wrap: anywhere; }
.mcqp-certv-fig { margin: 18px 0 0; }
.mcqp-certv-fig svg { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 14px 38px rgba(0, 0, 0, .3); }
@media (max-width: 520px) { .mcqp-certv-dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- strona wydruku (osobna, bez motywu) ---------- */
.mcqp-certp { margin: 0; min-height: 100vh; background: #e7e9ee; color: #1c2b4a; font-family: Inter, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; line-height: 1.45; }
.mcqp-certp-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; background: #fff; border-bottom: 1px solid #d6dae2; box-shadow: 0 2px 10px rgba(20, 30, 50, .06); }
.mcqp-certp-back { color: #1c2b4a; font-weight: 600; text-decoration: none; }
.mcqp-certp-back:hover { text-decoration: underline; }
.mcqp-certp-langs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: #eef0f4; }
.mcqp-certp-langs a { padding: 6px 10px; border-radius: 8px; color: #55607a; font-size: .875rem; font-weight: 600; text-decoration: none; }
.mcqp-certp-langs a:hover { color: #1c2b4a; }
.mcqp-certp-langs a[aria-current] { background: #fff; color: #1c2b4a; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.mcqp-certp-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.mcqp-certp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border: 1.5px solid #1c2b4a; border-radius: 10px; background: #1c2b4a; color: #fff; font: inherit; font-size: .9375rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.mcqp-certp-btn:hover { background: #2a3d63; border-color: #2a3d63; }
.mcqp-certp-btn--ghost { background: #fff; color: #1c2b4a; }
.mcqp-certp-btn--ghost:hover { background: #f3f4f7; color: #1c2b4a; }
.mcqp-certp-btn:disabled { opacity: .65; cursor: progress; }
.mcqp-certp a:focus-visible, .mcqp-certp-btn:focus-visible { outline: 3px solid #a97c26; outline-offset: 2px; }
.mcqp-certp-sheet { display: block; max-width: 1123px; margin: 28px auto 12px; padding: 0 16px; }
.mcqp-certp-sheet svg { display: block; width: 100%; height: auto; box-shadow: 0 18px 50px rgba(20, 30, 50, .22); }
.mcqp-certp-tip { max-width: 1123px; margin: 0 auto 32px; padding: 0 16px; color: #55607a; font-size: .875rem; text-align: center; }
.mcqp-certp-empty { max-width: 560px; margin: 60px auto; padding: 24px; border-radius: 14px; background: #fff; text-align: center; }
@media (max-width: 640px) {
	.mcqp-certp-bar { padding: 10px 12px; }
	.mcqp-certp-acts { margin-left: 0; width: 100%; }
	.mcqp-certp-btn { flex: 1 1 auto; }
	.mcqp-certp-sheet { margin-top: 16px; padding: 0 8px; }
}
@page { size: A4 landscape; margin: 0; }
@media print {
	html, body.mcqp-certp { width: 297mm; height: 210mm; margin: 0; overflow: hidden; background: #fff; }
	.mcqp-certp-bar, .mcqp-certp-tip { display: none !important; }
	.mcqp-certp-sheet { max-width: none; margin: 0; padding: 0; }
	.mcqp-certp-sheet svg { width: 297mm; height: 209.6mm; box-shadow: none; }
	.mcqp-certp * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- strona główna: blok „Certyfikat ukończenia kursu” (motyw: .spotlight--certs) ---------- */
.spotlight--certs { background: radial-gradient(120% 140% at 0% 100%, rgba(201, 154, 64, .16) 0%, var(--mcq-card, #2a2d33) 58%); }
.spotlight--certs .spotlight-media { min-width: 0; }
.spotlight--certs .spotlight-kicker .ico { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e6c67f, #a97c26); color: #fff; }
.spotlight--certs .spotlight-kicker .ico svg { width: 22px; height: 22px; }
.mcqp-certh { position: relative; padding: 14px 10px 26px; perspective: 1400px; }
.mcqp-certh-paper { position: relative; border-radius: 4px; overflow: hidden; transform: rotate(-1.6deg); box-shadow: 0 22px 48px rgba(0, 0, 0, .42), 0 2px 6px rgba(0, 0, 0, .25); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
html[data-theme="light"] .mcqp-certh-paper { box-shadow: 0 18px 40px rgba(80, 60, 20, .22), 0 2px 6px rgba(80, 60, 20, .14); }
.mcqp-certh:hover .mcqp-certh-paper { transform: rotate(0) translateY(-3px); }
.mcqp-certh-paper svg { display: block; width: 100%; height: auto; }
.mcqp-certh-shine { position: absolute; inset: -20% -60%; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 58%); transform: translateX(-70%); animation: mcqp-certh-shine 7s ease-in-out 1.2s infinite; pointer-events: none; mix-blend-mode: soft-light; }
.mcqp-certh .mcqp-cert-ring { transform-box: fill-box; transform-origin: center; animation: mcqp-certh-ring 40s linear infinite; }
.mcqp-certh-badge { position: absolute; right: 2px; bottom: 6px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; color: #1c2b4a; font-size: .875rem; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); animation: mcqp-certh-pop .6s cubic-bezier(.2, .9, .3, 1.4) .5s both; }
.mcqp-certh-badge .mcqp-cert-i { width: 20px; height: 20px; color: #0a9d4e; }
@keyframes mcqp-certh-shine { 0%, 62% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
@keyframes mcqp-certh-ring { to { transform: rotate(360deg); } }
@keyframes mcqp-certh-pop { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.mcqp-certh-paper { transition: none; }
	.mcqp-certh-shine { display: none; }
	.mcqp-certh .mcqp-cert-ring, .mcqp-certh-badge { animation: none; }
}
