/* ==========================================================================
   睡眠モード専用スタイル
   ========================================================================== */

/* 睡眠プロジェクトボタン */
#sleepProjectBtn {
  /* 既存のカテゴリーチップ/ボタンと同じ“占有サイズ”に揃える（レイアウトを押し広げない） */
  box-sizing: border-box;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;

  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: default;
  transition: none;
}

#sleepProjectBtn.selected {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* 睡眠エリアバッジ */
.sleep-zone-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* 睡眠アクションボタン */
.sleep-action-btn {
  /* 既存の作業開始/集中モード（.mutebtn）と同じ“占有サイズ”に揃える */
  box-sizing: border-box;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;

  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 2px solid #667eea;
}

.sleep-action-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sleep-action-btn.sleeping {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f093fb;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(240, 147, 251, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.8);
  }
}

/* 睡眠時間表示 */
.sleep-timer-display {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border-radius: 8px;
  margin-top: 12px;
}

.sleep-timer-label {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  margin-bottom: 4px;
}

.sleep-timer-value {
  font-size: 24px;
  font-weight: 700;
  color: #764ba2;
  font-variant-numeric: tabular-nums;
}

/* 睡眠オーバーレイ */
.sleep-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  pointer-events: none;
  z-index: 999;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 睡眠通知 */
.sleep-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.sleep-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sleep-notification-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sleep-notification-message {
  font-size: 13px;
  opacity: 0.9;
}

/* 起床モーダル */
.sleep-wakeup-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.sleep-wakeup-modal.show {
  opacity: 1;
}

.sleep-wakeup-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.sleep-wakeup-modal.show .sleep-wakeup-content {
  transform: scale(1);
}

.sleep-wakeup-content h2 {
  font-size: 32px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sleep-wakeup-time {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
}

.sleep-goal-achieved {
  font-size: 16px;
  color: #10b981;
  font-weight: 600;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
}

.sleep-wakeup-close {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .sleep-zone-badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  .sleep-timer-value {
    font-size: 20px;
  }

  .sleep-notification {
    top: 10px;
    padding: 12px 16px;
  }

  .sleep-wakeup-content {
    padding: 24px;
  }

  .sleep-wakeup-content h2 {
    font-size: 24px;
  }

  .sleep-wakeup-time {
    font-size: 20px;
  }
}