/* Slide-in menu: search, titled sections, Material Symbols icons (header.php, my-functions/initialize/09_menu.php). */

/* Editorial contact beside the member actions. */
a.hdr__button--press {
  border: 1px solid #d95168;
  background: #fff;
  color: #b7354b;
  white-space: nowrap;
}
.hdr__admin a:focus-visible {
  outline: 2px solid #b7354b;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .hdr__menu {
    width: 40px;
  }
  .hdr__menu--bar,
  .hdr__menu--bar:before,
  .hdr__menu--bar:after {
    width: 28px;
  }
  .hdr__logo {
    width: 68px;
    flex: none;
  }
  .hdr__logo img {
    width: 68px;
    height: auto;
  }
  .hdr__admin {
    gap: 4px;
    padding-right: 4px;
    font-size: 10px;
  }
  .hdr__admin a.hdr__button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 5px 4px;
    line-height: 1.5;
    white-space: nowrap;
  }
  .hdr__admin a.hdr__button br {
    display: none;
  }
}

.menu .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.menu-side {
  padding-bottom: 3rem;
  overscroll-behavior: contain;
}

/* Search */
.menu__search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 1.6rem 0.4rem;
  padding: 0 1.4rem;
  border: 1px solid #eee;
  border-radius: 999px;
  background: #fafafa;
}
.menu__search:focus-within {
  border-color: #d56d6d;
  background: #fff;
}
.menu__search label {
  display: flex;
  color: #999;
}
.menu__search input {
  flex: 1;
  min-width: 0;
  padding: 1rem 0;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  outline: none;
}

/* Section headings */
.menu .menu__heading {
  margin: 0;
  padding: 2rem 1.6rem 0.6rem;
  border: 0;
  text-align: left;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #999;
}

/* Items with an icon */
.menu__icon {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  fill: #d56d6d;
}
.menu .menu__section li.has-icon > a {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.6rem;
  background-image: none;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #333;
}
.menu .menu__section li.has-icon > a:hover {
  background-color: #fff5f5;
}
.menu .menu__section li.current-menu-item > a {
  font-weight: bold;
  color: #d56d6d;
}
.menu .menu__section a:focus-visible,
.menu__search input:focus-visible {
  outline: 2px solid #d56d6d;
  outline-offset: -2px;
}

/* Genres: two columns of tiles */
.menu .menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.2rem 1.6rem 0.4rem;
}
.menu .menu-grid li.has-icon > a {
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background-color: #fff7f7;
  font-size: 1.4rem;
}
.menu .menu-grid li.has-icon > a:hover {
  background-color: #ffefef;
}
.menu .menu-grid .menu__icon {
  width: 2rem;
  height: 2rem;
}

/* The header icon's member menu */
.menu.menu-mypage .menu__section li.has-icon > a {
  padding: 1rem 1.4rem;
  font-size: 1.4rem;
}

/* Backdrops: a click outside closes the menu */
#id-menu:checked ~ .menu__back--side,
#id-menu-mypage:checked ~ .menu__back--mypage {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100; /* over the fixed header (100, earlier in the page), under the menus (101, 102) */
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
#id-menu-mypage:checked ~ .menu__back--mypage {
  background: rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .menu {
    transition: none;
  }
}
