/* AROHA 1.3.8 — keep the logo and navigation controls within the viewport. */

/* WooCommerce's image max-width must not restore the logo's intrinsic width. */
body.aroha-site .custom-logo-link {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
  line-height: 0;
}
body.aroha-site img.custom-logo {
  display: block;
  width: 210px;
  max-width: 100%;
  min-width: 0;
  height: 75px;
  max-height: 75px;
  object-fit: contain;
}

@media (max-width: 680px) {
  body.aroha-site img.custom-logo {
    width: 145px;
    height: 61px;
    max-height: 61px;
  }

  /* Reserve space for the menu and all three mobile actions before the logo. */
  body.aroha-site #site-header > .container.header-inner {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
  }
  body.aroha-site #site-header .brand-wrap {
    width: 100%;
    max-width: 145px;
    min-width: 0;
    margin: 0;
    justify-self: center;
  }
  body.aroha-site #site-header .header-actions {
    flex: none;
    gap: 0;
    min-width: 0;
    justify-self: end;
  }
  body.aroha-site #site-header .mobile-toggle,
  body.aroha-site #site-header .header-actions .icon-button {
    width: 38px;
    height: 44px;
    min-width: 0;
    flex: 0 0 38px;
  }
}

@media (max-width: 360px) {
  body.aroha-site #site-header > .container.header-inner {
    grid-template-columns: 34px minmax(0, 1fr) max-content;
    gap: 6px;
  }
  body.aroha-site #site-header .mobile-toggle,
  body.aroha-site #site-header .header-actions .icon-button {
    width: 34px;
    flex-basis: 34px;
  }
}
