/* =====================================================================
   INOVATIVA — Newsletter pop-up
   ---------------------------------------------------------------------
   Vše s prefixem `nl-` a pod `#inv-nl`, aby nekolidovalo se šablonou Ohio.
   HTML vkládá assets/js/inovativa-newsletter.js. Zobrazí se 2 min od začátku
   návštěvy webu, 1× v rámci okna potlačení.
   ===================================================================== */

#inv-nl {
  position: fixed; inset: 0; z-index: 99995;
  display: none; align-items: center; justify-content: center; padding: 32px;
  font-family: 'Nunito-inv', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #26303f;
  --nl-cl: #2D80C9; --nl-cd: #2A479E; --nl-peri: #7FA6E6; --nl-muted: #6a7585;
}
#inv-nl.nl-open { display: flex; }
#inv-nl *, #inv-nl *::before, #inv-nl *::after { box-sizing: border-box; }

#inv-nl .nl-backdrop { position: absolute; inset: 0; background: rgba(8, 13, 32, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: nl-fade .25s ease; }
@keyframes nl-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- karta ---------------- */
#inv-nl .nl-pop {
  position: relative; width: 440px; max-width: 100%; background: #fff; border-radius: 26px; overflow: hidden;
  box-shadow: 0 40px 90px rgba(6, 10, 26, .5), 0 4px 14px rgba(6, 10, 26, .3);
  animation: nl-pop .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes nl-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---- značkový gradientní header ---- */
#inv-nl .nl-art { position: relative; height: 208px; overflow: hidden; background: linear-gradient(150deg, #2D80C9 0%, #2A479E 70%, #23306f 100%); }
#inv-nl .nl-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1.1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent 80%);
          mask-image: radial-gradient(80% 90% at 70% 20%, #000, transparent 80%);
}
#inv-nl .nl-circle { position: absolute; width: 200px; height: 200px; border-radius: 50%; left: -66px; top: -58px; background: radial-gradient(circle at 40% 38%, #5BA0E8 0%, #2D80C9 55%, rgba(45, 128, 201, 0) 72%); opacity: .9; }
#inv-nl .nl-peri { position: absolute; width: 120px; height: 120px; border-radius: 60% 60% 60% 8%; right: -22px; bottom: -30px; background: var(--nl-peri); transform: rotate(18deg); opacity: .92; }
#inv-nl .nl-ring { position: absolute; width: 120px; height: 120px; border-radius: 50%; right: 64px; top: -46px; border: 2px dashed rgba(255, 255, 255, .35); }
#inv-nl .nl-symwrap { position: absolute; left: 34px; bottom: 26px; }
#inv-nl .nl-symwrap svg { display: block; overflow: visible; }
#inv-nl .nl-bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); }
#inv-nl.nl-open .nl-b1 { animation: nl-grow .55s cubic-bezier(.2, .9, .3, 1.3) .25s forwards; }
#inv-nl.nl-open .nl-b2 { animation: nl-grow .55s cubic-bezier(.2, .9, .3, 1.3) .37s forwards; }
#inv-nl.nl-open .nl-b3 { animation: nl-grow .55s cubic-bezier(.2, .9, .3, 1.3) .49s forwards; }
#inv-nl .nl-dot { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
#inv-nl.nl-open .nl-dot { animation: nl-dotin .5s cubic-bezier(.3, 1.5, .5, 1) .62s forwards; }
@keyframes nl-grow { to { transform: scaleY(1); } }
@keyframes nl-dotin { from { opacity: 0; transform: translateY(-22px) scale(.3); } to { opacity: 1; transform: none; } }
#inv-nl .nl-tagline { position: absolute; right: 24px; top: 22px; font-family: 'Space Grotesk', monospace; font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }

#inv-nl .nl-close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: none; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease; z-index: 3;
}
#inv-nl .nl-close:hover { background: rgba(255, 255, 255, .28); }
#inv-nl .nl-close svg { width: 16px; height: 16px; }

/* ---- tělo ---- */
#inv-nl .nl-body { padding: 26px 30px 28px; }
#inv-nl .nl-body h2 { font-weight: 800; font-size: 27px; line-height: 1.12; letter-spacing: -.015em; color: #26303f; margin-bottom: 9px; }
#inv-nl .nl-grad { background: linear-gradient(120deg, var(--nl-cl), var(--nl-cd)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#inv-nl .nl-sub { font-size: 15px; color: var(--nl-muted); line-height: 1.55; margin-bottom: 20px; }

