/* Спільний каркас окремих сторінок (онлайн-запис, важливі повідомлення, юридичні документи, 404).
   Дзеркало inline-CSS шапки/футера/віджетів index.html — правити разом із ним. Розмітку підставляє
   tools/build_shell.js, логіку — assets/shell.js. Tailwind-класи каркаса є в assets/site.css. */

/* iOS: без «гумового» відскоку в кінці сторінки (інакше фіксована нижня панель їде вгору і під нею біла смуга) */
html { scroll-padding-top: 4.5rem; overflow-x: clip; max-width: 100%; overscroll-behavior: none; background-color: #1B4332; }
body { overflow-x: clip; max-width: 100%; width: 100%; position: relative; overscroll-behavior: none; background-color: #fff; }
main { background: #fff; }

/* Шапка */
header.fixed { width: 100vw; max-width: 100vw; overflow: hidden; background: rgba(27, 67, 50, .92) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
header a[aria-label="Екостайл — головна"] img { opacity: 1 !important; filter: saturate(1.28) contrast(1.18) drop-shadow(0 2px 3px rgba(8,28,21,.58)); -webkit-filter: saturate(1.28) contrast(1.18) drop-shadow(0 2px 3px rgba(8,28,21,.58)); }

/* Мобільне меню */
.mobile-menu { transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.mobile-menu.open { transform: translateX(0); }

/* Hero внутрішніх сторінок (180px, центрування) */
.inner-page-hero { margin-top: 5rem; height: 11.25rem; min-height: 11.25rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 0 !important; padding-bottom: 0 !important; }
.inner-page-hero > div { width: 100%; }

/* Доступність */
body.high-contrast::before { content: ''; position: fixed; inset: 0; z-index: 9998; pointer-events: none; backdrop-filter: contrast(1.5); -webkit-backdrop-filter: contrast(1.5); }

/* Футер */
.ftr-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.ftr-col-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); margin-bottom: 12px; }
.ftr-nav { display: flex; flex-direction: column; gap: 6px; }
.ftr-link { font-size: 13px; color: rgba(255,255,255,0.65); text-decoration: none; transition: color .15s; line-height: 1.5; }
.ftr-link:hover { color: #fff; }
.ftr-socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.25rem; }
.ftr-soc-ico { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.25); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.75); transition: all .15s; text-decoration: none; }
.ftr-soc-ico:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); color: #fff; }
.ftr-soc-ico svg { width: 16px; height: 16px; }
.ftr-legal-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: center; padding: 12px 0 4px; }
.ftr-contacts { display: flex; flex-direction: column; gap: 10px; }
.ftr-contact-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.65); text-decoration: none; transition: color .15s; }
.ftr-contact-row:hover { color: #fff; }
.ftr-c-ico { width: 14px; height: 14px; min-width: 14px; margin-top: 1px; flex-shrink: 0; }

/* Чат підтримки + NovaTalks (власна бульбашка SDK схована, відкривається з нашого меню) */
#chat-widget { display: block !important; z-index: 2147483000 !important; pointer-events: none; }
#chat-widget #chat-toggle, #chat-widget #chat-popup { pointer-events: auto; }
#chat-popup { z-index: 2147483001 !important; }
#nova-talks .woot-widget-bubble-color, #nova-talks .woot-widget-bubble, #nova-talks [class*="woot-widget-bubble"] { z-index: 1 !important; }
/* Колонка каналів NovaTalks дублює наше меню чату і зависала після закриття чату — ховаємо (16.09.2026) */
#nova-talks .widget-wrap.vertical, #nova-talks [class*="widget-wrap"][class*="vertical"] { display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
#nova-talks .woot-widget-bubble-color, #nova-talks .woot-widget-bubble, #nova-talks [class*="woot-widget-bubble"] { display: none !important; visibility: hidden !important; pointer-events: none !important; }
body:not(.ntk-chat-active) #nova-talks .woot-widget-holder, body:not(.ntk-chat-active) #nova-talks #nova-talks-iframe, body:not(.ntk-chat-active) #nova-talks iframe { display: none !important; visibility: hidden !important; pointer-events: none !important; }

/* Сенсорні цілі та планшет */
@media (max-width: 1023px) {
  nav a, .mobile-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  footer a { min-height: 44px; display: inline-flex; align-items: center; }
  #a11y-menu-btn { min-height: 44px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  #a11y-widget { z-index: 80; }
  #a11y-panel { position: fixed; left: 1rem; right: auto; bottom: 5.5rem; width: 18rem; }
}

/* Мобільний */
@media (max-width: 767px) {
  body { background: #fff !important; }
  main, footer, nav[aria-label="Мобільна навігація"] { width: 100vw; max-width: 100vw; overflow-x: clip; }
  header.fixed { background: rgba(27, 67, 50, .96) !important; }
  header a[aria-label="Екостайл — головна"] img { filter: saturate(1.38) contrast(1.24) drop-shadow(0 2px 4px rgba(8,28,21,.72)); -webkit-filter: saturate(1.38) contrast(1.24) drop-shadow(0 2px 4px rgba(8,28,21,.72)); }
  .inner-page-hero { margin-top: 4rem; height: 11.25rem; min-height: 11.25rem; }
  /* Плаваючі кнопки ~14% менші */
  #chat-toggle { width: 3rem !important; height: 3rem !important; }
  #chat-toggle svg { width: 1.375rem !important; height: 1.375rem !important; }
  #a11y-btn { width: 3rem !important; height: 3rem !important; }
  #a11y-btn svg { width: 1.375rem !important; height: 1.375rem !important; }
  #chat-popup { bottom: 4.5rem !important; }
  #scroll-top-btn { width: 3rem !important; height: 3rem !important; right: 4.75rem !important; bottom: 5rem !important; }
  #scroll-top-btn svg { width: 1.375rem !important; height: 1.375rem !important; }
  /* Нижня панель */
  nav[aria-label="Мобільна навігація"] { background: #fff !important; }
  nav[aria-label="Мобільна навігація"] { padding-bottom: env(safe-area-inset-bottom, 0px); }
  nav[aria-label="Мобільна навігація"] > div { height: 3.25rem !important; }
  nav[aria-label="Мобільна навігація"] a { gap: 0.1rem !important; align-items: center !important; justify-content: center !important; }
  nav[aria-label="Мобільна навігація"] svg { width: 1.125rem !important; height: 1.125rem !important; }
  nav[aria-label="Мобільна навігація"] span { font-size: 0.58rem !important; line-height: 1 !important; }
  /* Футер */
  footer { background-color: #1B4332 !important; margin-bottom: 0 !important; padding-top: 1.25rem !important; padding-bottom: 4.5rem !important; }
  .ftr-grid { grid-template-columns: 1fr !important; gap: 1rem !important; margin-bottom: 0.75rem !important; }
  .ftr-link { font-size: 0.75rem !important; }
  .ftr-soc-ico { width: 30px !important; height: 30px !important; }
  footer a { min-height: 1.5rem !important; }
  .ftr-nav { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 2px 8px !important; }
  .ftr-contact-row { font-size: 11px !important; gap: 6px !important; }
  .ftr-contacts { gap: 6px !important; }
  .ftr-col-label { font-size: 11px !important; margin-bottom: 8px !important; }
  .ftr-socials { margin-top: 1.25rem !important; }
  .ftr-legal-links { gap: 4px 12px !important; justify-content: center !important; margin-bottom: 0.75rem !important; }
  footer p { margin-bottom: 0 !important; }
  /* Панель доступності над нижньою панеллю */
  #a11y-widget { z-index: 80; }
  #a11y-panel { position: fixed; left: 0.75rem; right: auto; bottom: 4.75rem; width: min(19rem, calc(100vw - 7rem)); }
}
@media (min-width: 1024px) {
  #nova-talks .woot-widget-bubble, #nova-talks [class*="woot-widget-bubble"] { right: 1rem !important; bottom: 1rem !important; }
}

/* ---- Юридичні документи (publichnij-dogovir, personal-data, privacy-policy) ---- */
.legal-wrap { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.doc-info { background: #F0FDF4; border: 1px solid #86EFAC; border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 2.5rem; font-size: 0.875rem; color: #166534; display: flex; gap: 2rem; flex-wrap: wrap; }
.doc-info span { display: flex; align-items: center; gap: 0.4rem; }
.parties-box { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; font-size: 0.9375rem; line-height: 1.75; }
.legal-section { margin-bottom: 2.25rem; }
.legal-section h2 { font-size: 1.0625rem; font-weight: 700; color: #1B4332; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #BBF7D0; }
.legal-section h3 { font-size: 1rem; font-weight: 600; color: #111827; margin-top: 1.25rem; margin-bottom: 0.75rem; }
.legal-section p { font-size: 0.9375rem; line-height: 1.8; margin-bottom: 0.75rem; color: #1F2937; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: #2D6A4F; word-break: break-all; }
.legal-section a:hover { text-decoration: underline; }
.legal-section strong { font-weight: 600; }
.footnote { margin-top: 1.5rem; padding: 0.875rem 1rem; background: #FFF7ED; border-left: 3px solid #F59E0B; border-radius: 0 6px 6px 0; font-size: 0.8125rem; color: #92400E; line-height: 1.6; }
.requisites-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 0.75rem; }
.requisites-table td { padding: 0.5rem 0.75rem; border: 1px solid #E5E7EB; vertical-align: top; line-height: 1.6; }
.requisites-table td:first-child { color: #6B7280; font-weight: 500; background: #F9FAFB; white-space: nowrap; }
.archive-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #E5E7EB; }
.archive-section h3 { font-size: 1rem; font-weight: 600; color: #374151; margin-bottom: 1rem; }
.archive-list { list-style: none; padding: 0; }
.archive-list li { margin-bottom: 0.5rem; }
.archive-list a { color: #2D6A4F; font-size: 0.875rem; text-decoration: none; }
.archive-list a:hover { text-decoration: underline; }
@media (max-width: 768px) { .doc-info { flex-direction: column; gap: 0.5rem; } }
@media (max-width: 480px) { .legal-wrap { padding: 2rem 1rem 3rem; } }

/* Основний текст юридичних сторінок — по ширині з переносами (як на сайті) */
.legal-section p, .parties-box { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
