/* The full-screen photo pages: a listing's photos on the tenants site and a project's
   photos on the enterprise site. Both _frame partials link this file, so the grid, the
   lightbox and the share dialog are styled once. */
/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.tenants-photo-page--show .turbo-progress-bar,
.portfolio-photo-page--show .turbo-progress-bar {
  display: none !important;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page {
  display: flex;
  flex-direction: column;
  background: var(--dg-bg);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page--lightbox {
  color: var(--dg-text);
}

/* dg-exception: The tenants lightbox fills the window; the enterprise one sits between the site header and footer. */
.tenants-photo-page .photo-page--lightbox {
  min-height: 100vh;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page--lightbox a {
  color: var(--dg-text);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__header {
  border-bottom: 1px solid var(--dg-border);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--dg-bg);
  position: sticky;
  top: 0;
  z-index: 5;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__back,
.photo-page__icon-btn {
  font-family: var(--dg-font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dg-text);
  background: none;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__back:hover,
.photo-page__icon-btn:hover {
  color: var(--dg-action);
  text-decoration: none;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__container {
  padding: 1rem 1.25rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photos {
  padding-right: 1rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photo {
  width: 100%;
  background: var(--dg-surface);
  cursor: pointer;
  overflow: hidden;
  display: block;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform 0.4s ease;
  display: block;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photo:hover img {
  transform: scale(1.02);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photo--hero {
  margin-bottom: 0.75rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__photo--hero img {
  aspect-ratio: 16/9;
  max-height: 75vh;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__sidebar {
  border-left: 1px solid var(--dg-border);
  padding: 1.5rem 1.25rem;
  background: var(--dg-bg);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__sidebar-inner {
  position: sticky;
  top: 5rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__price {
  font-family: var(--dg-font-serif);
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  line-height: 1.1;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__price-em {
  font-family: var(--dg-font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--dg-text-muted);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__facts {
  font-family: var(--dg-font-sans);
  font-size: 0.95rem;
  color: var(--dg-text-muted);
  margin-bottom: 1rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__facts strong {
  color: var(--dg-text);
  font-weight: 600;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__facts-sep {
  color: var(--dg-text-muted);
  margin: 0 0.15rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__address {
  font-family: var(--dg-font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__address a {
  color: var(--dg-action);
  text-decoration: none;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__address a:hover {
  text-decoration: underline;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
@media (max-width: 991px) {
  .photo-page__photos {
    padding-right: 0;
  }
  .photo-page__sidebar {
    border-left: none;
    border-top: 1px solid var(--dg-border);
    order: -1;
    padding: 1rem 1.25rem;
  }
  .photo-page__sidebar-inner {
    position: static;
  }
}
/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page--lightbox .photo-page__header {
  padding: 0.65rem 1.5rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page--lightbox .photo-page__back,
.photo-page--lightbox .photo-page__icon-btn {
  padding: 0.45rem 0.7rem;
  transition: background 0.15s ease, color 0.15s ease;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page--lightbox .photo-page__back:hover,
.photo-page--lightbox .photo-page__icon-btn:hover {
  background: var(--dg-surface);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 4.5rem;
  overflow: hidden;
  position: relative;
  background: var(--dg-bg);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__image {
  max-width: 100%;
  max-height: calc(100vh - 9.5rem);
  object-fit: contain;
  display: block;
  animation: photo-page__fade-in 0.18s ease-out;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
@keyframes photo-page__fade-in {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}
/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__counter {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--dg-surface);
  color: var(--dg-text);
  font-family: var(--dg-font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid var(--dg-border);
  z-index: 2;
  pointer-events: none;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dg-surface);
  color: var(--dg-text);
  border: 1px solid var(--dg-border);
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  z-index: 3;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav--prev {
  left: 1rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav--next {
  right: 1rem;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav:hover {
  background: var(--dg-tint);
  border-color: var(--dg-border);
  color: var(--dg-text);
  transform: translateY(-50%) scale(1.06);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav:active {
  transform: translateY(-50%) scale(0.96);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__nav:focus-visible {
  outline: 2px solid var(--dg-text);
  outline-offset: 2px;
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
.photo-page__footer {
  text-align: center;
  padding: 0.9rem 1rem 1.1rem;
  font-family: var(--dg-font-sans);
  font-size: 0.85rem;
  color: var(--dg-text-muted);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--dg-border);
  background: var(--dg-bg);
}

/* dg-exception: Photo grid, lightbox and sharing controls have no DG gallery-page composition. */
@media (max-width: 768px) {
  .photo-page--lightbox .photo-page__header {
    padding: 0.5rem 0.85rem;
  }
  .photo-page__lightbox-body {
    padding: 1rem 3.25rem;
  }
  .photo-page__nav {
    width: 2.4rem;
    height: 2.4rem;
  }
  .photo-page__nav--prev {
    left: 0.5rem;
  }
  .photo-page__nav--next {
    right: 0.5rem;
  }
  .photo-page__back,
  .photo-page__icon-btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
  }
  .photo-page__icon-btn span {
    display: none;
  }
}
/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-modal {
  --bs-modal-bg: var(--dg-bg);
  --bs-modal-color: var(--dg-text);
  --bs-modal-border-color: var(--dg-border);
  --bs-modal-border-radius: 0;
  --bs-modal-header-padding: 1.1rem 1.25rem 0.85rem;
  --bs-modal-header-border-color: var(--dg-border);
  --bs-modal-padding: 1rem 1.25rem 1.25rem;
  --bs-modal-title-line-height: 1.25;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-modal .modal-title {
  font-family: var(--dg-font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.012em;
}

/* dg-exception: The share dialog keeps the Bootstrap toast its share controller shows. */
.share-toast {
  --bs-toast-bg: var(--dg-text);
  --bs-toast-color: var(--dg-bg);
  --bs-toast-border-color: transparent;
  --bs-toast-border-radius: 0;
  --bs-toast-padding-x: 1.1rem;
  --bs-toast-padding-y: 0.7rem;
  font-family: var(--dg-font-sans);
  font-size: 0.9rem;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: transparent;
  border: 1px solid var(--dg-border);
  color: var(--dg-text);
  text-align: left;
  cursor: pointer;
  font-family: var(--dg-font-sans);
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option:hover {
  background: var(--dg-surface);
  border-color: var(--dg-text-muted);
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option:active {
  background: var(--dg-tint);
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option:focus-visible {
  outline: 2px solid var(--dg-action);
  outline-offset: 1px;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option__icon {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dg-surface);
  color: var(--dg-action);
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option__label {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.25;
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dg-text);
}

/* dg-exception: The share dialog keeps the Bootstrap modal its share controller opens. */
.share-option__sub {
  font-size: 0.82rem;
  color: var(--dg-text-muted);
}