#inv-nl .nl-field { display: flex; gap: 8px; background: #f1f4fa; border: 1.5px solid transparent; border-radius: 14px; padding: 6px; transition: border-color .15s ease, background .15s ease; }
#inv-nl .nl-field:focus-within { border-color: var(--nl-cl); background: #fff; }
#inv-nl .nl-field input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-family: inherit; font-size: 16px; color: #26303f; padding: 0 12px; }
#inv-nl .nl-field input::placeholder { color: #9aa6b8; }
#inv-nl .nl-field button { border: none; cursor: pointer; font-family: 'Space Grotesk', monospace; font-weight: 600; font-size: 15px; color: #fff; padding: 13px 24px; border-radius: 10px; background: linear-gradient(120deg, var(--nl-cl), var(--nl-cd)); transition: filter .15s ease, transform .12s ease; white-space: nowrap; }
#inv-nl .nl-field button:hover { filter: brightness(1.07); }
#inv-nl .nl-field button:active { transform: translateY(1px); }

#inv-nl .nl-consent { display: flex; gap: 10px; margin-top: 18px; cursor: pointer; }
#inv-nl .nl-consent input { display: none; }
#inv-nl .nl-consent .nl-box { flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid #c4cdde; border-radius: 6px; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: all .15s ease; }
#inv-nl .nl-consent input:checked + .nl-box { background: var(--nl-cd); border-color: var(--nl-cd); }
#inv-nl .nl-consent .nl-box svg { width: 12px; height: 12px; opacity: 0; transition: opacity .15s ease; }
#inv-nl .nl-consent input:checked + .nl-box svg { opacity: 1; }
#inv-nl .nl-consent .nl-txt { font-size: 12.5px; color: var(--nl-muted); line-height: 1.5; }
#inv-nl .nl-consent.nl-need .nl-box { border-color: #e0594d; animation: nl-shake .3s; }
@keyframes nl-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

#inv-nl .nl-dismiss { display: block; width: 100%; text-align: center; margin-top: 18px; background: none; border: none; cursor: pointer; font-family: 'Space Grotesk', monospace; font-size: 13px; letter-spacing: .02em; color: #9aa6b8; transition: color .15s ease; }
#inv-nl .nl-dismiss:hover { color: var(--nl-cd); }

/* stav po odeslání */
#inv-nl .nl-done { padding: 40px 30px 44px; text-align: center; }
#inv-nl .nl-done .nl-check { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(120deg, var(--nl-cl), var(--nl-cd)); display: flex; align-items: center; justify-content: center; }
#inv-nl .nl-done .nl-check svg { width: 28px; height: 28px; stroke: #fff; }
#inv-nl .nl-done h2 { font-weight: 800; font-size: 24px; margin-bottom: 8px; }
#inv-nl .nl-done p { font-size: 15px; color: var(--nl-muted); }

/* ---------------- tmavý režim ----------------
   Popup je samostatná značková karta. V tmavém režimu (body.dark-scheme) do něj
   prosakují globální dark pravidla šablony a nekonzistentně přebarvují text/pozadí
   (nadpis -> bílá na bílé kartě = neviditelný, gradient "rostou" se ztratí).
   Tady si popup přebarvíme na vlastní tmavou variantu (tmavá karta + světlý text),
   nezávisle na šabloně. `!important` u pozadí/barvy poráží prosakující dark pravidla. */
.dark-scheme #inv-nl { color: #d7e0f0; }
.dark-scheme #inv-nl .nl-pop {
  background: #16203a !important;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .45);
}
.dark-scheme #inv-nl .nl-body h2 { color: #f2f5fb !important; }
.dark-scheme #inv-nl .nl-grad {
  background-image: linear-gradient(120deg, #6aa8f0, #86adf0) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
}
.dark-scheme #inv-nl .nl-sub { color: #9fb0c9 !important; }
.dark-scheme #inv-nl .nl-field { background: rgba(255, 255, 255, .07) !important; }
.dark-scheme #inv-nl .nl-field:focus-within { background: rgba(255, 255, 255, .11) !important; border-color: #6aa8f0 !important; }
.dark-scheme #inv-nl .nl-field input { color: #f2f5fb !important; }
.dark-scheme #inv-nl .nl-field input::placeholder { color: #8494ad !important; }
.dark-scheme #inv-nl .nl-field button { color: #fff !important; background: linear-gradient(120deg, var(--nl-cl), var(--nl-cd)) !important; }
.dark-scheme #inv-nl .nl-consent .nl-box { border-color: #47536e !important; }
.dark-scheme #inv-nl .nl-consent .nl-txt { color: #9fb0c9 !important; }
.dark-scheme #inv-nl .nl-dismiss { color: #8494ad !important; }
.dark-scheme #inv-nl .nl-dismiss:hover { color: #86adf0 !important; }
.dark-scheme #inv-nl .nl-done p { color: #9fb0c9 !important; }

@media (prefers-reduced-motion: reduce) {
  #inv-nl .nl-pop, #inv-nl .nl-bar, #inv-nl .nl-dot { animation: none !important; }
  #inv-nl .nl-bar { transform: scaleY(1); }
  #inv-nl .nl-dot { opacity: 1; }
}
@media (max-width: 480px) {
  #inv-nl .nl-field { flex-direction: column; }
  #inv-nl .nl-field button { width: 100%; }
}
