/* === index2.css — index2専用スタイル === */

/* ===========================
   0. ローディング画面
   =========================== */

body.app-loading .index2-wrapper {
  display: none;
}

/* ===========================
   1. 全体レイアウト
   =========================== */

.index2-body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: #f5f5f5;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
}

.index2-body *, .index2-body *::before, .index2-body *::after {
  box-sizing: border-box;
}

.index2-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ===========================
   2. ヘッダー
   =========================== */

.index2-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  flex-shrink: 0;
}

.index2-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.index2-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.index2-logo {
  margin: 0;
}

.index2-logo img {
  height: 32px;
}

/* ハンバーガーメニュー */
.index2-hamburger-wrap {
  position: relative;
}

.index2-hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #555;
  padding: 4px 8px;
}

.index2-hamburger-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 40px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 8px;
  width: 220px;
  z-index: 200;
}

.index2-hamburger-menu.is-open {
  display: block;
}

.index2-hamburger-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.index2-hamburger-menu a:hover {
  background: #f5f5f5;
}

.index2-hamburger-menu a i {
  color: #888;
  width: 16px;
}

.index2-hamburger-divider {
  height: 1px;
  background: #eee;
  margin: 4px 12px;
}

/* ログアウトボタン */
.index2-logout-btn {
  background: none;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  font-family: "Noto Sans JP", sans-serif;
}

/* ===========================
   3. メインエリア（2カラム）
   =========================== */

.index2-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ===========================
   4. 左ペイン
   =========================== */

.index2-left {
  width: 480px;
  min-width: 480px;
  border-right: 1px solid #e0e0e0;
  background: #fff;
  display: flex;
  flex-direction: column;
}

/* タイムラインエリア */
.index2-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.index2-timeline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #ccc;
  text-align: center;
  gap: 12px;
}

.index2-timeline-empty i {
  font-size: 48px;
}

.index2-timeline-empty p {
  font-size: 14px;
  line-height: 1.6;
}

/* バブル */
.index2-bubble {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  line-height: 1.6;
}

.index2-bubble:hover {
  background: #f0f0f0;
}

.index2-bubble.selected {
  background: #e3f2fd;
}

.index2-bubble.faded {
  opacity: 0.5;
}

.index2-bubble-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #333;
}

.index2-bubble-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.index2-bubble-risk {
  font-size: 14px;
}

/* 入力パネル */
.index2-input-panel {
  border-top: 1px solid #e0e0e0;
  background: #fff;
  padding: 16px;
  flex-shrink: 0;
  max-height: 60%;
  min-height: 350px;
  overflow-y: auto;
}

.index2-input-panel textarea {
  width: 100%;
  height: 120px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: "Noto Sans JP", sans-serif;
}

.index2-input-panel textarea:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 2px rgba(33,150,243,0.1);
}

.index2-input-status {
  margin-top: 8px;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
}

/* オプション（投稿予定日 + ファイル添付 横並び） */
.index2-options-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.index2-option-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.index2-option-label {
  font-size: 13px;
  color: #555;
}

.index2-option-label i {
  margin-right: 4px;
  color: #888;
}

.index2-date-input {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: "Noto Sans JP", sans-serif;
}

/* ファイルアップロード */
.index2-file-upload-area {
  margin-top: 8px;
}

.index2-file-upload-area.hidden {
  display: none;
}

/* チェック設定 */
.index2-check-settings {
  padding: 8px 0 0;
  border-top: 1px solid #f0f0f0;
  margin-top: 12px;
  font-size: 13px;
}

.index2-ai-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.index2-ai-selector .ai-label {
  color: #555;
}

.index2-ai-selector .ai-label i {
  margin-right: 4px;
  color: #888;
}

.index2-ai-selector label {
  color: #555;
  cursor: pointer;
}

.index2-ai-selector input[type="radio"] {
  margin-right: 2px;
}

.index2-check-toggles {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.index2-check-toggles + .index2-check-toggles {
  margin-top: 4px;
}

.index2-check-toggle-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #555;
  cursor: pointer;
  font-size: 12px;
}

.index2-check-toggle-item input[type="checkbox"] {
  accent-color: #2196F3;
}

.index2-check-toggle-item i {
  color: #888;
}

.index2-beta-badge {
  font-size: 10px;
  color: #2196F3;
  margin-left: 2px;
}

/* トグルスイッチ */
.index2-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.index2-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.index2-toggle .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 22px;
  transition: 0.2s;
}

.index2-toggle .slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.index2-toggle input:checked + .slider {
  background: #2196F3;
}

.index2-toggle input:checked + .slider::before {
  transform: translateX(18px);
}

/* アクションボタン（sticky） */
.index2-action-buttons {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px 0 0;
  border-top: 1px solid #e0e0e0;
  z-index: 10;
  flex-shrink: 0;
  margin-top: 12px;
}

