/* chain.in.ua: header menu, language switch, file picker (palette of mockup v8) */
#v8-header { position: relative; }
#v8-header .l-ru { display: none; }
html[lang^="ru"] #v8-header .l-ru { display: inline; }
html[lang^="ru"] #v8-header .l-ua { display: none; }

/* nav: catalog toggle + language */
#v8-header .v8-nav-cat { display: inline-flex !important; align-items: center; gap: 6px; cursor: pointer; }
#v8-header .v8-caret { display: inline-block; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
#v8-header .v8-nav-cat[aria-expanded="true"] { border-bottom-color: #F5C400 !important; }
#v8-header .v8-nav-cat[aria-expanded="true"] .v8-caret { transform: translateY(2px) rotate(-135deg); }
#v8-header .v8-lang { display: flex; align-items: center; gap: 4px; }
#v8-header .v8-lang-nav { margin-left: auto; padding: 8px 0; flex: 0 0 auto; }
#v8-header .v8-lang-btn { all: unset; box-sizing: border-box; cursor: pointer; min-width: 40px; min-height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font: 600 14px/1 Inter, system-ui, sans-serif; color: #565B63; border: 1px solid transparent; }
#v8-header .v8-lang-btn:hover { color: #23262B; border-color: #E2E2DD; }
#v8-header .v8-lang-btn.is-active { color: #23262B; background: #F6F6F3; border-color: #E2E2DD; cursor: default; }
#v8-header .v8-lang-btn:focus-visible { outline: 2px solid #23262B; outline-offset: 2px; }

/* burger (phones only) */
#v8-header .v8-burger { all: unset; box-sizing: border-box; display: none; width: 46px; height: 46px; border: 1.5px solid #23262B; border-radius: 8px; align-items: center; justify-content: center; color: #23262B; cursor: pointer; background: #fff; }
#v8-header .v8-burger[aria-expanded="true"] { background: #F5C400; border-color: #F5C400; }
#v8-header .v8-burger:focus-visible { outline: 2px solid #23262B; outline-offset: 2px; }

/* menu panel */
#v8-header .v8-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: #fff; border-top: 1px solid #E2E2DD; border-bottom: 1px solid #E2E2DD; box-shadow: 0 16px 32px rgba(35, 38, 43, .14); font-family: Inter, system-ui, sans-serif; color: #23262B; }
#v8-header .v8-menu[hidden] { display: none; }
#v8-header .v8-menu-in { max-width: 1280px; margin: 0 auto; padding: 20px clamp(16px, 4cqi, 48px) 24px; box-sizing: border-box; }
#v8-header .v8-menu-h { margin: 0 0 12px; font: 800 18px/1.2 Manrope, Inter, sans-serif; }
#v8-header .v8-menu ul { list-style: none; margin: 0; padding: 0; }
#v8-header .v8-menu-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 24px; }
#v8-header .v8-menu-cats > li { padding: 6px 0; border-bottom: 1px solid #EFEFEA; }
#v8-header .v8-menu-top { display: block; padding: 6px 0; font-weight: 600; font-size: 15px; line-height: 1.35; color: #23262B; text-decoration: none; }
#v8-header .v8-menu-top:hover, #v8-header .v8-menu-cats ul a:hover, #v8-header .v8-menu-links a:hover { text-decoration: underline; color: #000; }
#v8-header .v8-menu-cats ul { padding: 0 0 4px 12px; border-left: 2px solid #F5C400; }
#v8-header .v8-menu-cats ul a { display: block; padding: 4px 0; font-size: 14px; color: #565B63; text-decoration: none; }
#v8-header .v8-menu-links, #v8-header .v8-menu-lang { display: none; }

@media (max-width: 640px) {
  #v8-header .v8-burger { display: inline-flex; }
  #v8-header .hdr-tel { margin-left: auto; }
  #v8-header .v8-lang-nav { display: none; }
  #v8-header .v8-menu { position: absolute; max-height: calc(100vh - 120px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #v8-header .v8-menu-in { padding: 12px 16px 20px; }
  #v8-header .v8-menu-cats { grid-template-columns: 1fr; gap: 0; }
  #v8-header .v8-menu-top { padding: 10px 0; font-size: 16px; }
  #v8-header .v8-menu-cats ul a { padding: 8px 0; font-size: 15px; }
  #v8-header .v8-menu-links { display: block; margin-top: 12px; }
  #v8-header .v8-menu-links a { display: block; padding: 12px 0; border-bottom: 1px solid #EFEFEA; font-weight: 500; font-size: 16px; color: #23262B; text-decoration: none; }
  #v8-header .v8-menu-lang { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: #565B63; }
  html.v8-menu-open .v8-mbar-wrap .mbar { display: none !important; }
}

/* file picker in v8 forms */
.chain-v8 .v8-file-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; padding: 0 !important; margin: -1px !important; }
.chain-v8 .v8-file { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-family: Inter, system-ui, sans-serif; }
.chain-v8 .v8-file-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 8px; background: #fff; color: #23262B; border: 1.5px solid #23262B; font: 600 14px/1 Inter, system-ui, sans-serif; }
.chain-v8 .v8-file-btn:hover { background: #F6F6F3; }
.chain-v8 .v8-file-btn:focus-visible, .chain-v8 .v8-file-clear:focus-visible { outline: 2px solid #F5C400; outline-offset: 2px; }
.chain-v8 .v8-file-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; color: inherit; opacity: .75; }
.chain-v8 .v8-file-name.has-file { opacity: 1; font-weight: 600; }
.chain-v8 .v8-file-clear { all: unset; box-sizing: border-box; cursor: pointer; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font: 700 20px/1 Inter, system-ui, sans-serif; color: inherit; border: 1px solid currentColor; opacity: .8; }
.chain-v8 .v8-file-clear[hidden] { display: none; }
.chain-v8 .v8-file-clear:hover { opacity: 1; }
.chain-v8 .v8-file-hint { margin-top: 6px; font-size: 13px; line-height: 1.4; opacity: .75; }
.chain-v8 .v8-file-err { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: #FBEAEA; color: #8A1F1F; border: 1px solid #EBC1C1; font-size: 13px; line-height: 1.45; }
.chain-v8 .v8-file-err[hidden] { display: none; }
@media (max-width: 640px) { #v8-header .chain-vb-pair { display: none !important; } }
.chain-v8 .v8-file { flex-wrap: nowrap; } .chain-v8 .v8-file-name { flex: 0 1 auto; }
.chain-v8 .v8-file-btn, .chain-v8 .v8-file-clear { flex: 0 0 auto; white-space: nowrap; }
