/* Reusable Image Modal Component - Trigger & Overlay Styles */

/* --- Trigger Button (Interactive Lightbox Opener) --- */
.pt-img-modal-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-block;
  line-height: 0;

  &:focus-visible {
    outline: 2px solid #0b4c8d;
    outline-offset: 2px;
  }
}

/* --- Static Image Wrapper (Non-Interactive, Lightbox Disabled) --- */
.pt-img-modal-static {
  display: inline-block;
  line-height: 0;
}

/* --- Optional Image Border (ON by default via class) --- */
.pt-img-modal-border img {
  border: 1px solid #666;
}

/* --- Modal Overlay (z-index 9999: above all content layers) --- */
.pt-img-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;

  img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
  }

  .pt-img-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;

    &:hover {
      opacity: 0.8;
    }

    &:focus-visible {
      outline: 2px solid #fff;
      outline-offset: 2px;
    }
  }

  @media (max-width: 768px) {
    padding: 1rem;

    .pt-img-modal-close {
      top: 0.5rem;
      right: 0.5rem;
      font-size: 1.5rem;
    }
  }
}