.index2-action-buttons-row {
  display: flex;
  gap: 8px;
}

.index2-btn-check {
  flex: 1;
  border: none;
  padding: 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  background-color: #2196F3;
  color: #fff;
  transition: all 0.2s;
  font-family: "Noto Sans JP", sans-serif;
}

.index2-btn-check:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}



.index2-btn-clear {
  flex: 1;
  border: 1px solid #bbdefb;
  padding: 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  background-color: #e3f2fd;
  color: #2196F3;
  transition: all 0.2s;
  font-family: "Noto Sans JP", sans-serif;
}

.index2-btn-clear:hover {
  background-color: #d0e8fc;
}

/* ===========================
   5. 右ペイン
   =========================== */

.index2-right {
  flex: 1;
  overflow-y: auto;
  background: #f5f5f5;
  padding: 20px;
  position: relative;
}

.index2-right .container {
  max-width: 600px;
  margin: 0 auto;
}

/* オンボーディング */
.index2-onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: #888;
}

.index2-onboarding-logo img {
  height: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.index2-onboarding h2 {
  font-size: 18px;
  color: #555;
  margin: 0 0 8px;
}

.index2-onboarding > p {
  font-size: 14px;
  line-height: 1.8;
  max-width: 400px;
  margin: 0 auto 24px;
}

/* 使い方ステップ */
.index2-howto {
  padding: 20px;
  background: #f0f7ff;
  border: 1px solid #d0e7ff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  text-align: left;
  margin-bottom: 16px;
}

.index2-howto-title {
  font-size: 14px;
  font-weight: 600;
  color: #1976D2;
  margin-bottom: 12px;
}

.index2-howto-title i {
  margin-right: 6px;
}

.index2-howto-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.index2-howto-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.index2-howto-step-num {
  background: #2196F3;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* 炎上マーク凡例 */
.index2-risk-legend {
  padding: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.index2-risk-legend-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 16px;
}

.index2-risk-legend-title i {
  color: #2196F3;
  margin-right: 6px;
}

.index2-risk-legend-items {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.index2-risk-legend-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}

.index2-risk-legend-item:last-child {
  margin-bottom: 0;
}

.index2-risk-legend-mark {
  min-width: 80px;
  display: inline-block;
  text-align: right;
  flex-shrink: 0;
}

.index2-risk-legend-mark.safe {
  color: #4CAF50;
  font-weight: bold;
}

.index2-risk-legend-item.high {
  padding: 6px 8px;
  background: #fff3e0;
  border-radius: 6px;
}

.index2-risk-legend-item.high span:last-child {
  color: #e65100;
  font-weight: 500;
}

.index2-risk-legend-item.critical {
  padding: 6px 8px;
  background: #fce4ec;
  border-radius: 6px;
}

.index2-risk-legend-item.critical span:last-child {
  color: #c62828;
  font-weight: 500;
}



/* チェック結果エリア（右ペイン） */
.index2-result-area {
  display: none;
}

/* 2カラムレイアウトでは右ペインに表示されるため見出し不要 */
.index2-result-heading {
  display: none;
}

/* SNS共有 + 承認ボタンエリア（横並びセンタリング） */
.index2-share-approve-area {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
  margin-top: 20px;
}

/* SNS共有ボタン共通（40x40丸ボタン） */
.index2-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.index2-share-btn:hover {
  opacity: 0.85;
}

/* X (Twitter) */
.index2-share-x {
  background: #000;
  color: #fff;
}

/* LINE */
.index2-share-line {
  background: #06C755;
  color: #fff;
}

/* Facebook */
.index2-share-facebook {
  background: #1877F2;
  color: #fff;
}

/* コピー */
.index2-share-copy {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

/* セパレータ（縦線） */
.index2-share-separator {
  width: 1px;
  height: 24px;
  background: #e0e0e0;
}

/* 承認ボタン */
.index2-approve-btn {
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  background-color: #4CAF50;
  color: #fff;
  transition: all 0.2s;
  font-family: "Noto Sans JP", sans-serif;
}

.index2-approve-btn:hover {
  opacity: 0.9;
}

/* ===========================
   6. フッター
   =========================== */

.index2-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 12px 20px;
  text-align: center;
  font-size: 11px;
  color: #6c757d;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  flex-shrink: 0;
}

.index2-footer a {
  color: #6c757d;
  text-decoration: none;
}

.index2-footer a:hover {
  text-decoration: underline;
}

/* ===========================
   7. レスポンシブ（768px以下）
   =========================== */

@media (max-width: 768px) {
  .index2-main {
    flex-direction: column;
    position: relative;
  }

  .index2-left {
    width: 100%;
    min-width: 100%;
    border-right: none;
    flex: 1;
    min-height: 0;
  }

  .index2-right {
    position: fixed;
    top: 56px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 56px - 44px);
    z-index: 100;
    transition: right 0.3s ease;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
  }

  .index2-right.is-open {
    right: 0;
  }

  .index2-right-close-btn {
    display: flex;
  }

  .index2-input-panel {
    min-height: 280px;
  }
}

@media (min-width: 769px) {
  .index2-right-close-btn {
    display: none;
  }
}

/* 右ペイン閉じるボタン（モバイル用） */
.index2-right-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  color: #555;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ===========================
   8. ローディングオーバーレイ
   =========================== */

.index2-loading-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 245, 245, 0.9);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  gap: 16px;
  color: #555;
  font-size: 14px;
}

