.menuItem {
  background: black;
  color: white;
  border: gray solid 1px;
  height: 40px;
  font-size: 18px;
  align-items: center;
  display: flex;
  /* Add */
  align-items: center;
  /* Vertical center */
  padding-left: 10px;
  /* Margin left */
  white-space: nowrap;
  /* No wrap */
}


.TitleH1 {
  color: white;
  font-size: 20px;
  height: 20px;
  line-height: 20px;
  padding-top: 5px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 20px;
  font-weight: bold;
  line-height: 2px;
  color: white;
}

h2 {
  position: relative;
  font-size: 28px;
  font-weight: bold;
  padding: 10px 10px;
  margin-bottom: 10px;
}

h2::after {
  position: absolute;
  content: '';
  left: 0;
  bottom: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(to right, #98A8F8, #BCCEF8);
}

h3 {
  font-size: 24px;
  font-weight: bold;
  padding: 10px 10px;
  margin-bottom: 10px;
  margin-top: 5px;
  background: linear-gradient(to right, #DBE5FB, #EAF0FD);
}

h4 {
  font-size: 20px;
  font-weight: bold;
  padding: 10px 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #F6F0E3;
}

h5 {
  font-size: 20px;
  font-weight: bold;
  padding: 10px 20px;
  margin-bottom: 1em;
  border-bottom: 3px solid #F6F0E3;
}

h6 {
  font-size: 15px;
  font-weight: bold;
  padding: 10px 20px;
  margin-bottom: 1em;
  border-bottom: 3px dotted #F6F0E3;
}

.dropdown-menu {
  width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* ========================================
   メッセージ行・スレッドスタイル (共通)
   ======================================== */
.OuterWrapper {
    margin-bottom: 24px !important;
    background: #ffffff !important;
    border: 1px solid #dadce0 !important; /* スレッド全体の枠線 */
    border-radius: 8px !important;
    overflow: hidden !important;
    /* 上品で薄いモダンなシャドー */
    box-shadow: 0 1px 2px rgba(60,64,67,0.1), 0 1px 3px rgba(60,64,67,0.05) !important;
}

.wrapper {
    background-color: #ffffff !important;
    border: none !important;
    border-top: 1px solid #e8eaed !important; /* 行間の区切り線を強調 */
    cursor: pointer;
    align-items: center !important;
    transition: background 0.1s;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 1行目の上線は、親要素（OuterWrapper）の枠線と重ならないように消す */
.wrapper:first-child {
    border-top: none !important;
}

/* ホバー時の挙動 */
.wrapper:hover {
    background-color: #f8f9fa !important;
}

/* 差出人名（ハンドルネーム）の幅を物理的に予約 */
.sender-name-col {
    flex: 0 0 160px !important; /* スマホで名前をしっかり表示 */
    min-width: 0 !important;
}

@media (min-width: 768px) {
    .sender-name-col {
        flex: 0 0 220px !important; /* PCではさらに広々 */
    }
}

/* 中央：タイトル領域（残りのスペースを埋めて日付を右に飛ばす） */
.title-col {
    flex-grow: 1 !important;
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* 右側：日付領域（右端に固定） */
.date-col {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    text-align: right;
}

/* 差出人名とタイトルの 1 行表示を強制 */
.sender-name, .message-title-link {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* 日付の書式 */
.msg-short-date {
    white-space: nowrap;
    font-size: 0.85rem;
    color: #70757a;
}

.wrapper.active {
    background-color: #f7f9fa !important;
    box-shadow: inset 3px 0 0 #1a73e8, inset 0 1px 2px rgba(60,64,67,.1) !important;
    z-index: 1;
}

.message-title-link {
    color: #444 !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 400 !important;
}

.wrapper:hover .message-title-link {
    text-decoration: underline !important;
}

/* 詳細パネル・アクションボタン */
.detail-panel {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

.detail-header {
    height: 28px !important;
    font-size: 0.75rem;
    color: #5f6368;
}

.msg-action-btn {
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.msg-action-btn:hover {
    background: #e8eaed;
}

.msg-action-btn i {
    font-size: 14px;
}

/* Update toast */
.update-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
  display: none;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    bottom: -100px;
    opacity: 0;
  }

  to {
    bottom: 80px;
    opacity: 1;
  }
}

.update-toast-content {
  background: white;
  border: 2px solid #007bff;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.update-toast-text {
  color: #333;
  font-size: 14px;
}

.update-toast-title {
  display: block;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 3px;
}

.update-toast-btn {
  white-space: nowrap;
  margin-left: 15px;
}

.help-iframe-container {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
}

.help-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-help {
  max-width: 95% !important;
}

.help-modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  min-height: 45px;
}

.help-modal-header .btn-sm {
  padding: 0.25rem 0.5rem;
  line-height: 1.2;
  white-space: nowrap;
}

.help-modal-header i {
  margin-right: 4px;
}

.help-modal-title {
  font-size: 1.1rem;
  color: #333;
}

.help-modal-header,
.help-modal-footer {
  min-height: auto !important;
}

.help-modal-header .modal-title {
  font-size: 1.1rem;
}

/* Full screen loader */
.full-screen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.loader-text {
  margin-top: 15px;
  font-weight: bold;
  color: #007bff;
  font-size: 1.1rem;
}