/*
 * Javo Listings PhotoSwipe customisations
 *
 * @purpose Provide a simple, clean, and modern lightbox experience with Tabler icons and blurred backdrops.
 * @target Frontend PhotoSwipe sessions triggered from Javo listings galleries.
 * @keywords photoswipe, lightbox, design system, blur, tabler icons
 */

.pswp__bg {
  background: rgba(8, 8, 10, 0.78);
  backdrop-filter: blur(22px) saturate(108%);
  transition: opacity 220ms ease, backdrop-filter 220ms ease;
}

.pswp--javo-ready .pswp__bg {
  opacity: 1;
}

.pswp--javo-backdrop-overlay .pswp__bg {
  backdrop-filter: none;
}

.pswp--javo-backdrop-blur .pswp__bg,
.pswp--javo-backdrop-image .pswp__bg {
  backdrop-filter: blur(max(14px, calc(var(--javo-backdrop-blur-strength, 48px) * 0.45))) saturate(108%);
}

.pswp__scroll-wrap {
  position: relative;
}

.pswp__container {
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.pswp--javo-ready .pswp__container {
  overflow: visible;
}


.pswp__container {
  border-radius: 16px;
  transition: border-radius 220ms ease;
}

.pswp__zoom-wrap,
.pswp__content {
  border-radius: inherit;
}

.javo-gallery-lightbox {
  position: relative;
}

.javo-gallery-lightbox .javo-lightbox-backdrop-style-proxy,
.javo-gallery-lightbox .javo-lightbox-backdrop-overlay-proxy {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.pswp__javo-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(var(--javo-backdrop-blur-strength, 48px));
  transform: scale(var(--javo-backdrop-scale, 1.12));
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
  z-index: 1;
}

.pswp__javo-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--javo-backdrop-overlay-background, linear-gradient(0deg, rgba(8, 8, 10, 0.58), rgba(8, 8, 10, 0.34)));
  opacity: var(--javo-backdrop-overlay-opacity, 0.25);
}

.pswp__javo-backdrop.is-visible {
  opacity: 1;
}

.pswp__javo-caption,
.pswp__javoCaption {
  position: absolute;
  left: 50px;
  bottom: 40px;
  display: flex;
  align-items: center;
  pointer-events: auto;
  transition: opacity 200ms ease;
  max-width: min(420px, 28vw);
  z-index: 5;
}

.pswp__javo-caption.is-empty,
.pswp__javoCaption.is-empty {
  opacity: 0;
}

.pswp__javo-caption-content,
.pswp__javoCaption .pswp__javo-caption-content {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(20, 20, 23, 0.82), rgba(34, 34, 39, 0.7));
  border-radius: 9999px;
  padding: 10px 20px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}

.pswp__javo-caption-avatar,
.pswp__javoCaption .pswp__javo-caption-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pswp__javo-caption-avatar img,
.pswp__javoCaption .pswp__javo-caption-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pswp__javo-caption-text,
.pswp__javoCaption .pswp__javo-caption-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
}

.pswp__javo-caption-title,
.pswp__javoCaption .pswp__javo-caption-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pswp__javo-caption-author,
.pswp__javoCaption .pswp__javo-caption-author {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pswp__javo-video-frame {
  position: relative;
  width: min(90vw, 1280px);
  aspect-ratio: 16 / 9;
  background: rgba(10, 10, 12, 0.86);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  margin: 0 auto;
}

.pswp__javo-video-frame-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.46);
  transform: scale(1.08);
  opacity: 0.96;
}

.pswp__javo-video-frame-media {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pswp__javo-video-frame iframe,
.pswp__javo-video-frame video,
.pswp__javo-video-frame img,
.pswp__javo-video-frame a {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pswp__javo-video-frame iframe,
.pswp__javo-video-frame video,
.pswp__javo-video-frame img {
  object-fit: cover;
}

.pswp__javo-video-frame a {
  display: block;
}

.pswp__javo-video-frame a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pswp__javo-video-frame--portrait {
  background: rgba(8, 8, 12, 0.88);
  isolation: isolate;
}

.pswp__javo-video-frame--portrait .pswp__javo-video-frame-media {
  position: relative;
  z-index: 2;
  padding: 0 40px;
}

.pswp__javo-video-frame--portrait .pswp__javo-video-frame-backdrop {
  top: 50%;
  left: 50%;
  width: calc(100% + 160px);
  height: calc(100% + 160px);
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%) scale(1.02);
  object-fit: cover;
  object-position: center center;
  filter: blur(28px) brightness(0.62) saturate(118%);
  opacity: 1;
}

.pswp__javo-video-frame--portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 8, 12, 0.12) 0%, rgba(8, 8, 12, 0) 18%, rgba(8, 8, 12, 0) 82%, rgba(8, 8, 12, 0.12) 100%);
}

@media (max-width: 782px) {
  .pswp__javo-video-frame--portrait .pswp__javo-video-frame-media {
    padding: 0 16px;
  }

  .pswp__javo-video-frame--portrait .pswp__javo-video-frame-backdrop {
    width: calc(100% + 96px);
    height: calc(100% + 96px);
  }
}

