/* =========================================================
   movie-gallery-report-modal.css
   ギャラリー報告モーダル（レビュー版と同等のレイアウト＆挙動）
   対象:
     #gallery-report-modal
       .report-modal-backdrop
       .report-modal-content
   ========================================================= */

/* オーバーレイ本体 */
#gallery-report-modal{
  display:none;                 /* JSでfadeIn */
  position:fixed;
  inset:0;
  z-index:12000;
  overscroll-behavior:contain;  /* iOSの連鎖スクロール抑止 */
  background:transparent;       /* 念のためリセット */
}

/* 半透明の背景（色を強制固定） */
#gallery-report-modal .report-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.5);
  z-index:1;
}

/* モーダルボックス（中央寄せ） */
#gallery-report-modal .report-modal-content{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(520px, calc(100% - 32px));   /* 左右16pxの余白 */
  max-height:calc(100vh - 32px);         /* 上下16pxの余白 */
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;
  scrollbar-gutter:stable;
  touch-action: auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
  z-index:2;

  /* フォールバック（非対応環境） */
  padding:20px 24px;

  /* セーフエリア対応 */
  padding-top:    calc(20px + env(safe-area-inset-top));
  padding-right:  calc(24px + env(safe-area-inset-right));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left:   calc(24px + env(safe-area-inset-left));
}

/* svh / dvh 対応 */
@supports (height: 100svh) {
  #gallery-report-modal .report-modal-content{
    max-height:calc(100svh - 32px);
  }
}
@supports (height: 100dvh) {
  #gallery-report-modal .report-modal-content{
    max-height:calc(100dvh - 32px);
  }
}

/* 見出し */
#gallery-report-modal h3{
  margin:0 0 12px;
  font-size:18px;
  line-height:1.4;
}

/* 閉じるボタン */
#gallery-report-modal .report-modal-close{
  position:absolute;
  top:8px;
  right:10px;
  border:none;
  background:transparent;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  color:#555;
}
#gallery-report-modal .report-modal-close:hover{ opacity:.8; }

/* ラベル */
#gallery-report-form label{
  display:block;
  font-weight:600;
  margin:10px 0 6px;
}

/* ラジオ（idゆらぎに備え両方拾う） */
#gallery-report-form #gallery-report-category-options label,
#gallery-report-form #report-category-options label{
  display:block;
  margin:6px 0;
}

/* テキストエリア */
#gallery_report_text{
  width:100%;
  box-sizing:border-box;
  padding:8px 10px;
  border:1px solid #ddd;
  border-radius:6px;
  font-size:14px;
}

/* 送信ボタン */
#gallery-report-submit-btn{
  display:inline-block;
  margin-top:12px;
  padding:8px 16px;
  border:none;
  border-radius:6px;
  background:#333;
  color:#fff;
  font-size:14px;
  cursor:pointer;
}
#gallery-report-submit-btn[disabled]{ opacity:.6; cursor:default; }

/* メッセージ */
.gallery-report-complete{ color:#2e7d32; }
.gallery-report-error{ color:#d32f2f; }

/* 背景スクロールロック（JSで付与） */
body.modal-open{
  overflow:hidden;
  touch-action:none;
}
