/* Nick Zick — заявка, живий чат і згода на cookies (логіка — js/connect.js) */

/* ===== ЗАЯВКА (у блоці «Контакт», на всю ширину карток) ===== */
.cform { grid-column: 1 / -1; }
.cform [hidden], .nzc [hidden], .cookie[hidden] { display: none !important; }
.cform-head { display: flex; align-items: center; gap: 18px; }
.cform-head .cicon { flex: none; }
.ccard .cform-head h3 { margin-top: 0; }
.ccard .cform-head p { min-height: 0; margin-top: 4px; }
.cform-form { margin-top: 22px; display: grid; gap: 14px; }
.fld { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink); }
.fld input, .fld textarea { width: 100%; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.fld textarea { resize: vertical; min-height: 92px; }
.fld input::placeholder, .fld textarea::placeholder { color: #b0b0b0; }
.fld input:focus, .fld textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10, 10, 10, .08); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cform-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.ccard .cform-foot .btn { margin-top: 0; }
.cform-foot .btn:disabled { opacity: .6; cursor: progress; }
.ccard .cform-status { margin: 0 auto 0 0; min-height: 0; font-size: 13px; color: #c62828; }
.cform-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 0 6px; }
.cform-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; animation: nz-pop .45s var(--ease) both; }
.cform-mark svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ccard .cform-done p { min-height: 0; }
.ccard .cform-done .cform-done-title { margin-top: 16px; font-size: 18px; font-weight: 600; color: var(--ink); }
.ccard .cform-done .btn { margin-top: 18px; }
@keyframes nz-pop { from { transform: scale(.6); opacity: 0; } }

/* ===== ЖИВИЙ ЧАТ ===== */
.site-footer { padding-bottom: 92px; }   /* кнопка чату не закриває посилання підвалу */
.nzc-launch { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 18px;
  border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45);
  transition: transform .25s var(--ease), background .25s; }
.nzc-launch:hover { background: #2a2a2a; transform: translateY(-2px); }
.nzc-launch > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.nzc-launch.ring > svg { animation: nz-ring 5s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes nz-ring { 0%, 14%, 100% { transform: rotate(0); } 2% { transform: rotate(-14deg); } 4% { transform: rotate(12deg); } 6% { transform: rotate(-10deg); } 8% { transform: rotate(8deg); } 10% { transform: rotate(-5deg); } 12% { transform: rotate(3deg); } }
.nzc-badge { position: absolute; top: -4px; left: -4px; width: 20px; height: 20px; }
.nzc-badge i { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #e53935; color: #fff;
  font: 700 11px/1 "Fira Sans Condensed", sans-serif; box-shadow: 0 0 0 2px #fff; }
.nzc-badge::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #e53935; animation: nz-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes nz-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.nzc-panel { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 380px; height: min(560px, calc(100dvh - 40px)); display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .35);
  animation: nz-up .35s var(--ease) both; transform-origin: 100% 100%; }
@keyframes nz-up { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.nzc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--ink); color: #fff; }
.nzc-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.nzc-who { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.nzc-who b { font-size: 15px; font-weight: 600; }
.nzc-who span { font-size: 12px; color: #a8a8a8; }
.nzc-close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .2s; }
.nzc-close:hover { background: rgba(255, 255, 255, .12); }
.nzc-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nzc-head :focus-visible { outline-color: #fff; }
.nzc-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: #fafafa; }
.nzc-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: nz-msg .3s var(--ease) both; }
@keyframes nz-msg { from { opacity: 0; transform: translateY(6px); } }
.nzc-msg.bot { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.nzc-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.nzc-msg a { text-decoration: underline; text-underline-offset: 2px; }
.nzc-typing { display: flex; gap: 4px; padding: 14px 16px; }
.nzc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a9a9a; animation: nz-dot 1s infinite ease-in-out; }
.nzc-typing i:nth-child(2) { animation-delay: .15s; }
.nzc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes nz-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.nzc-card { align-self: flex-start; width: 86%; display: grid; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; animation: nz-msg .3s var(--ease) both; }
.nzc-card .btn { width: 100%; padding: 10px 16px; white-space: normal; text-align: center; }
.nzc-mail { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.nzc-mail a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nzc-copy { width: 32px; height: 32px; flex: none; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color .2s, border-color .2s; }
.nzc-copy:hover { color: var(--ink); border-color: var(--ink); }
.nzc-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nzc-copy .ok, .nzc-copy.done svg:first-child { display: none; }
.nzc-copy.done .ok { display: block; color: var(--ink); }
.nzc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.nzc-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg-muted); border: 1px solid transparent; border-radius: 999px; padding: 10px 16px; outline: none; transition: border-color .2s, background .2s; }
.nzc-form input:focus { border-color: var(--ink); background: #fff; }
.nzc-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s; }
.nzc-form button:hover { background: #2a2a2a; }
.nzc-form button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== ЗГОДА НА COOKIES ===== */
.cookie { position: fixed; left: 20px; bottom: 20px; z-index: 79; width: 360px; padding: 18px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .3); animation: nz-up .35s var(--ease) both; }
.cookie-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.cookie-text { margin-top: 6px; font-size: 13px; line-height: 1.45; color: #555; }
.cookie-short { display: none; }
.cookie-btns { display: flex; gap: 8px; margin-top: 14px; }
.cookie-btns .btn { flex: 1; padding: 9px 16px; }

@media (max-width: 640px) {
  .cform-head { align-items: flex-start; }
  .cform-head .cicon { width: 48px; height: 48px; }
  .cform-foot .btn { width: 100%; }
  .nzc-launch { right: 14px; bottom: 14px; width: 56px; height: 56px; padding: 0; justify-content: center; }
  .nzc-launch > svg { width: 24px; height: 24px; }
  .nzc-launch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nzc-panel { left: 10px; right: 10px; bottom: 10px; width: auto; height: min(78dvh, calc(100dvh - 20px)); }
  .cookie { left: 10px; right: 82px; bottom: 14px; width: auto; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; }
  .cookie-title, .cookie-text { display: none; }
  .cookie-short { display: block; flex: 1; min-width: 0; font-size: 12px; color: #555; }
  .cookie-btns { margin-top: 0; gap: 6px; }
  .cookie-btns .btn { flex: none; padding: 7px 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .nzc-launch.ring > svg, .nzc-badge::before, .nzc-typing i { animation: none; }
  .nzc-panel, .nzc-msg, .nzc-card, .cookie, .cform-mark { animation: none; }
}
