/* =====================================================
   ReplyMaker UI Stylesheet
   Phase2.2 統合版（軽量・スマホ最適化）
===================================================== */

/* 全体 */
body {
  background-color: #f9fafb;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

/* =========================================================
   🧩 ボタン共通
========================================================= */
button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* --- ブルー（AI生成 / 共通） --- */
.btn-blue, .btn-generate {
  background-color: #2563eb;
  color: #fff;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
}
.btn-blue:hover, .btn-generate:hover {
  background-color: #1d4ed8;
}
.btn-blue:disabled, .btn-blue.disabled {
  background-color: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.8;
}

/* --- グレー（補助ボタン） --- */
.btn-gray {
  background-color: #e5e7eb;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  border-radius: 4px;
}
.btn-gray:hover {
  background-color: #d1d5db;
}

/* --- グリーン（送信系） --- */
.btn-send-single, .btn-send-all {
  background-color: #10b981;
  color: #fff;
  border: 1px solid #059669;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
}
.btn-send-single:hover, .btn-send-all:hover {
  background-color: #059669;
}
.btn-send-single:disabled, .btn-send-all:disabled {
  background-color: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.8;
}

/* =========================================================
   ツールバー
========================================================= */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

/* =========================================================
   レビューカード
========================================================= */
.review-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
  transition: background-color 0.2s ease;
}
.review-card:hover { background-color: #f8fafc; }

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.review-meta { display: flex; gap: 8px; align-items: center; }
.review-author { font-weight: 600; color: #111827; }
.review-rating { color: #fbbf24; }
.review-comment { color: #374151; margin: 4px 0; }
.review-date { font-size: 12px; color: #6b7280; }

/* =========================================================
   返信欄
========================================================= */
.reply-box { margin-top: 8px; position: relative; }
.reply-label {
  font-size: 13px; color: #6b7280; display: block; margin-bottom: 4px;
}
.reply-text {
  width: 100%; padding: 8px; border-radius: 4px;
  border: 1px solid #d1d5db; font-size: 13px; resize: vertical;
  transition: background-color 0.2s ease; line-height: 1.4;
}
.reply-text.state-unreplied { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.reply-text.state-draft     { background: #ffedd5; color: #92400e; border-color: #fed7aa; }
.reply-text.state-done      { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }

/* =========================================================
   ページャー
========================================================= */
.pager {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; margin-top: 8px;
}
.page-info { color: #6b7280; }


/* =========================================================
   ⚙️ メニューボタン（縦3点ドット版）
========================================================= */
.hamburger-btn {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  z-index: 1000;
}

.hamburger-btn .dots {
  font-size: 24px;
  color: #374151; /* 濃いグレー */
  line-height: 1;
  letter-spacing: 2px; /* ドット間隔を少し広げる */
}

.hamburger-btn:hover {
  background-color: #f3f4f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.hamburger-btn:active {
  background-color: #e5e7eb;
  transform: scale(0.97);
}

/* =========================================================
   スマホ最適化
========================================================= */
@media (max-width: 768px) {
  /* --- レイアウト --- */
  .toolbar {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .toolbar-right {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
  }
  .toolbar-left {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  /* --- ボタン統一 --- */
  .btn-blue,
  .btn-send-single,
  .btn-send-all {
    font-size: 0.85rem !important;
    padding: 6px 10px !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* --- 送信ボタン位置＆余白 --- */
  .reply-text { padding-bottom: 36px !important; }
  .btn-send-single {
    position: absolute; right: 8px; bottom: 6px; z-index: 10;
  }

  /* --- ボタン間隔 --- */
  .reply-box .btn-blue,
  .reply-box .btn-send-single { margin-top: 6px; }
}
/* =========================================================
   🧾 モーダル表示修正版（最前面・中央寄せ）
========================================================= */
.modal {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 2147483647 !important; /* ←最上位 */
}

.modal.show {
  display: flex !important; /* 表示時に確実に出す */
}

.modal-content {
  background: #fff !important;
  padding: 24px 28px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3) !important;
  max-width: 400px !important;
  width: 90% !important;
  z-index: 2147483648 !important;
}