/* ================= ★v3.324 待读 / 未读 / 提醒闹钟 · 样式 =================
   为什么单独一个 css 文件：nginx 对 .css 是 max-age=86400，改老文件的话用户一天内看不到新样式
   （v3.312 的教训，写进铁律第 4 条）。所以这一版所有样式都在新文件名里。 */

/* ---------- 目录里 / 行尾的那个小圆点 ---------- */
.rdot {
  width: 14px; height: 14px; flex: 0 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer;
  opacity: .22; transition: opacity .12s, transform .12s;
  vertical-align: middle; margin: 0 1px; position: relative; z-index: 2;
}
.tnode:hover > .rdot, .mrow:hover .rdot { opacity: .85; }
.rdot:hover { opacity: 1 !important; transform: scale(1.18); }
.rdot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  border: 1.4px solid var(--sub); background: transparent;
  transition: background .12s, border-color .12s;
}
.rdot.rd-todo { opacity: .95; }
.rdot.rd-todo::before { border-color: #f08c00; background: #f08c00; }
.rdot.rd-unread { opacity: .95; }
.rdot.rd-unread::before { border-color: var(--acc); background: var(--acc); }
.rdot.rd-due { opacity: 1; }
.rdot.rd-due::before { border-color: #e03131; background: #e03131; box-shadow: 0 0 0 0 rgba(224, 49, 49, .55); animation: rdpulse 1.7s infinite; }
@keyframes rdpulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 49, 49, .5); }
  70%  { box-shadow: 0 0 0 6px rgba(224, 49, 49, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0); }
}
/* 行尾那个：正文行里不要占太多地方 */
.rdot.rdot-row { width: 12px; flex: 0 0 12px; margin-left: 2px; }
html.phone .rdot.rdot-row { width: 16px; flex: 0 0 16px; }   /* 手机上手指点得着 */

/* ---------- 顶栏「⏰ 待读 N」 ---------- */
#rdBtn {
  display: inline-flex; align-items: center; gap: 3px;
  border: 1px solid transparent; background: transparent;
  color: var(--sub); padding: 2px 7px; border-radius: 6px;
  font-size: 12px; line-height: 1.6; flex: 0 0 auto;
}
#rdBtn:hover { color: var(--acc); border-color: var(--acc); }
#rdBtn.on { color: var(--tx); background: var(--hov); border-color: var(--line); }
#rdBtn.due { color: #e03131; border-color: rgba(224, 49, 49, .45); background: rgba(224, 49, 49, .07); }
#rdBtn b { font-weight: 700; font-size: 11.5px; }
#rdBtn b:empty { display: none; }
#rdBtn .rdic { font-size: 13px; filter: grayscale(.15); }
html.phone #rdBtn { padding: 2px 5px; }

/* ---------- 时间小菜单 ---------- */
#rdPop {
  position: fixed; z-index: 9900; width: 268px;
  background: var(--panel); color: var(--tx);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
  padding: 8px; font-size: 13px;
  animation: rdfade .12s ease-out;
}
@keyframes rdfade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#rdPop .rdph { padding: 3px 6px 7px; display: flex; flex-direction: column; gap: 2px; }
#rdPop .rdph b { font-size: 12px; color: var(--sub); font-weight: 500; }
#rdPop .rdph span { font-size: 13.5px; color: var(--tx); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rdPop button {
  display: block; width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent;
  padding: 7px 8px; border-radius: 8px; font-size: 13px; color: var(--tx);
}
#rdPop button:hover { background: var(--hov); border-color: transparent; color: var(--tx); }
#rdPop button.dg { color: var(--danger); }
#rdPop .rdpsep { font-size: 11.5px; color: var(--sub); padding: 7px 8px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
#rdPop .rdpqs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 0 4px; }
#rdPop .rdpqs button { text-align: center; border: 1px solid var(--line); background: var(--hov); font-size: 12.5px; padding: 6px 4px; }
#rdPop .rdpqs button:hover { border-color: var(--acc); color: var(--acc); background: var(--acc2); }
#rdPop .rdpc { display: flex; gap: 5px; padding: 7px 4px 2px; }
#rdPop .rdpc input { flex: 1; min-width: 0; font-size: 12px; padding: 4px 6px; border-radius: 7px; }
#rdPop .rdpc button { width: auto; flex: 0 0 auto; border: 1px solid var(--acc); color: #fff; background: var(--acc); font-size: 12px; padding: 4px 9px; }
#rdPop .rdpc button:hover { color: #fff; opacity: .9; }

