/* =========================================================
   57 Menu Index
   Menu book index tabs / neon shelf
   Shelf/tag/number/LED are controlled by partial-number-tags.css
========================================================= */

.p-83-menu-index {
  width: 100%;

  --menu-index-red: var(--soho-red, #891d21);
  --menu-index-gold: var(--soho-gold, #c28f4b);
  --menu-index-ink: rgba(20, 18, 16, 0.94);
  --menu-index-paper: rgba(238, 232, 218, 0.92);

  /* 「シングルモルト」を基準に全耳を同幅にする */
  --menu-index-ear-width: 108px;
}

.p-83-menu-index__body {
  padding: 24px 28px 0;
  margin-bottom: calc(-1 * var(--shelf-board-inset));
}

.p-83-menu-index__nav {
  position: relative;

  width: 100%;
  min-width: 0;
}

.p-83-menu-index__ears {
  display: flex;
  align-items: flex-end;
  gap: 5px;

  margin: 0 -28px;
  width: calc(100% + 56px);
  min-width: 0;

  padding: 8px 28px 0;

  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(137, 29, 33, 0.35) transparent;
}

.p-83-menu-index__ears::-webkit-scrollbar {
  height: 4px;
}

.p-83-menu-index__ears::-webkit-scrollbar-thumb {
  background: rgba(137, 29, 33, 0.35);
}

.p-83-menu-index__ear {
  position: relative;

  flex: 0 0 var(--menu-index-ear-width);
  scroll-snap-align: center;

  display: inline-flex;
  align-items: flex-start;
  justify-content: center;

  width: var(--menu-index-ear-width);
  min-width: var(--menu-index-ear-width);
  max-width: var(--menu-index-ear-width);
  min-height: 64px;
  box-sizing: border-box;

  padding: 10px 12px 30px;

  border: 1px solid rgba(137, 29, 33, 0.34);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;

  background:
    linear-gradient(
      180deg,
      rgba(34, 27, 24, 0.95) 0%,
      rgba(17, 15, 14, 0.98) 100%
    );

  color: rgba(238, 232, 218, 0.78);
  text-decoration: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 -2px 8px rgba(49, 11, 13, 0.10);

  transform: translateY(1px);

  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.p-83-menu-index__ear::before {
  content: "";

  position: absolute;
  left: 10px;
  right: 10px;
  top: -1px;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(180, 141, 75, 0.36),
      transparent
    );
}

.p-83-menu-index__ear:hover,
.p-83-menu-index__ear:focus-visible {
  color: #fff;
  border-color: rgba(180, 141, 75, 0.56);

  transform: translateY(0);
}

.p-83-menu-index__ear.is-current {
  color: #fff7e7;

  border-color: rgba(180, 141, 75, 0.92);
  background:
    linear-gradient(
      180deg,
      rgba(112, 23, 28, 0.98) 0%,
      rgba(49, 11, 13, 0.99) 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.16),
    0 -2px 10px rgba(137, 29, 33, 0.36),
    0 -1px 16px rgba(180, 141, 75, 0.18);

  transform: translateY(0);
}

.p-83-menu-index__ear.is-current::before {
  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 246, 214, 0.96),
      rgba(180, 141, 75, 0.96),
      transparent
    );

  box-shadow: 0 0 8px rgba(180, 141, 75, 0.46);
}

.p-83-menu-index__earLabel {
  display: block;

  width: 100%;
  min-width: 0;

  text-align: center;
  white-space: nowrap;

  font-size: 11px;
  line-height: 1;
  font-weight: 600;
}

/* =========================================================
   SP
========================================================= */

@media screen and (max-width: 768px) {
  .p-83-menu-index__body {
    padding: 22px 18px 0;
  }

  .p-83-menu-index__ears {
    gap: 4px;

    margin: 0 -18px;
    width: calc(100% + 36px);
    padding: 8px 18px 0;

    scrollbar-width: none;
  }

  .p-83-menu-index__ears::-webkit-scrollbar {
    display: none;
  }

  .p-83-menu-index__ear {
    min-height: 64px;
    padding: 10px 12px 30px;
  }

  .p-83-menu-index__earLabel {
    font-size: 11px;
  }
}
