/* lightbox.css
   シンプルな拡大表示用のベース
   本格プラグインを後で入れるなら差し替え可
*/

.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 5000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.9);
    justify-content: center;
    align-items: center;
    /* 下部の固定バーにキャプションが隠れないよう余白を確保 */
    padding: 1rem 1rem calc(var(--bottom-bar-height, 70px) + 1.5rem);
  }
  
  .lightbox-overlay.active {
    display: flex;
  }
  
  .lightbox-overlay img {
    max-width: 100%;
    max-height: 76vh;
    border: 1px solid #444;
    border-radius: 4px;
  }

  .lightbox-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }

  .lightbox-caption {
    color: #eee;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
    max-width: 60ch;
  }

  .lightbox-overlay button {
    position: absolute;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease;
  }

  .lightbox-overlay button:hover,
  .lightbox-overlay button:focus-visible {
    background: rgba(0, 0, 0, 0.75);
    outline: none;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
  }

  .lightbox-prev,
  .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .lightbox-prev { left: 0.8rem; }
  .lightbox-next { right: 0.8rem; }

  @media (max-width: 600px) {
    .lightbox-prev,
    .lightbox-next {
      width: 40px;
      height: 40px;
      font-size: 1.6rem;
    }
    .lightbox-prev { left: 0.35rem; }
    .lightbox-next { right: 0.35rem; }
  }
