/* Progressive enhancement for the Chosei TOP dining and facility photos. */
body:not(.proto-page) .chosei-facility-page .chosei-gallery-card {
  cursor: default;
}

body:not(.proto-page) .chosei-facility-page .chosei-gallery-photo-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--paper);
  cursor: zoom-in;
  display: block;
  font: inherit;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: inherit;
  width: 100%;
}

body:not(.proto-page) .chosei-facility-page .chosei-gallery-photo-button:focus-visible,
body:not(.proto-page) .chosei-facility-page .chosei-gallery-content-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
  position: relative;
  z-index: 1;
}

body:not(.proto-page) .chosei-facility-page .chosei-gallery-content-link {
  color: inherit;
  min-width: 0;
  text-decoration: none;
}

body:not(.proto-page) .chosei-facility-page .chosei-gallery-expand-label {
  align-items: center;
  background: rgb(47 47 47 / 72%);
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 6px;
  bottom: 10px;
  color: var(--paper);
  display: inline-flex;
  font-family: var(--font-ja);
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
  line-height: 18px;
  padding: 4px 8px;
  pointer-events: none;
  position: absolute;
  right: 10px;
}

body:not(.proto-page) .chosei-facility-page .chosei-gallery-expand-label .chosei-gallery-icon {
  height: 15px;
  width: 15px;
}

body:not(.proto-page) .chosei-facility-page .food-decision-feature > .chosei-gallery-photo-button > figure,
body:not(.proto-page) .chosei-facility-page .facility-information-card > .chosei-gallery-photo-button > figure {
  margin: 0;
  width: 100%;
}

body:not(.proto-page) .chosei-facility-page .food-decision-feature > .chosei-gallery-photo-button img,
body:not(.proto-page) .chosei-facility-page .facility-information-card > .chosei-gallery-photo-button img {
  display: block;
  height: auto;
}

body:not(.proto-page) .chosei-facility-page .food-decision-feature > .chosei-gallery-content-link {
  display: block;
}

body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-photo-button {
  align-self: center;
  aspect-ratio: 1;
  border-radius: var(--radius-media);
  grid-column: 1;
  width: 96px;
}

body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-photo-button > img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-content-link {
  display: block;
  grid-column: 2;
}

body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-content-link > div {
  min-width: 0;
}

body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-content-link > .ic {
  display: none;
}

body:not(.proto-page) .chosei-facility-page .facility-information-card > .chosei-gallery-content-link {
  display: block;
  grid-column: 2;
}

body:not(.proto-page) .chosei-facility-page .facility-information-card > .chosei-gallery-photo-button .facility-information-media {
  margin: 0;
  width: 100%;
}

