/* 公開ページ共通の固定フッターメニュー（T-819）。住戸は専用バーを使う。 */
body:has(.fixed-footer-menu) {
  padding-bottom: calc(var(--fixed-footer-menu-height, 72px) + env(safe-area-inset-bottom));
}

.fixed-footer-menu {
  position: fixed;
  z-index: 39;
  right: 0;
  bottom: 0;
  left: 0;
  color: #e9edf6;
  background: rgba(8, 10, 18, .97);
  border-top: 1px solid rgba(211, 176, 94, .38);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .24);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(16px);
  transition: transform .24s ease, opacity .18s ease;
  will-change: transform;
}

body.fixed-footer-ui--hidden .fixed-footer-menu,
body.fixed-footer-ui--hidden .room-action-bar {
  transform: translateY(calc(100% + env(safe-area-inset-bottom)));
  opacity: 0;
  pointer-events: none;
}

body:has(.compare-tray) .fixed-footer-menu {
  bottom: var(--compare-tray-height, 140px);
}

.fixed-footer-menu__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 720px);
  min-height: 68px;
  margin: 0 auto;
}

.fixed-footer-menu__item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px 7px;
  color: #cbd2df;
  font-size: clamp(.68rem, 2.7vw, .78rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.fixed-footer-menu__item + .fixed-footer-menu__item {
  border-left: 1px solid rgba(255, 255, 255, .07);
}

.fixed-footer-menu__item .ui-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fixed-footer-menu__item span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-footer-menu__item:hover,
.fixed-footer-menu__item:focus-visible,
.fixed-footer-menu__item[aria-current="page"],
.fixed-footer-menu__item--primary {
  color: #f4d58b;
  background: rgba(211, 176, 94, .09);
}

.fixed-footer-menu__item[aria-current="page"]::before,
.fixed-footer-menu__item--primary::before {
  position: absolute;
  top: -1px;
  right: 18%;
  left: 18%;
  height: 2px;
  background: #d3b05e;
  border-radius: 0 0 3px 3px;
  content: "";
}

.fixed-footer-menu__item:focus-visible {
  z-index: 1;
  outline: 2px solid #f4d58b;
  outline-offset: -3px;
}

@media (min-width: 760px) {
  .fixed-footer-menu {
    background: rgba(8, 10, 18, .94);
  }

  .fixed-footer-menu__inner {
    min-height: 64px;
    border-right: 1px solid rgba(255, 255, 255, .07);
    border-left: 1px solid rgba(255, 255, 255, .07);
  }

  .fixed-footer-menu__item {
    min-height: 64px;
    flex-direction: row;
    gap: 8px;
    font-size: .8rem;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .fixed-footer-menu {
    background: #080a12;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fixed-footer-menu,
  .room-action-bar {
    transition: none;
  }
}