.index2-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #2196F3;
  border-radius: 50%;
  animation: index2-spin 0.8s linear infinite;
}

@keyframes index2-spin {
  to { transform: rotate(360deg); }
}

/* ===========================
   9. ボタン無効状態
   =========================== */

.index2-btn-check:disabled,

/* ===========================
   10. 承認関連バナー
   =========================== */

/* 差し戻しバナー */
.index2-rejection-banner {
  display: none;
  background: #fff3e0;
  border: 1px solid #ffcc02;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  gap: 12px;
  align-items: flex-start;
}



.index2-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.index2-rejection-banner .index2-banner-icon {
  color: #e65100;
}

.index2-banner-content {
  flex: 1;
  min-width: 0;
}

.index2-banner-title {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
}

.index2-rejection-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 2px;
}

.index2-rejection-reason {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  word-break: break-word;
}

/* 承認済みバナー */
.index2-approved-banner {
  display: none;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  gap: 12px;
  align-items: center;
}



.index2-approved-banner .index2-banner-icon {
  color: #2e7d32;
}

.index2-banner-subtitle {
  font-size: 13px;
  color: #555;
}

/* ===========================
   11. 承認ステータスバッジ（バブル内）
   =========================== */

.index2-bubble-badge {
  display: none;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.index2-bubble-badge.badge-pending {
  background: #e3f2fd;
  color: #1565c0;
}

.index2-bubble-badge.badge-approved {
  background: #e8f5e9;
  color: #2e7d32;
}

.index2-bubble-badge.badge-rejected {
  background: #fff3e0;
  color: #e65100;
}

/* ===========================
   12. 承認ボタン非表示状態
   =========================== */

.index2-approve-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===========================
   13. 現行CSS衝突防止リセット
   =========================== */

/* header.css の header{max-width:600px; margin:auto; display:flow-root} 等を無効化
   （<header>→<div>に変更済みだが、念のため明示的にリセット） */
.index2-header {
  max-width: none;
  float: none;
  position: relative;
}

/* header.css の header h1{float:left} を無効化 */
.index2-header h1 {
  float: none;
}

/* reset.css の background:transparent を上書き */
.index2-header,
.index2-footer {
  background: #fff;
}

/* base.css の main{padding-bottom:180px} がindex2内部に効かないよう */
.index2-body main {
  padding-bottom: 0;
}

/* ===========================
   14. ファイル添付ドロップゾーン（コンパクト化）
   =========================== */

/* style.css のデフォルトサイズを上書き — 入力パネル内に収まるよう縮小 */
.index2-file-upload-area .image-upload-area {
  margin: 8px 0 0;
  padding: 8px;
}

.index2-file-upload-area .image-drop-zone {
  padding: 12px;
}

.index2-file-upload-area .image-drop-zone i {
  font-size: 20px;
  margin-bottom: 4px;
}

.index2-file-upload-area .image-drop-zone p {
  font-size: 12px;
}

/* ローディングアニメーション 右ペイン内表示 */
#index2-loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 20px;
}

#index2-loading-container .loading-animation {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

/* ===========================
   モバイル用メッセージ
   =========================== */

.index2-mobile-message {
  display: none;
}

@media (max-width: 768px) {
  .index2-wrapper {
    display: none !important;
  }

  .index2-footer {
    display: none !important;
  }

  .index2-mobile-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: #f5f5f5;
  }

  .index2-mobile-message-content {
    text-align: center;
    max-width: 360px;
    background: #fff;
    padding: 40px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }

  .index2-mobile-message-content img {
    margin-bottom: 20px;
  }

  .index2-mobile-message-content h2 {
    font-size: 20px;
    color: #333;
    margin: 0 0 12px;
  }

  .index2-mobile-message-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 24px;
  }

  .index2-mobile-link {
    display: inline-block;
    padding: 12px 24px;
    background: #1976D2;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
  }

  .index2-mobile-link:hover {
    background: #1565C0;
  }
}
