/* Shared artwork dialog behavior for the light and dark galleries. */
html, body, body * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html:has(.ng-shop-modal[open]),
body:has(.ng-shop-modal[open]) {
  overflow: hidden;
}

.ng-shop-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--modal-card);
}

.ng-modal-copy {
  min-width: 0;
}

.ng-artwork-details dd {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 860px) {
  .ng-shop-modal {
    inset: auto 0 0;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
  }

  .ng-shop-modal[open] {
    animation: ng-sheet-enter 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .ng-shop-modal-card {
    border-radius: 24px 24px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }

  .ng-modal-image-wrap {
    min-height: 0;
    height: clamp(180px, 32dvh, 320px);
  }

  .ng-modal-image-wrap img {
    max-height: 100%;
  }

  @keyframes ng-sheet-enter {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .ng-shop-modal[open] { animation: none; }
}

@media (max-width: 860px) {
  .ng-category-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .ng-category-nav .ng-nav-btn {
    width: 100%;
    min-width: 0;
    padding: 12px 3px;
    font-size: clamp(9px, 2.6vw, 12px);
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-align: center;
  }
}