.chosei-gallery-icon {
  display: block;
  fill: none;
  flex: 0 0 auto;
  height: 22px;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

body.is-chosei-gallery-open {
  overscroll-behavior: none;
}

.chosei-gallery-dialog {
  background: var(--paper);
  border: 0;
  color: var(--ink);
  height: 100dvh;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  opacity: 0;
  padding: 0;
  position: fixed;
  transition: opacity 180ms ease-out;
  width: 100%;
}

.chosei-gallery-dialog[open] {
  display: block;
}

.chosei-gallery-dialog.is-open {
  opacity: 1;
}

.chosei-gallery-dialog.is-closing {
  opacity: 0;
}

.chosei-gallery-dialog::backdrop {
  background: rgb(0 0 0 / 78%);
}

.chosei-gallery-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.chosei-gallery-dialog-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  min-height: calc(60px + env(safe-area-inset-top));
  padding: calc(8px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}

.chosei-gallery-dialog-header > div {
  align-items: baseline;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.chosei-gallery-dialog-header strong {
  font-family: var(--font-ja);
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chosei-gallery-counter {
  color: var(--muted);
  flex: 0 0 auto;
  font-family: var(--font-num);
  font-size: 13px;
  line-height: 20px;
}

.chosei-gallery-counter b {
  font-weight: 600;
}

.chosei-gallery-close,
.chosei-gallery-nav {
  align-items: center;
  appearance: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 44px;
}

.chosei-gallery-close {
  border: 0;
  border-radius: var(--radius-action);
  color: var(--ink);
  background: var(--surface-subtle);
}

.chosei-gallery-nav {
  border: 1px solid rgb(252 252 252 / 52%);
  border-radius: 50%;
  color: var(--paper);
}

.chosei-gallery-close:focus-visible,
.chosei-gallery-thumbnails button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.chosei-gallery-nav:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.chosei-gallery-nav:disabled {
  cursor: default;
  opacity: 0.28;
}

.chosei-gallery-stage {
  align-items: center;
  background: var(--ink);
  display: grid;
  gap: clamp(10px, 2vw, 24px);
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 0;
  padding: clamp(12px, 2vw, 24px);
  touch-action: pan-y pinch-zoom;
}

.chosei-gallery-stage > figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  margin: 0;
  min-height: 0;
  min-width: 0;
}

.chosei-gallery-image-frame {
  position: relative;
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.chosei-gallery-image-frame img {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.chosei-gallery-image-frame img[hidden] { display: none; }
.chosei-gallery-image-frame .chosei-gallery-outgoing-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.chosei-gallery-status {
  color: var(--paper);
  font: 400 14px/22px var(--font-ja);
  margin: 0;
  padding: 0 20px 12px;
  text-align: center;
}
.chosei-gallery-status:empty { display: none; }

.chosei-gallery-stage figcaption {
  color: rgb(255 255 255 / 76%);
  font-family: var(--font-ja);
  font-size: 14px;
  line-height: 22px;
  min-height: 38px;
  padding-top: 12px;
  text-align: center;
}

.chosei-gallery-thumbnails {
  align-items: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: calc(78px + env(safe-area-inset-bottom));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  scrollbar-width: thin;
}

.chosei-gallery-thumbnails button {
  appearance: none;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-action);
  cursor: pointer;
  flex: 0 0 72px;
  height: 54px;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.chosei-gallery-thumbnails button[aria-current="true"] {
  border-color: var(--ink);
}

.chosei-gallery-thumbnails img {
  border-radius: 4px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 640px) {
  body:not(.proto-page) .chosei-facility-page .food-decision-row > .chosei-gallery-photo-button {
    border-radius: var(--radius-media);
  }

  body:not(.proto-page) .chosei-facility-page .food-decision-row .chosei-gallery-expand-label {
    bottom: 6px;
    font-size: 11px;
    gap: 3px;
    padding: 3px 5px;
    right: 6px;
  }

  body:not(.proto-page) .chosei-facility-page .food-decision-row .chosei-gallery-expand-label .chosei-gallery-icon {
    height: 13px;
    width: 13px;
  }

  .chosei-gallery-stage {
    display: block;
    padding: 0;
    position: relative;
  }

  .chosei-gallery-stage > figure {
    height: 100%;
  }

  .chosei-gallery-image-frame {
    padding: 0;
  }

  .chosei-gallery-stage figcaption {
    min-height: 50px;
    padding: 12px 52px 16px;
    text-align: left;
  }

  .chosei-gallery-nav {
    background: rgb(47 47 47 / 72%);
    position: absolute;
    top: calc(50% - 22px);
    z-index: 1;
  }

  .chosei-gallery-nav.is-prev {
    left: 8px;
  }

  .chosei-gallery-nav.is-next {
    right: 8px;
  }
}

@media (hover: hover) {
  .chosei-gallery-close:hover {
    background: var(--interaction-hover);
  }

  .chosei-gallery-nav:not(:disabled):hover {
    background: rgb(255 255 255 / 12%);
  }

  .chosei-gallery-thumbnails button:hover {
    border-color: var(--muted);
  }
}

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

  body:not(.proto-page) .chosei-facility-page .chosei-gallery-photo-button img {
    transition: none;
  }
}
