/* B-Flowers · Bina — animowane kwiaty (loading / done / error / empty)
   Vanilla CSS. Brand: coral #F0607B, plum #7B3FA0, dark-plum #160A12.
   Respektuje prefers-reduced-motion. */

@keyframes bf-loader{0%,10%{transform:translateY(0) scale(1);opacity:1}28%{transform:translateY(-22px) scale(.62) rotate(10deg);opacity:0}48%{transform:translateY(-22px) scale(.62);opacity:0}66%,100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes bf-spin{to{transform:rotate(360deg)}}
@keyframes bf-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.16)}}
@keyframes bf-bloom{0%{transform:translateY(12px) scale(0);opacity:0}60%{transform:translateY(0) scale(1.12);opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes bf-check{to{stroke-dashoffset:0}}
@keyframes bf-wilt{0%{transform:translateY(0) rotate(0) scaleY(1);opacity:1}100%{transform:translateY(11px) rotate(8deg) scaleY(.78);opacity:.35}}
@keyframes bf-wiltcont{0%{transform:rotate(0) translateY(0)}100%{transform:rotate(7deg) translateY(7px)}}
@keyframes bf-breathe{0%,100%{transform:scale(1);opacity:.82}50%{transform:scale(1.05);opacity:1}}
@keyframes bf-pollen{0%{transform:translate(0,0) scale(1);opacity:0}22%{opacity:1}100%{transform:translate(var(--px,0),var(--py,0)) scale(.25);opacity:0}}

/* --- structure --- */
.bf-flower{position:relative;width:180px;height:180px}
.bf-flower.--loader{animation:bf-spin calc(30s * var(--bf-spd,1)) linear infinite}
.bf-flower.--empty{animation:bf-breathe calc(4.2s * var(--bf-spd,1)) ease-in-out infinite}
.bf-flower.--error{animation:bf-wiltcont calc(1.1s * var(--bf-spd,1)) ease-in both}

.bf-petal-arm{position:absolute;bottom:50%;left:50%;width:17px;margin-left:-8.5px;transform-origin:50% 100%}
.bf-petal{position:absolute;top:-4px;left:0;width:17px;height:40px;box-sizing:border-box;
  border:2px solid #7B3FA0;border-radius:52% 52% 50% 50% / 72% 72% 28% 28%;
  background:linear-gradient(180deg,rgba(240,96,123,.22),rgba(123,63,160,.05));transform-origin:50% 100%}
.bf-flower.--empty .bf-petal{border-color:rgba(155,95,192,.55);background:transparent}

.bf-flower.--loader .bf-petal{animation:bf-loader calc(2.6s * var(--bf-spd,1)) ease-in-out infinite}
.bf-flower.--done   .bf-petal{animation:bf-bloom  calc(.9s  * var(--bf-spd,1)) cubic-bezier(.34,1.56,.64,1) both}
.bf-flower.--error  .bf-petal{animation:bf-wilt   calc(1.1s * var(--bf-spd,1)) ease-in both}

.bf-center{position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50%;
  border:2px solid #F0607B;background:radial-gradient(circle at 38% 34%,#F0607B,#C94060)}
.bf-flower.--loader .bf-center{animation:bf-pulse calc(2.6s * var(--bf-spd,1)) ease-in-out infinite}
.bf-flower.--empty .bf-center{border-color:rgba(240,96,123,.6);background:transparent}

.bf-pollen{position:absolute;top:50%;left:50%;width:4px;height:4px;margin:-2px 0 0 -2px;border-radius:50%;background:#F4A6BA;
  animation:bf-pollen calc(2.6s * var(--bf-spd,1)) ease-out infinite}

.bf-check{position:absolute;top:50%;left:50%;width:30px;height:30px;margin:-15px 0 0 -15px;overflow:visible}
.bf-check path{fill:none;stroke:#fff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:40;stroke-dashoffset:40;animation:bf-check calc(.5s * var(--bf-spd,1)) ease .55s both}

@media (prefers-reduced-motion:reduce){
  .bf-flower,.bf-flower *{animation-duration:.001ms !important;animation-iteration-count:1 !important}
}
