/* MUSIC FM — Profile image lightbox
   Native dialog/top-layer viewer. Calm, compact and isolated from global card/button styles. */

html.mf-image-lightbox-open,
html.mf-image-lightbox-open body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

#mfProfileImageLightbox.mf-image-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  color: #f7fbff !important;
  opacity: 0;
  transform: none !important;
  transition: opacity .48s cubic-bezier(.22,.61,.36,1) !important;
}

#mfProfileImageLightbox.mf-image-lightbox[open] {
  display: block !important;
}

#mfProfileImageLightbox.mf-image-lightbox.is-visible {
  opacity: 1;
}

#mfProfileImageLightbox.mf-image-lightbox::backdrop {
  background: rgba(3, 14, 28, .82) !important;
  backdrop-filter: blur(9px) saturate(.78) !important;
  -webkit-backdrop-filter: blur(9px) saturate(.78) !important;
}

#mfProfileImageLightbox .mf-image-lightbox__stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: clamp(78px, 9vh, 112px) 28px clamp(26px, 4vh, 48px) !important;
  display: grid !important;
  place-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#mfProfileImageLightbox .mf-image-lightbox__figure {
  width: min(640px, 72vw) !important;
  max-width: 640px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  justify-items: center !important;
  gap: 13px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 0;
  transform: translateY(9px) scale(.988) !important;
  transition: opacity .52s .05s ease, transform .68s .05s cubic-bezier(.22,.61,.36,1) !important;
  pointer-events: auto !important;
}

#mfProfileImageLightbox.is-visible .mf-image-lightbox__figure {
  opacity: 1;
  transform: translateY(0) scale(1) !important;
}

#mfProfileImageLightbox .mf-image-lightbox__media {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-height: 56dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#mfProfileImageLightbox .mf-image-lightbox__media img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 56dvh !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 6px !important;
  background: #071523 !important;
  box-shadow: 0 20px 52px rgba(0,0,0,.22) !important;
}

#mfProfileImageLightbox .mf-image-lightbox__caption {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 8px !important;
  color: #f6f9fc !important;
  text-align: center !important;
  direction: rtl !important;
}

#mfProfileImageLightbox .mf-image-lightbox__caption strong {
  color: #f7fbff !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 700 !important;
}

#mfProfileImageLightbox .mf-image-lightbox__caption span {
  color: #8ea8bd !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
}

/* The close control is drawn with CSS lines rather than an icon font, so it cannot disappear. */
#mfProfileImageClose.mf-image-lightbox__close {
  position: fixed !important;
  top: max(24px, calc(env(safe-area-inset-top) + 18px)) !important;
  right: max(24px, calc(env(safe-area-inset-right) + 20px)) !important;
  left: auto !important;
  z-index: 999999 !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  border-radius: 8px !important;
  background: rgba(7, 27, 46, .90) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.18) !important;
  opacity: 0;
  transform: translateY(-5px) !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: opacity .40s .10s ease, transform .54s .10s cubic-bezier(.22,.61,.36,1), background-color .34s ease, border-color .34s ease !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
}

#mfProfileImageLightbox.is-visible #mfProfileImageClose.mf-image-lightbox__close {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

#mfProfileImageClose .mf-image-lightbox__x {
  position: relative !important;
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
}

#mfProfileImageClose .mf-image-lightbox__x::before,
#mfProfileImageClose .mf-image-lightbox__x::after {
  content: "" !important;
  position: absolute !important;
  top: 8px !important;
  left: 0 !important;
  width: 18px !important;
  height: 2px !important;
  border-radius: 2px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

#mfProfileImageClose .mf-image-lightbox__x::before { transform: rotate(45deg) !important; }
#mfProfileImageClose .mf-image-lightbox__x::after  { transform: rotate(-45deg) !important; }

@media (hover:hover) and (pointer:fine) {
  #mfProfileImageClose.mf-image-lightbox__close:hover {
    background: rgba(13, 43, 69, .96) !important;
    border-color: rgba(255,255,255,.34) !important;
    transform: none !important;
  }
}

.member-social-page [data-profile-photo-open] {
  cursor: zoom-in !important;
}

.member-social-page [data-profile-photo-open],
.member-social-page [data-profile-photo-open]:hover,
.member-social-page [data-profile-photo-open]:focus-visible {
  box-shadow: inherit !important;
}

.member-social-page [data-profile-photo-open] img {
  transition: transform .78s cubic-bezier(.22,.61,.36,1) !important;
}

@media (hover:hover) and (pointer:fine) {
  .member-social-page [data-profile-photo-open]:hover img {
    transform: scale(1.018) !important;
  }
}

@media (max-width: 720px) {
  #mfProfileImageLightbox .mf-image-lightbox__stage {
    padding: max(74px, calc(env(safe-area-inset-top) + 64px)) 14px max(24px, calc(env(safe-area-inset-bottom) + 16px)) !important;
  }

  #mfProfileImageLightbox .mf-image-lightbox__figure {
    width: min(90vw, 520px) !important;
    max-width: 90vw !important;
    gap: 11px !important;
  }

  #mfProfileImageLightbox .mf-image-lightbox__media,
  #mfProfileImageLightbox .mf-image-lightbox__media img {
    max-height: 55dvh !important;
  }

  #mfProfileImageClose.mf-image-lightbox__close {
    top: max(15px, calc(env(safe-area-inset-top) + 10px)) !important;
    right: max(15px, calc(env(safe-area-inset-right) + 12px)) !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mfProfileImageLightbox.mf-image-lightbox,
  #mfProfileImageLightbox .mf-image-lightbox__figure,
  #mfProfileImageClose.mf-image-lightbox__close,
  .member-social-page [data-profile-photo-open] img {
    transition-duration: .01ms !important;
  }
}
