/* ==============================
   通知設定
   ============================== */

/* 通知リンクのベルマーク用 */
.notification-link {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

/* 未読件数の赤丸表示 */
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 5px;
}

/* 通知コンテナ：複数通知を縦に積む */
#notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse; /* 新しい通知が下に積まれる */
  gap: 10px; /* 通知同士の間隔 */
  z-index: 1000;
}

/* 各通知ポップアップ */
.notification-popup {
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-width: 200px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  color: #000;
}

/* notification_kind に応じた背景色 */
.notification-popup.reminder {
  background-color: #ccffcc;
}

.notification-popup.alert {
  background-color: #ffcccc;
}

/* 表示時 */
.notification-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* タイトル部分 */
.notification-title {
  font-weight: bold;
  margin-bottom: 5px;
}

/* メッセージ部分 */
.notification-message {
  font-size: 14px;
}

/* ==============================
   通知ベル用ドロップダウン
   ============================== */
.notification {
  position: relative; /* ドロップダウンの基準 */
  display: inline-block;
}

.notification-dropdown-header {
  position: sticky;
  top: 0;
  background-color: #fff;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  z-index: 10;
}

.notification-link {
  cursor: pointer;
  position: relative;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4d4f;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
}

.notification-dropdown {
  position: absolute;
  top: 100%; /* ベルアイコンの真下に表示 */
  right: 0;
  max-width: 420px;
  min-width: 420px;
  max-height: 560px;
  min-height: 560px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  margin-top: 10px;
}

.notification-dropdown-header {
  font-size: 18px;
}

.notification-dropdown.hidden {
  display: none;
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-item {
  background-color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.notification-item:hover {
  background-color: #f5f5f5;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.notification-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.notification-kind.reminder {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background-color: #ccffcc;
  border-radius: 4px;
  padding: 2px 6px;
}

.notification-kind.alert {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background-color: #ffcccc;
  border-radius: 4px;
  padding: 2px 6px;
}

.notification-message {
  font-size: 15px;
  color: #444;
  margin: 4px 0;
  line-height: 1.4;
  white-space: pre-line;
}

.notification-time {
  font-size: 13px;
  color: #999;
}

.notification.dropdown-open .tooltip-text {
  display: none; /* ドロップダウン開いてる間は tooltip を非表示 */
}

/* ドロップダウン開いているときはベルのホバー色を無効化 */
.notification.dropdown-open:hover i.fa-bell {
  color: #333;
}

.no-notifications {
  font-size: 18px;
  text-align: center;
  padding-top: 200px;
}