/* todo-countdown-style.css — 跟随现有 style.css 的配色变量，没有变量就退回到近似色值 */

.todo-fab {
  /* [v230改] 原来在右下角(right:14px;bottom:370px),会跟规划/罗盘等按钮的位置挤在一起,
     把它挪到最左侧,叠在🚩打卡(bottom:82px)正上方,彻底不挡住其它悬浮按钮 */
  position: fixed;
  left: 14px;
  bottom: 136px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(15, 22, 38, 0.92);
  border: 1px solid rgba(232, 163, 61, 0.5);
  color: #F6F1E4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 55;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
body.all-ui-hidden .todo-fab { display: none !important; }

.todo-modal {
  position: fixed;
  left: 50%;
  bottom: -100%;
  transform: translateX(-50%);
  width: min(420px, 92vw);
  max-height: 78vh;
  background: rgba(15, 22, 38, 0.97);
  border: 1px solid rgba(246,241,228,0.14);
  border-radius: 16px 16px 0 0;
  z-index: 90;
  transition: bottom 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  color: #F6F1E4;
}
.todo-modal.show { bottom: 0; }

.todo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(246,241,228,0.1);
}
.todo-modal-title { font-size: 14px; font-weight: 600; }
.todo-modal-close {
  background: none; border: none; color: rgba(246,241,228,0.6);
  font-size: 16px; cursor: pointer;
}

.todo-tabs { display: flex; gap: 8px; padding: 8px 14px 0; }
.todo-tab {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  border: 1px solid rgba(246,241,228,0.12);
  background: transparent;
  color: rgba(246,241,228,0.65);
  font-size: 12.5px;
  cursor: pointer;
}
.todo-tab.active { background: rgba(232,163,61,0.16); border-color: rgba(232,163,61,0.5); color: #E8A33D; }

.todo-push-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-size: 11.5px; color: rgba(246,241,228,0.75);
  border-bottom: 1px solid rgba(246,241,228,0.08);
}
.todo-push-btn {
  padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(232,163,61,0.5);
  background: rgba(232,163,61,0.12); color: #E8A33D; font-size: 11px; cursor: pointer;
}

.todo-pane { display: none; padding: 12px 14px 16px; overflow-y: auto; }
.todo-pane.active { display: block; }

.todo-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(246,241,228,0.14);
  border-radius: 8px;
  color: #F6F1E4;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 8px;
  font-family: inherit;
}
textarea.todo-input { resize: vertical; }

.todo-remind-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.todo-chip {
  padding: 5px 10px; border-radius: 12px; font-size: 11px;
  border: 1px solid rgba(246,241,228,0.16); color: rgba(246,241,228,0.7); cursor: pointer;
}
.todo-chip.on { background: rgba(232,163,61,0.18); border-color: #E8A33D; color: #E8A33D; }

.todo-loc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.todo-loc-btn {
  padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(246,241,228,0.16);
  background: transparent; color: rgba(246,241,228,0.75); font-size: 11.5px; cursor: pointer;
}
.todo-loc-btn.active { border-color: #22E0E0; color: #22E0E0; }
.todo-loc-status { font-size: 10.5px; color: rgba(246,241,228,0.5); }

.todo-save-btn {
  width: 100%; padding: 10px 0; border-radius: 10px; border: none;
  background: #E8A33D; color: #1a1206; font-weight: 600; font-size: 13px; cursor: pointer;
}
.todo-save-btn:disabled { opacity: 0.6; }

.todo-map-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: rgba(246,241,228,0.7); margin-bottom: 10px;
}

.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-empty { text-align: center; padding: 24px 0; color: rgba(246,241,228,0.45); font-size: 12px; }

.todo-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 10px;
}
.todo-row-main { flex: 1; min-width: 0; }
.todo-row-content { font-size: 12.5px; color: #F6F1E4; word-break: break-word; }
.todo-row-meta { font-size: 10px; color: rgba(246,241,228,0.5); margin-top: 3px; }
.todo-loc-tag { margin-left: 6px; color: #22E0E0; }
.todo-row-del { background: none; border: none; color: rgba(246,241,228,0.4); cursor: pointer; font-size: 13px; }

.todo-row-cd, .m-todo-badge, .todo-badge-tag {
  font-size: 10.5px; padding: 3px 8px; border-radius: 10px; white-space: nowrap;
  font-weight: 600; box-shadow: 0 2px 7px rgba(0,0,0,0.35);
}
/* 倒计时分层级配色 + 越临近越发光（跟活动"打折"m-event-badge.ev-ending 同一套发光机制）
   全部用不透明底色，保证在浅色/深色地图底图上都清晰可见，不会被"洗白"看不见 */
.todo-overdue {
  background: #D64545; color: #fff;
  animation: todoGlowHot 1s ease-in-out infinite;
}
.todo-urgent {
  background: #E8664A; color: #fff;
  animation: todoGlowHot 1.3s ease-in-out infinite;
}
.todo-near {
  background: #E8A33D; color: #1a1206;
  animation: todoGlowWarm 1.7s ease-in-out infinite;
}
.todo-week {
  background: #B5793A; color: #F6F1E4;
}
.todo-month {
  background: #3D6B8A; color: #F6F1E4;
}
.todo-far {
  background: #0F1626; color: #F6F1E4; border: 1px solid rgba(246,241,228,0.4);
}
@keyframes todoGlowHot {
  0%, 100% { box-shadow: 0 0 4px 1px rgba(214,69,69,0.65), 0 2px 7px rgba(0,0,0,0.35); }
  50%      { box-shadow: 0 0 15px 6px rgba(214,69,69,0.95), 0 2px 7px rgba(0,0,0,0.35); }
}
@keyframes todoGlowWarm {
  0%, 100% { box-shadow: 0 0 4px 1px rgba(232,163,61,0.55), 0 2px 7px rgba(0,0,0,0.35); }
  50%      { box-shadow: 0 0 14px 6px rgba(232,163,61,0.9), 0 2px 7px rgba(0,0,0,0.35); }
}

/* 地图上的待办marker（闹钟图标放大，更醒目） */
.m-todo { display: flex; flex-direction: column; align-items: center; }
.m-todo-pin {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(15,22,38,0.94); border: 2px solid #E8A33D;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
.m-todo-badge { margin-top: 3px; }

/* 通用 toggle 开关（跟现有 .toggle/.knob 风格对齐，若已有全局定义会被覆盖，不冲突） */
.toggle { width: 34px; height: 18px; border-radius: 10px; background: rgba(246,241,228,0.15); position: relative; cursor: pointer; }
.toggle .knob { width: 14px; height: 14px; border-radius: 50%; background: #F6F1E4; position: absolute; top: 2px; left: 2px; transition: left 0.15s; }
.toggle.on { background: rgba(232,163,61,0.4); }
.toggle.on .knob { left: 18px; background: #E8A33D; }
