html.lpm-lock,
body.lpm-lock {
  overflow: hidden !important;
}

.lpm {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lpm.is-active {
  display: flex;
}

.lpm__box {
  position: relative;
  width: min(860px, 94vw);
  max-height: 92vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: 0;
}

.lpm__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.82);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.lpm__close:hover,
.lpm__close:focus {
  background: rgba(40, 40, 46, 0.95);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.lpm__image-wrap {
  flex: 1;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.lpm__image-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 76vh;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  opacity: 1;
  transition: opacity 0.4s ease, transform 0.2s ease;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 16px 48px rgba(0, 0, 0, 0.4);
}

.lpm__image-wrap img.is-linked {
  cursor: pointer;
}

.lpm__image-wrap img.is-linked:hover {
  transform: scale(1.01);
}

.lpm__image-wrap img.is-fading {
  opacity: 0;
}

.lpm__actions {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.lpm__actions:empty {
  margin-top: 0;
}

.lpm__notice {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.lpm__button {
  min-width: 170px;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 26px;
  background: #16256e;
  color: #ffffff;
  font-size: 16px;
  line-height: 46px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.lpm__button:hover,
.lpm__button:focus {
  background: #1d2f8a;
  outline: 2px solid rgba(255, 255, 255, 0.28);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 768px) {
  .lpm {
    padding: 12px;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
  }

  .lpm__box {
    width: 100%;
    max-height: 94vh;
  }

  .lpm__close {
    top: 4px;
    right: 4px;
  }

  .lpm__image-wrap {
    min-height: 240px;
  }

  .lpm__image-wrap img {
    max-height: 72vh;
    border-radius: 8px;
  }

  .lpm__button {
    width: 100%;
  }

  .lpm__actions {
    flex-direction: column;
    margin-top: 14px;
  }
}