.pswp__javo-video-frame--portrait iframe,
.pswp__javo-video-frame--portrait video,
.pswp__javo-video-frame--portrait img,
.pswp__javo-video-frame--portrait a {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
}

.pswp__javo-video-frame--portrait iframe {
  background: #000;
}

.pswp__javo-video-frame--instagram-embed .pswp__javo-video-frame-media {
  overflow: hidden;
}

.pswp__javo-video-frame--portrait.pswp__javo-video-frame--instagram-embed iframe {
  width: auto;
  max-width: min(100%, 560px);
  height: calc(100% + 176px);
  max-height: none;
  margin-top: -88px;
  margin-bottom: -88px;
  aspect-ratio: 9 / 16;
}

.pswp__javo-video-frame--portrait video,
.pswp__javo-video-frame--portrait img,
.pswp__javo-video-frame--portrait a img {
  object-fit: contain;
}

.pswp__javo-video-frame--portrait a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pswp__javo-video-frame--error {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  padding: 24px;
}

.pswp__button,
.pswp__custom-button {
  border: none;
  background: rgba(25, 25, 28, 0.58);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  transition: background 180ms ease, transform 180ms ease, color 180ms ease;
}

.pswp__button .pswp__javo-icon,
.pswp__custom-button .pswp__javo-icon {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pswp__button--comments {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
  gap: 6px;
}

.pswp__javo-comments-count {
  display: inline-flex;
  min-width: 14px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: rgba(244, 244, 245, 0.92);
}

.pswp__button:hover,
.pswp__button:focus-visible,
.pswp__custom-button:hover,
.pswp__custom-button:focus-visible {
  background: rgba(63, 63, 70, 0.92);
  transform: translateY(-1px);
}

.pswp__button--arrow {
  position: absolute;
  top: 50%;
  margin-top: -19px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 22, 25, 0.68);
}

.pswp__button--arrow .pswp__javo-icon {
  font-size: 20px;
}

.pswp__button--arrow.pswp__button--arrow--next {
  right: 24px;
}

.pswp__button--arrow.pswp__button--arrow--prev {
  left: 24px;
}


.pswp__top-bar {
  padding: 20px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: linear-gradient(180deg, rgba(6, 6, 8, 0.62), transparent);
}

.pswp__counter {
  order: 0;
  margin: 0;
  margin-right: auto;
  padding: 4px 14px;
  min-width: 58px;
  border-radius: 999px;
  background: rgba(17, 17, 20, 0.72);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center;
}

.pswp__preloader {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 8px 0 0;
  border-radius: 12px;
  background: rgba(17, 17, 20, 0.72);
}

.pswp--javo-deferred-loading .pswp__preloader {
  display: inline-flex !important;
}

.pswp__img {
  will-change: transform, opacity;
  transition: opacity 220ms ease, transform 220ms ease;
  border-radius: inherit;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.32);
}

.pswp__preloader .pswp__icn {
  opacity: 0.85;
  fill: rgba(255, 255, 255, 0.9);
  animation: pswp-javo-preloader-spin 0.92s linear infinite;
}

.pswp__preloader .pswp__icn-shadow {
  stroke: rgba(0, 0, 0, 0.42);
}

@keyframes pswp-javo-preloader-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pswp__button--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pswp__javo-html-content {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 4;
}

.pswp__item--html .pswp__zoom-wrap,
.pswp__item--html .pswp__content,
.pswp__item--html .pswp__dynamic-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 4;
  overflow: visible;
}

.pswp__item--html .pswp__dynamic-content > * {
  margin: auto;
}

.pswp__javo-thumbstrip {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 72px));
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(20, 20, 24, 0.5);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 3;
}

.pswp__javo-thumbstrip-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pswp__javo-thumbstrip-track::-webkit-scrollbar {
  height: 6px;
}

.pswp__javo-thumbstrip-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
}

.pswp__javo-thumb {
  position: relative;
  border: none;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.pswp__javo-thumb img {
  width: 100%;
  height: 56px;
  object-fit: cover;
  display: block;
}

.pswp__javo-thumb:hover,
.pswp__javo-thumb:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.pswp__javo-thumb.is-active {
  outline: 2px solid rgba(212, 212, 216, 0.92);
  outline-offset: 2px;
}

.pswp__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* comment panel removed for now */

.javo-lightbox-portal {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999999;
}

/* legacy comment overlay styles removed - handled via Tailwind utilities */


/* Layout styles migrated to Tailwind utilities */


/* Header styling handled via Tailwind */

/* Body/list styles moved to Tailwind utilities */

/* Compose, empty state, and retry styles migrated to Tailwind utilities */

.pswp__javo-comments-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.pswp__javo-comments-caption {
  margin: 4px 0 0;
  font-size: 13px;
  color: #475569;
}

.pswp__javo-comments-body {
  flex: 1;
  overflow-y: auto;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.65);
  padding: 16px;
}

.pswp__javo-comments-placeholder {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

.pswp__button--disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
