/*
 * Desktop lightbox styles for the performance gallery on the testimonials page.
 *
 * The original site includes a mobile-specific lightbox defined within
 * custom-overrides.v202405.css.  However, no desktop styles exist for the
 * `.gallery-lightbox` element.  As a result, clicking gallery images on
 * desktop displays the lightbox but leaves it invisible.  This file
 * introduces a desktop implementation that mirrors the premium look and feel
 * of the mobile lightbox while optimising for larger viewports.  These
 * styles apply only on screens wider than 768px and do not affect the
 * existing mobile behaviour.
 */

@media (min-width: 769px) {
  /* Container for the lightbox overlay */
  .page-testimonials .gallery-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  /* When the lightbox is active it becomes visible */
  .page-testimonials .gallery-lightbox--visible {
    display: flex;
    opacity: 1;
  }

  /* Dark backdrop behind the panel */
  .page-testimonials .gallery-lightbox__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
  }

  /* Panel containing the image and close control */
  .page-testimonials .gallery-lightbox__panel {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    background: linear-gradient(145deg, rgba(12, 12, 12, 0.98), rgba(18, 18, 18, 0.9));
    border: 1px solid rgba(245, 192, 0, 0.45);
    border-radius: 0.6rem;
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.7);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
  }

  /* Close button styling */
  .page-testimonials .gallery-lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: none;
    background: transparent;
    color: var(--color-light, #fff);
    cursor: pointer;
    transition: color 0.25s ease;
  }
  .page-testimonials .gallery-lightbox__close:hover,
  .page-testimonials .gallery-lightbox__close:focus {
    color: var(--color-gold, #f5c000);
  }

  /* Wrapper around the image */
  .page-testimonials .gallery-lightbox__media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.4rem;
    background: rgba(0, 0, 0, 0.75);
  }

  /* The full-size image itself */
  .page-testimonials .gallery-lightbox__image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
    border-radius: 0.25rem;
  }

  /* Hint text (unused on desktop) */
  .page-testimonials .gallery-lightbox__hint {
    display: none;
  }

  /* When the lightbox is open prevent page scroll */
  body.gallery-lightbox-open {
    overflow: hidden;
  }
}