/* 手机上改成贴底卡片（不然小屏上无处安放） */
@media (max-width: 640px) {
  #rdPop {
    left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important;
    width: auto; padding-bottom: 12px;
  }
  #rdPop .rdpqs { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* ---------- 待读清单面板 ---------- */
#rdPane {
  position: fixed; z-index: 9800;
  right: 14px; top: 54px; width: 340px; max-width: calc(100vw - 20px);
  max-height: min(70vh, 560px);
  display: flex; flex-direction: column;
  background: var(--panel); color: var(--tx);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .18);
  font-size: 13px; overflow: hidden;
  animation: rdfade .14s ease-out;
}
#rdPane .rdphd { display: flex; align-items: center; gap: 8px; padding: 11px 12px 9px; border-bottom: 1px solid var(--line); }
#rdPane .rdphd b { font-size: 14px; }
#rdPane .rdphd i { font-size: 11px; color: var(--sub); font-style: normal; }
#rdPane .rdphd .rdpx { margin-left: auto; cursor: pointer; color: var(--sub); padding: 0 4px; font-size: 15px; }
#rdPane .rdphd .rdpx:hover { color: var(--tx); }
#rdPane .rdpb { flex: 1; overflow-y: auto; padding: 4px 6px 8px; }
#rdPane .rdpf { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--sub); }
#rdPane .rdempty { padding: 26px 16px; text-align: center; color: var(--sub); line-height: 1.9; font-size: 12.5px; }
.rdgh { font-size: 11.5px; color: var(--sub); padding: 9px 8px 4px; display: flex; align-items: center; gap: 5px; }
.rdgh i { font-style: normal; opacity: .8; }
.rdgh.dg { color: var(--danger); }
.rdgh.un { color: var(--acc); }
.rdit { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; }
.rdit:hover { background: var(--hov); }
.rdit .rdgo { flex: 1; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.rdit .rdgo b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdit .rdgo em { font-style: normal; font-size: 11.5px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdit .rdtm { font-style: normal; font-size: 11px; color: #f08c00; cursor: pointer; white-space: nowrap; border: 1px solid rgba(240, 140, 0, .3); background: rgba(240, 140, 0, .08); padding: 1px 5px; border-radius: 5px; }
.rdit .rdtm:hover { border-color: #f08c00; }
.rdit .rdx { color: var(--sub); cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 5px; }
.rdit .rdx:hover { color: var(--danger); background: rgba(217, 83, 79, .1); }
html.phone #rdPane { right: 6px; left: 6px; top: auto; bottom: 6px; width: auto; max-height: 74vh; }

/* ---------- 到点提醒条 ---------- */
#rdBar {
  position: fixed; z-index: 9950; left: 50%;
  transform: translate(-50%, -140%);
  top: 52px; max-width: min(760px, calc(100vw - 20px));
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 12px;
  background: var(--panel); color: var(--tx);
  border: 1px solid rgba(240, 140, 0, .55);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  font-size: 13px; transition: transform .22s ease-out, opacity .22s;
  opacity: 0; pointer-events: none;
}
#rdBar.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#rdBar .rdbi { font-size: 16px; }
#rdBar b { color: #f08c00; white-space: nowrap; }
#rdBar i { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
#rdBar i em { font-style: normal; color: var(--sub); margin-left: 6px; font-size: 12px; }
#rdBar .rdbm { font-size: 11.5px; color: var(--danger); white-space: nowrap; }
#rdBar button { font-size: 12px; padding: 4px 10px; border-radius: 7px; }
#rdBar button.pri { background: #f08c00; border-color: #f08c00; color: #fff; }
#rdBar button.pri:hover { color: #fff; opacity: .9; }
html.phone #rdBar { top: 6px; left: 6px; right: 6px; transform: translate(0, -140%); max-width: none; }
html.phone #rdBar.on { transform: none; }
html.phone #rdBar i { max-width: 40vw; }

/* ---------- 行尾 ⋯ 菜单里补的那两个入口（display:contents 让它俩直接参与原菜单排版） ---------- */
.rdsheet { display: contents; }
