/* =====================================================================
   ARBOSAFE – plovoucí okno „Poptávka odeslána“ (vzhled: Denis)
   Připojit na konec css/doplnky.css (nebo vlastní <link> s ?v=filemtime).
   Bez JS se nic nemění: zelená .form-msg.ok zůstane ve formuláři.
   ===================================================================== */

/* původní zelený box – když ho JS převede na okno, schová se
   (element ve formuláři zůstává kvůli statistice js/stat.js) */
#poptavka .form-msg.ok.v-okne{display:none}

/* zamknutí stránky pod oknem */
html.okno-zamek,html.okno-zamek body{overflow:hidden}

/* pozadí */
.okno-pozadi{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:1.5rem;
  background:rgba(15,28,43,.58);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  opacity:0;transition:opacity .22s ease}
.okno-pozadi[hidden]{display:none}
.okno-pozadi.je-otevrene{opacity:1}

/* karta */
.okno{position:relative;width:min(480px,100%);max-height:calc(100vh - 3rem);max-height:calc(100dvh - 3rem);overflow:auto;
  background:#fff;color:var(--text,#1b2430);border-radius:var(--radius,14px);border-top:5px solid var(--orange,#f26a1b);
  box-shadow:0 24px 60px rgba(15,28,43,.35);padding:2.2rem 2rem 1.8rem;text-align:center;font-family:'Montserrat',system-ui,sans-serif;line-height:1.55;
  transform:translateY(14px) scale(.98);transition:transform .25s cubic-bezier(.2,.8,.2,1)}
.okno-pozadi.je-otevrene .okno{transform:none}
.okno:focus{outline:none}

/* ikona úspěchu */
.okno-ikona{width:72px;height:72px;margin:0 auto 1rem;border-radius:50%;display:grid;place-items:center;
  background:#e7f6ec;box-shadow:0 0 0 8px #f3fbf5}
.okno-ikona svg{width:38px;height:38px;stroke:#1e7b3c;stroke-width:3.2;fill:none;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:40;stroke-dashoffset:40;animation:okno-fajfka .45s .18s ease-out forwards}
@keyframes okno-fajfka{to{stroke-dashoffset:0}}

.okno h2{font-size:1.35rem;line-height:1.3;font-weight:800;color:var(--navy,#0f1c2b);margin:0 0 .6rem}
.okno-text{font-size:.98rem;color:#3b4652;margin:0 0 .5rem}
.okno-text strong{color:var(--navy,#0f1c2b)}
.okno-lhuta{font-weight:700;color:var(--navy,#0f1c2b);margin:.2rem 0 1.1rem}

/* zvýrazněná poznámka (potvrzení + spam) */
.okno-pozn{display:flex;gap:.7rem;align-items:flex-start;text-align:left;background:#fff3eb;border-left:4px solid var(--orange,#f26a1b);
  border-radius:8px;padding:.85rem 1rem;font-size:.9rem;line-height:1.5;color:#1b2430;margin:0 0 1.4rem}
.okno-pozn .ik{font-size:1.15rem;line-height:1.3;flex:0 0 auto}
.okno-pozn b{overflow-wrap:anywhere;color:var(--navy,#0f1c2b)}
.okno-pozn[hidden]{display:none}

/* tlačítka */
.okno-ok{width:100%;justify-content:center;font-size:1.05rem;padding:.95rem 1.4rem;min-height:52px;font-family:inherit}
.okno-kontakt{margin:.9rem 0 0;font-size:.85rem;color:var(--muted,#5b6673)}
.okno-kontakt a{color:var(--orange-dark,#d9550c);font-weight:700;white-space:nowrap}
.okno-zavrit{position:absolute;top:.6rem;right:.6rem;width:44px;height:44px;border:0;border-radius:50%;background:transparent;
  color:#5b6673;font:400 1.9rem/1 system-ui,sans-serif;cursor:pointer;display:grid;place-items:center;transition:background .15s,color .15s}
.okno-zavrit:hover{background:#f1f3f5;color:var(--navy,#0f1c2b)}

/* viditelný fokus (klávesnice) */
.okno-zavrit:focus-visible,.okno-ok:focus-visible,.okno-kontakt a:focus-visible{outline:3px solid #ffb98a;outline-offset:3px}
.okno-ok:focus-visible{box-shadow:0 0 0 6px rgba(242,106,27,.18)}

/* mobil: spodní panel přes celou šířku */
@media (max-width:600px){
  .okno-pozadi{place-items:end center;padding:0}
  .okno{width:100%;max-height:92vh;max-height:92dvh;border-radius:18px 18px 0 0;border-top-width:4px;
    padding:2rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom,0px));transform:translateY(40px)}
  .okno::before{content:"";position:absolute;top:.55rem;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:#d9dde2}
  .okno-ikona{width:60px;height:60px;box-shadow:0 0 0 6px #f3fbf5}
  .okno-ikona svg{width:32px;height:32px}
  .okno h2{font-size:1.2rem}
  .okno-text{font-size:.95rem}
  .okno-pozn{font-size:.88rem}
}

/* bez animací, když si to uživatel nastavil */
@media (prefers-reduced-motion:reduce){
  .okno-pozadi,.okno{transition:none}
  .okno{transform:none}
  .okno-ikona svg{animation:none;stroke-dashoffset:0}
}
