/* ---------- Suwak „przed / po” ---------- */
.ba { margin: 0; --pos: 50%; }
.ba-stage { position: relative; aspect-ratio: 1200 / 620; border-radius: 28px; overflow: hidden; background: #75818F; isolation: isolate; box-shadow: 0 24px 60px -28px rgba(22, 32, 43, .45); }
.ba-scene { position: absolute; inset: 0; }
.ba-scene svg { width: 100%; height: 100%; display: block; }
.ba-scene--after { clip-path: inset(0 0 0 var(--pos)); }
.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: #252C36; color: #fff; }
.ba-label--after { right: 1.1rem; background: #FFC43D; color: #16202B; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 4; pointer-events: none; }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(22, 32, 43, .12); }
.ba-knob { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #16202B; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(22, 32, 43, .3), 0 0 0 5px rgba(255, 196, 61, .9); }
.ba:not(.is-touched) .ba-knob { animation: ba-pulse 1.8s ease-in-out infinite; }
.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-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(22, 32, 43, .3), 0 0 0 6px #16202B; }
.ba-caption { display: flex; justify-content: center; margin-top: 1rem; font-size: 1rem; color: #5C6875; 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: 700 / 620; border-radius: 22px; }
	.ba-knob { width: 56px; height: 56px; }
}
/* Animacje w ilustracjach */
.ba-rain { animation: ba-rain 0.9s linear infinite; }
.ba-drops line { animation: ba-drop 1.1s linear infinite; }
.ba-buzz { animation: ba-buzz 1.4s ease-in-out infinite; transform-origin: 496px 346px; transform-box: view-box; }
.ba-rays { animation: ba-spin 28s linear infinite; transform-origin: 860px 150px; transform-box: view-box; }
.ba-skycloud { animation: ba-drift 9s ease-in-out infinite alternate; }
.ba-coin { animation: ba-coin 2.8s ease-in infinite; }
.ba-zzz { animation: ba-zzz 3s ease-in-out infinite; }
.ba-drink { animation: ba-sip 4s ease-in-out infinite; transform-origin: 810px 316px; transform-box: view-box; }
@keyframes ba-rain { from { transform: translate(6px, -19px); } to { transform: translate(0, 0); } }
@keyframes ba-drop { 0% { transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(34px); opacity: 0; } }
@keyframes ba-buzz { 0%, 60%, 100% { transform: rotate(0); } 65% { transform: rotate(-5deg); } 70% { transform: rotate(5deg); } 75% { transform: rotate(-4deg); } 80% { transform: rotate(3deg); } }
@keyframes ba-spin { to { transform: rotate(360deg); } }
@keyframes ba-drift { from { transform: translateX(-10px); } to { transform: translateX(26px); } }
@keyframes ba-coin { 0% { transform: translateY(-34px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateY(18px); opacity: 1; } 80%, 100% { transform: translateY(24px); opacity: 0; } }
@keyframes ba-zzz { 0%, 100% { opacity: .25; transform: translateY(4px); } 50% { opacity: 1; transform: translateY(-4px); } }
@keyframes ba-sip { 0%, 80%, 100% { transform: rotate(0); } 88% { transform: rotate(-7deg); } }

/* ---------- 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(22, 32, 43, .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, #16202B var(--fill), #E6E0D4 var(--fill)); }
.sim input[type=range]::-moz-range-track { height: 12px; border-radius: 999px; background: #E6E0D4; }
.sim input[type=range]::-moz-range-progress { height: 12px; border-radius: 999px; background: #16202B; }
.sim input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -12px; border-radius: 50%; background: #FFC43D; border: 4px solid #16202B; box-shadow: 0 3px 10px rgba(22, 32, 43, .25); }
.sim input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #FFC43D; border: 4px solid #16202B; }
.sim input[type=range]:focus-visible { outline: 3px solid #16202B; outline-offset: 4px; border-radius: 999px; }
.sim-scale { display: flex; justify-content: space-between; font-size: .875rem; color: #5C6875; }
.sim-result { background: #FBF5E6; 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: #16202B; 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: #16202B; 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: #16202B; } .sim-dot--off { background: #1F7A55; }
.sim-text { font-size: 1.0625rem; line-height: 1.55; margin: 0 0 1rem; color: #16202B; font-weight: 600; }
.sim-note { font-size: .875rem; line-height: 1.5; color: #5C6875; 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 #16202B; 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: #16202B; min-height: 3.25rem; border-radius: 999px; }
.cb-input::placeholder { color: #7A8591; font-weight: 500; }
.cb-input:focus { outline: none; }
.cb-row:focus-within { box-shadow: 0 0 0 4px rgba(255, 196, 61, .7); }
.cb-btn { flex: none; border: 0; border-radius: 999px; background: #FFC43D; color: #16202B; 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: #F5B21F; }
.cb-btn:disabled { opacity: .6; cursor: wait; }
.cb-note { font-size: .875rem; color: #5C6875; 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 #16202B; 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: 4 / 3.7; border-radius: 20px; }
	.ba-label { top: .75rem; padding: .45rem .85rem; font-size: .9375rem; }
	.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; }
}
