/* =========================================================
 * ARCHEHIGH Store Diagnosis Sidebar
 * Dark navigation, neon active state, and diagnosis CTA.
 * ========================================================= */

body.ah-template-page .ah-site-shell {
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

body.ah-template-page .ah-site-sidebar {
  top: 16px;
  height: calc(100vh - 32px);
}

body.ah-template-page .ah-sidebar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 30px 16px 20px;
  border: 1px solid var(--ah-graphite-700);
  border-radius: var(--ah-shell-radius);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.025), transparent 38%),
    var(--ah-graphite-900);
  color: var(--ah-paper-white);
  box-shadow: 0 18px 44px rgba(35, 38, 44, 0.16);
}

body.ah-template-page .ah-sidebar-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: auto;
  min-height: 0;
  padding: 0 10px;
  color: var(--ah-paper-white);
  text-decoration: none;
}

body.ah-template-page .ah-sidebar-brand img {
  display: block;
  width: 36px;
  max-width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

body.ah-template-page .ah-sidebar-brand-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body.ah-template-page .ah-sidebar-brand strong {
  color: var(--ah-paper-white);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.055em;
  line-height: 1;
}

body.ah-template-page .ah-sidebar-brand small {
  color: var(--ah-cloud-zink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
}

body.ah-template-page .ah-sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  gap: 7px;
  align-content: start;
  min-height: 0;
  margin-top: 44px;
  padding: 0;
  border: 0;
  overflow-y: auto;
  scrollbar-color: var(--ah-graphite-700) transparent;
}

body.ah-template-page .ah-sidebar-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon label";
  gap: 3px 12px;
  align-items: center;
  min-height: 58px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ah-cloud-zink);
  text-decoration: none;
  transition:
    background 0.2s var(--ah-ease),
    color 0.2s var(--ah-ease);
}

body.ah-template-page .ah-sidebar-nav a::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -2px;
  width: 3px;
  background: transparent;
}

body.ah-template-page .ah-sidebar-nav a:hover,
body.ah-template-page .ah-sidebar-nav a:focus,
body.ah-template-page .ah-sidebar-nav a.is-active {
  background: var(--ah-graphite-700);
  color: var(--ah-paper-white);
}

body.ah-template-page .ah-sidebar-nav a:hover::before,
body.ah-template-page .ah-sidebar-nav a:focus::before,
body.ah-template-page .ah-sidebar-nav a.is-active::before {
  background: var(--ah-neon-sprout);
}

body.ah-template-page .ah-sidebar-nav .material-symbols-outlined {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ah-cloud-zink);
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  transition: color 0.2s var(--ah-ease);
}

body.ah-template-page .ah-sidebar-nav a:hover .material-symbols-outlined,
body.ah-template-page .ah-sidebar-nav a:focus .material-symbols-outlined,
body.ah-template-page .ah-sidebar-nav a.is-active .material-symbols-outlined {
  border: 0;
  background: transparent;
  color: var(--ah-neon-sprout);
}

body.ah-template-page .ah-sidebar-nav strong {
  grid-area: title;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

body.ah-template-page .ah-sidebar-nav small {
  grid-area: label;
  color: var(--ah-cloud-zink);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: color 0.2s var(--ah-ease);
}

body.ah-template-page .ah-sidebar-nav a:hover small,
body.ah-template-page .ah-sidebar-nav a:focus small,
body.ah-template-page .ah-sidebar-nav a.is-active small {
  color: var(--ah-neon-sprout);
}

body.ah-template-page .ah-sidebar-foot {
  display: grid;
  flex: 0 0 auto;
  gap: 13px;
  margin-top: auto;
  padding: 18px 6px 0;
  border-top: 1px solid var(--ah-graphite-700);
}

body.ah-template-page .ah-sidebar-foot p {
  margin: 0;
  color: var(--ah-cloud-zink);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

body.ah-template-page .ah-sidebar-cta,
body.ah-template-page .ah-sidebar-cta:visited,
body.ah-template-page .ah-sidebar-cta:hover,
body.ah-template-page .ah-sidebar-cta:focus,
body.ah-template-page .ah-sidebar-cta:active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--ah-safety-orange);
  color: var(--ah-paper-white);
  text-decoration: none;
  box-shadow: none;
  transition:
    background 0.2s var(--ah-ease),
    transform 0.2s var(--ah-ease);
}

body.ah-template-page .ah-sidebar-cta:hover,
body.ah-template-page .ah-sidebar-cta:focus {
  background: var(--ah-safety-orange);
  outline: 2px solid var(--ah-neon-sprout);
  outline-offset: 2px;
  transform: translateY(-1px);
}

body.ah-template-page .ah-sidebar-cta strong {
  margin: 0;
  color: var(--ah-paper-white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

body.ah-template-page .ah-sidebar-cta .material-symbols-outlined {
  display: block;
  color: var(--ah-paper-white);
  font-size: 20px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  line-height: 1;
}

body.ah-template-page .ah-sidebar-foot > small {
  display: block;
  color: var(--ah-cloud-zink);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.3;
}

body.ah-template-page .ah-sidebar-close,
body.ah-template-page .ah-sidebar-close:hover,
body.ah-template-page .ah-sidebar-close:focus,
body.ah-template-page .ah-sidebar-close:active {
  appearance: none;
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 18px;
  place-items: center;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0;
  padding: 0;
  border-color: var(--ah-graphite-700);
  border-radius: 5px;
  background: var(--ah-graphite-700);
  color: var(--ah-paper-white);
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
}

body.ah-template-page .ah-sidebar-close .material-symbols-outlined {
  display: block;
  color: currentColor;
  font-size: 21px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  line-height: 1;
}

@media (min-width: 761px) {
  body.ah-template-page .ah-site-content {
    min-height: calc(100vh - 32px);
    min-height: calc(100svh - 32px);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body.ah-template-page .ah-wp-main {
    min-height: 0;
  }

  body.ah-template-page .ah-quickbar,
  body.ah-template-page .ah-site-footer {
    border-radius: var(--ah-shell-radius);
  }
}

@media (min-width: 901px) and (max-width: 1040px) {
  body.ah-template-page .ah-site-shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  body.ah-template-page .ah-site-sidebar {
    position: sticky;
    top: 16px;
    height: calc(100vh - 32px);
  }

  body.ah-template-page .ah-sidebar-card {
    height: 100%;
    overflow: hidden;
  }

  body.ah-template-page .ah-sidebar-nav {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  body.ah-template-page .ah-sidebar-card {
    min-height: 560px;
  }

  body.ah-template-page .ah-sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.ah-template-page .ah-site-shell {
    grid-template-columns: 1fr;
    padding: 76px 12px 104px;
  }

  body.ah-template-page .ah-site-sidebar {
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    width: min(320px, calc(100% - 24px));
    height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  body.ah-template-page .ah-sidebar-card {
    height: 100%;
    min-height: 0;
    padding: 26px 16px 18px;
    overflow: hidden;
  }

  body.ah-template-page .ah-sidebar-brand {
    width: calc(100% - 48px);
    min-height: 48px;
    padding-left: 8px;
  }

  body.ah-template-page .ah-sidebar-brand img {
    width: 34px;
    max-width: 34px;
    height: 34px;
  }

  body.ah-template-page .ah-sidebar-brand strong {
    font-size: 18px;
  }

  body.ah-template-page .ah-sidebar-nav {
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    margin-top: 28px;
    overflow-y: auto;
  }

  body.ah-template-page .ah-sidebar-foot {
    margin-top: 16px;
  }
}
