/*
 * Shared public navigation shell for Izbooshka.
 * Include on a page together with /assets/ux-shell.js.
 *
 * This sheet deliberately hides the legacy page headers on the pages that
 * opt in to the shell. The new header is a sibling of the hydrated Nuxt tree
 * and is never rendered or patched by Vue.
 */
/* Only the known legacy page headers are hidden. Content-level <header>
 * elements inside cards/sections are intentionally left untouched. */
body > header.izb-legacy-header,
body > header.site-header,
#__nuxt #app > header.header,
#__nuxt > #app > header.header {
  display: none !important;
}

.izb-noscript {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  color: #193a28;
  font: 600 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.izb-noscript a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1d6136;
}

.izb-shell {
  --izb-shell-bg: #f7f5ea;
  --izb-shell-ink: #193a28;
  --izb-shell-green: #267c44;
  --izb-shell-green-text: #1d6136;
  --izb-shell-line: #d5ded1;
  --izb-shell-muted: #516557;

  position: relative;
  z-index: 900;
  display: block;
  box-sizing: border-box;
  padding: 0;
  border-top: 4px solid var(--izb-shell-green);
  border-bottom: 1px solid var(--izb-shell-line);
  background: var(--izb-shell-bg);
  color: var(--izb-shell-ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}

.izb-shell *,
.izb-shell *::before,
.izb-shell *::after {
  box-sizing: border-box;
}

.izb-shell__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1240px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 20px;
}

.izb-shell__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--izb-shell-ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
}

.izb-shell__brand img {
  display: block;
  width: auto;
  height: 34px;
}

.izb-shell__brand:hover {
  color: var(--izb-shell-green-text);
}

.izb-shell__brand:focus-visible,
.izb-shell__link:focus-visible,
.izb-shell__anchor:focus-visible,
.izb-shell__toggle:focus-visible,
.izb-shell__account button:focus-visible {
  outline: 3px solid #0b5d33;
  outline-offset: 3px;
}

.izb-shell__end {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.izb-shell__menu {
  display: none;
}

.izb-shell__nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.izb-shell__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--izb-shell-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.izb-shell__link:hover {
  background: #e8eee2;
  color: var(--izb-shell-green-text);
}

.izb-shell__link[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--izb-shell-green);
  color: var(--izb-shell-green-text);
}

.izb-shell__anchors {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--izb-shell-line);
}

.izb-shell__anchor {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 6px;
  color: var(--izb-shell-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.izb-shell__anchor:hover {
  background: #e8eee2;
  color: var(--izb-shell-green-text);
}

.izb-shell__account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--izb-shell-line);
  font-size: 14px;
  white-space: nowrap;
}

.izb-shell__account:empty {
  display: none;
}

.izb-shell__account button {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #b9c9b9;
  border-radius: 6px;
  background: #fff;
  color: var(--izb-shell-ink);
  font: inherit;
  cursor: pointer;
}

.izb-shell__toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #b9c9b9;
  border-radius: 8px;
  background: #fff;
  color: var(--izb-shell-ink);
  cursor: pointer;
}

.izb-shell__burger {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.izb-shell__burger span,
.izb-shell__burger::before,
.izb-shell__burger::after {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.izb-shell__burger::before {
  top: 0;
}

.izb-shell__burger span {
  top: 6px;
}

.izb-shell__burger::after {
  top: 12px;
}

.izb-shell[data-menu-open="true"] .izb-shell__burger span {
  opacity: 0;
}

.izb-shell[data-menu-open="true"] .izb-shell__burger::before {
  top: 6px;
  transform: rotate(45deg);
}

.izb-shell[data-menu-open="true"] .izb-shell__burger::after {
  top: 6px;
  transform: rotate(-45deg);
}

@media (min-width: 1100px) {
  .izb-shell__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}

@media (max-width: 1099px) {
  .izb-shell__inner {
    min-height: 60px;
    padding: 0 16px;
  }

  .izb-shell__brand img {
    height: 30px;
  }

  .izb-shell__brand {
    font-size: 14px;
  }

  .izb-shell__toggle {
    display: inline-flex;
  }

  .izb-shell__menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 6px 16px 16px;
    border-top: 1px solid var(--izb-shell-line);
    background: var(--izb-shell-bg);
    box-shadow: 0 16px 30px rgb(20 45 30 / 18%);
    overscroll-behavior: contain;
  }

  .izb-shell[data-menu-open="true"] .izb-shell__menu {
    display: block;
  }

  .izb-shell__nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 4px;
  }

  .izb-shell__link {
    width: 100%;
    min-height: 48px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 17px;
  }

  .izb-shell__link[aria-current="page"] {
    background: #e3ebdc;
    box-shadow: none;
  }

  .izb-shell__anchors {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 8px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--izb-shell-line);
    border-left: 0;
  }

  .izb-shell__anchor {
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 15px;
  }

  .izb-shell__account {
    display: flex;
    margin: 10px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--izb-shell-line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .izb-shell * {
    transition: none !important;
  }
}
