/* ---------- Suwak „przed / po” ---------- */
.ba { margin: 0; --pos: 50%; }
.ba-stage { position: relative; aspect-ratio: 1200 / 620; border-radius: 28px; overflow: hidden; background: #231E52; isolation: isolate; box-shadow: 0 24px 60px -28px rgba(46, 39, 104, .45); }
.ba-scene { position: absolute; inset: 0; }
.ba-scene picture, .ba-scene img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ba-scene img { object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }
/* Płynny suwak: warstwy przesuwane tylko transformacją (karta graficzna), bez przerysowywania */
.ba-scene--before { transform: translateZ(0); }
.ba-scene--after { overflow: hidden; transform: translate3d(var(--pos), 0, 0); will-change: transform; backface-visibility: hidden; }
.ba-inner { position: absolute; inset: 0; transform: translate3d(calc(-1 * var(--pos)), 0, 0); will-change: transform; backface-visibility: hidden; }
.ba-label { position: absolute; top: 1.1rem; z-index: 3; padding: .5rem 1rem; border-radius: 999px; font-weight: 800; font-size: clamp(.875rem, 1.4vw, 1.0625rem); line-height: 1.2; pointer-events: none; transition: opacity .2s; }
.ba-label--before { left: 1.1rem; background: rgba(255, 255, 255, .94); color: #2E2768; box-shadow: 0 4px 14px rgba(18, 15, 51, .25); }
.ba-label--after { right: 1.1rem; background: #1F7A55; color: #fff; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; z-index: 4; pointer-events: none; transform: translate3d(var(--pos), 0, 0); will-change: transform; }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(46, 39, 104, .12); }
.ba-knob { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #2E2768; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(46, 39, 104, .3), 0 0 0 5px rgba(31, 122, 85, .9); }
.ba:not(.is-touched) .ba-knob { animation: ba-pulse 1.8s ease-in-out infinite; }
.ba-stage { touch-action: pan-y; cursor: ew-resize; -webkit-user-select: none; user-select: none; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; touch-action: pan-y; -webkit-appearance: none; appearance: none; background: transparent; }
.ba.is-js .ba-range { pointer-events: none; }
.ba.is-dragging .ba-knob { transform: translate(-50%, -50%) scale(1.06); }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 80px; height: 620px; }
.ba-range::-moz-range-thumb { width: 80px; height: 620px; border: 0; }
.ba-range:focus-visible ~ .ba-handle .ba-knob, .ba-stage:has(.ba-range:focus-visible) .ba-knob { box-shadow: 0 6px 20px rgba(46, 39, 104, .3), 0 0 0 6px #2E2768; }
.ba-caption { display: flex; justify-content: center; margin-top: 1rem; font-size: 1rem; color: #5E5A7E; font-weight: 600; }
.ba-hint::before { content: "↔ "; }
@keyframes ba-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.09); } }
@media (max-width: 781px) {
	.ba-stage { aspect-ratio: 400 / 580; border-radius: 22px; max-width: 460px; margin: 0 auto; }
	.ba-label { top: auto; bottom: .9rem; font-size: .8125rem; padding: .4rem .75rem; }
	.ba-knob { width: 56px; height: 56px; }
}
/* ---------- Symulator planu spłaty ---------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); background: #fff; border-radius: 28px; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: 0 24px 60px -32px rgba(46, 39, 104, .35); align-items: start; }
.sim-inputs { display: flex; flex-direction: column; gap: 2.25rem; }
.sim-field label { display: block; font-weight: 700; font-size: 1.125rem; line-height: 1.3; margin-bottom: .35rem; }
.sim-value { display: block; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; margin-bottom: .75rem; font-variant-numeric: tabular-nums; }
.sim input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; background: transparent; margin: 0; cursor: pointer; --fill: 20%; }
.sim input[type=range]::-webkit-slider-runnable-track { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #2E2768 var(--fill), #E6E3F4 var(--fill)); }
.sim input[type=range]::-moz-range-track { height: 12px; border-radius: 999px; background: #E6E3F4; }
.sim input[type=range]::-moz-range-progress { height: 12px; border-radius: 999px; background: #2E2768; }
.sim input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -12px; border-radius: 50%; background: #1F7A55; border: 4px solid #2E2768; box-shadow: 0 3px 10px rgba(46, 39, 104, .25); }
.sim input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #1F7A55; border: 4px solid #2E2768; }
.sim input[type=range]:focus-visible { outline: 3px solid #2E2768; outline-offset: 4px; border-radius: 999px; }
.sim-scale { display: flex; justify-content: space-between; font-size: .875rem; color: #5E5A7E; }
.sim-result { background: #F3F1FC; border-radius: 20px; padding: clamp(1.25rem, 3vw, 2rem); }
.sim-kicker { margin: 0 0 1rem; font-weight: 700; font-size: 1.0625rem; }
.sim-bar { height: 28px; border-radius: 999px; background: #1F7A55; overflow: hidden; }
.sim-bar-paid { display: block; height: 100%; background: #2E2768; border-radius: 999px 0 0 999px; transition: width .25s ease; min-width: 0; }
.sim-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.1rem 0 1.25rem; font-size: 1rem; color: #33404D; }
.sim-legend strong { display: block; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.03em; line-height: 1.15; color: #2E2768; font-variant-numeric: tabular-nums; }
.sim-legend div:last-child strong { color: #1F7A55; }
.sim-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .45rem; }
.sim-dot--paid { background: #2E2768; } .sim-dot--off { background: #1F7A55; }
.sim-text { font-size: 1.0625rem; line-height: 1.55; margin: 0 0 1rem; color: #2E2768; font-weight: 600; }
.sim-note { font-size: .875rem; line-height: 1.5; color: #5E5A7E; margin: 0; }
@media (max-width: 860px) { .sim { grid-template-columns: 1fr; } }

/* ---------- Prośba o telefon ---------- */
.cb { max-width: 34rem; }
.cb-row { display: flex; gap: .5rem; background: #fff; border: 2px solid #2E2768; border-radius: 999px; padding: .35rem; }
.cb-input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.125rem; font-weight: 600; padding: 0 1.1rem; color: #2E2768; min-height: 3.25rem; border-radius: 999px; }
.cb-input::placeholder { color: #8A86A8; font-weight: 500; }
.cb-input:focus { outline: none; }
.cb-row:focus-within { box-shadow: 0 0 0 4px rgba(31, 122, 85, .7); }
.cb-btn { flex: none; border: 0; border-radius: 999px; background: #1F7A55; color: #fff; font: inherit; font-size: 1.0625rem; font-weight: 800; padding: 0 1.4rem; min-height: 3.25rem; cursor: pointer; white-space: nowrap; }
.cb-btn:hover { background: #17643F; }
.cb-btn:disabled { opacity: .6; cursor: wait; }
.cb-note { font-size: .875rem; color: #5E5A7E; margin: .75rem 0 0 .5rem; line-height: 1.5; }
.cb-msg { margin: .75rem 0 0; font-weight: 700; padding: .9rem 1.2rem; border-radius: 14px; }
.cb-msg.is-ok { background: #E3F3EA; color: #14573C; }
.cb-msg.is-error { background: #FBE9E6; color: #8E2F26; }
@media (max-width: 480px) {
	.cb-row { flex-direction: column; border-radius: 24px; padding: .5rem; }
	.cb-input { text-align: center; }
}

/* ---------- Karty „mit / fakt” (po włączeniu skryptu) ---------- */
.flip-card.is-enhanced { position: relative; cursor: pointer; perspective: 1200px; min-height: 15rem; display: grid; }
.flip-card.is-enhanced > .flip-front, .flip-card.is-enhanced > .flip-back { grid-area: 1 / 1; margin: 0 !important; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .55s cubic-bezier(.2, .7, .2, 1); display: flex; flex-direction: column; align-items: flex-start; }
.flip-card.is-enhanced > .flip-back { transform: rotateY(180deg); }
.flip-card.is-enhanced.is-flipped > .flip-front { transform: rotateY(-180deg); }
.flip-card.is-enhanced.is-flipped > .flip-back { transform: rotateY(0); }
.flip-card.is-enhanced > .flip-front::after { content: "Kliknij i sprawdź →"; margin-top: auto; padding-top: 1.5rem; font-size: .9375rem; font-weight: 700; color: #8E2F26; }
.flip-card.is-enhanced > .flip-back::after { content: "← Wróć"; margin-top: auto; padding-top: 1.25rem; font-size: .9375rem; font-weight: 700; color: #14573C; }
.flip-card.is-enhanced:focus-visible { outline: 3px solid #2E2768; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
	.flip-card.is-enhanced > .flip-front, .flip-card.is-enhanced > .flip-back { transition: none; }
	.ba-rain, .ba-drops line, .ba-buzz, .ba-rays, .ba-skycloud, .ba-coin, .ba-zzz, .ba-drink, .ba-knob { animation: none !important; }
}
.ba.hide-before .ba-label--before, .ba.hide-after .ba-label--after { opacity: 0; }

/* ---------- Telefony (wersja 2.1) ---------- */
@media (max-width: 781px) {
	.ba-stage { aspect-ratio: 400 / 580; border-radius: 22px; }
	.ba-label { top: auto; bottom: .75rem; padding: .4rem .8rem; font-size: .875rem; }
	.ba-label--before { left: .75rem; } .ba-label--after { right: .75rem; }
	.ba-caption { font-size: 1rem; margin-top: .75rem; }
	.sim { padding: 1.25rem; border-radius: 22px; gap: 1.5rem; }
	.sim-inputs { gap: 1.5rem; }
	.sim-field label { font-size: 1.0625rem; }
	.sim-value { font-size: 2rem; margin-bottom: .35rem; }
	.sim input[type=range] { height: 3rem; }
	.sim-scale { font-size: .9375rem; }
	.sim-result { padding: 1.15rem; border-radius: 18px; }
	.sim-legend { grid-template-columns: 1fr; gap: .5rem; }
	.sim-legend > div { display: flex; align-items: baseline; }
	.sim-legend strong { margin-left: auto; padding-left: 1rem; }
	.sim-legend strong { font-size: 1.5rem; white-space: nowrap; }
	.sim-note, .cb-note { font-size: .9375rem; }
	.cb-note { margin-left: 0; }
	.cb-input, .cb-btn { min-height: 3.5rem; font-size: 1.125rem; }
	.flip-card.is-enhanced { min-height: 11.5rem; }
	.flip-card.is-enhanced > .flip-front::after, .flip-card.is-enhanced > .flip-back::after { padding-top: 1rem; font-size: 1rem; }
}
@media (max-width: 480px) { .cb-btn { width: 100%; } }
@media (min-width: 782px) and (max-width: 1023px) {
	.wp-block-columns:has(.cb) { flex-wrap: wrap !important; }
	.wp-block-columns:has(.cb) > .wp-block-column { flex-basis: 100% !important; }
}
.ba-sun { animation: ba-glow 3.5s ease-in-out infinite alternate; transform-origin: 1050px 110px; transform-box: view-box; }
.ba-svg--before .ba-note:first-of-type { animation: ba-shake 3s ease-in-out infinite; transform-origin: 600px 240px; transform-box: view-box; }
@keyframes ba-shake { 0%, 70%, 100% { transform: translateX(0); } 74% { transform: translateX(-4px); } 78% { transform: translateX(4px); } 82% { transform: translateX(-3px); } 86% { transform: translateX(2px); } }
