/* MakeNote demo (js/demos/makenote.js) — Material-style Flutter web UI, light and dark */

.dm-makenote {
  --bg: #fdfcff;
  --sf: #f3f5fb;
  --card: #ffffff;
  --sel: #e6ecf8;
  --tx: #1b1c20;
  --tx2: #5d6170;
  --tx3: #8b8f9c;
  --line: #e2e5ee;
  --pri: #3a66c4;
  --pri-c: #d8e2ff;
  --on-pri-c: #102a6b;
  --mark: #ffe69c;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--tx);
  font: 400 13px/1.5 Roboto, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}
.dm-makenote.is-dark {
  --bg: #121318;
  --sf: #1a1c22;
  --card: #1f2128;
  --sel: #283044;
  --tx: #e3e4ea;
  --tx2: #a9adbb;
  --tx3: #737786;
  --line: #2c2f38;
  --pri: #adc6ff;
  --pri-c: #2a4682;
  --on-pri-c: #dbe4ff;
  --mark: #7a6420;
}
.dm-makenote,
.dm-makenote * {
  transition-property: background-color, color, border-color, fill, opacity, transform, max-height, padding, margin;
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.dm-makenote.is-reset,
.dm-makenote.is-reset * { transition: none !important; }
.dm-makenote i, .dm-makenote em { font-style: normal; }
.dm-makenote p { margin: 0; }
.dm-makenote svg { display: block; flex: none; }

/* Top bar */
.dm-makenote .mn-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 18px;
}
.dm-makenote .mn-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sf);
  color: var(--tx2);
}
.dm-makenote .mn-q { position: relative; flex: 1; align-self: stretch; align-items: center; font-size: 13px; color: var(--tx); }
.dm-makenote .mn-q-ph { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 13px; line-height: 1; color: var(--tx3); white-space: nowrap; }
.dm-makenote .mn-q-v:not(:empty) + .mn-q-ph,
.dm-makenote .mn-q-v.is-typing ~ .mn-q-ph { opacity: 0; }
.dm-makenote .mn-q { display: flex; }
.dm-makenote .mn-q-v { order: -1; position: relative; z-index: 1; }
.dm-makenote .mn-gear { color: var(--tx2); }

/* Body */
.dm-makenote .mn-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 228px 1fr;
}
.dm-makenote .mn-side {
  position: relative;
  padding: 6px 12px 0;
  border-right: 1px solid var(--line);
}
.dm-makenote .mn-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 8px 14px;
  font-size: 19px;
  font-weight: 600;
  color: var(--pri);
}
.dm-makenote .mn-logo span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--pri);
  color: var(--bg);
}
.dm-makenote .mn-nav,
.dm-makenote .mn-sec {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--tx2);
  font-size: 13px;
}
.dm-makenote .mn-nav svg { fill: none; stroke: currentColor; stroke-width: 2; }
.dm-makenote .mn-nav:first-of-type { background: var(--sel); color: var(--tx); font-weight: 500; }
.dm-makenote .mn-nav em {
  margin-left: auto;
  font-size: 11px;
  color: var(--tx3);
  font-variant-numeric: tabular-nums;
}
.dm-makenote .mn-sec {
  margin-top: 8px;
  font-weight: 600;
  color: var(--tx);
  background: var(--sf);
  border-radius: 10px;
}
.dm-makenote .mn-tree { padding: 2px 0 0 20px; }
.dm-makenote .mn-f {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--tx2);
}
.dm-makenote .mn-f svg { color: #6d8fd6; }
.dm-makenote .mn-f.is-child { margin-left: 18px; }
.dm-makenote .mn-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px; min-height: 32px; }
.dm-makenote .mn-tags-empty { font-size: 12px; font-style: italic; color: var(--tx3); }
.dm-makenote .mn-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--pri-c);
  color: var(--on-pri-c);
  font-size: 11px;
  font-weight: 500;
}
.dm-makenote .mn-side-tag { display: none; }
.dm-makenote.has-tag .mn-side-tag { display: inline-flex; animation: mn-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.dm-makenote.has-tag .mn-tags-empty { display: none; }
@keyframes mn-pop { from { transform: scale(0.6); opacity: 0; } }
.dm-makenote .mn-ver {
  position: absolute;
  left: 22px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--tx3);
}

/* Note list */
.dm-makenote .mn-main { position: relative; min-width: 0; overflow: hidden; }
.dm-makenote .mn-list { padding: 4px 22px; }
.dm-makenote .mn-list-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 2px 2px 10px;
}
.dm-makenote .mn-list-t { font-size: 16px; font-weight: 600; }
.dm-makenote .mn-list-n { font-size: 12px; color: var(--tx3); }
.dm-makenote .mn-cards { display: grid; gap: 8px; }
.dm-makenote .mn-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-height: 84px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
}
.dm-makenote .mn-card-ic { margin-top: 2px; color: var(--tx2); }
.dm-makenote .mn-card-b { flex: 1; min-width: 0; }
.dm-makenote .mn-card b { display: block; font-size: 14px; font-weight: 600; }
.dm-makenote .mn-card p { margin-top: 1px; color: var(--tx2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-makenote .mn-card mark { background: transparent; color: inherit; border-radius: 3px; padding: 0 1px; }
.dm-makenote.is-search .mn-card mark { background: var(--mark); }
.dm-makenote .mn-card-m { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--tx3); }
.dm-makenote .mn-card-star svg { fill: none; stroke: var(--tx3); stroke-width: 1.8; }
.dm-makenote .mn-card.is-star .mn-card-star svg { fill: #f5b301; stroke: #f5b301; }
.dm-makenote .mn-card[data-id="new"] { display: none; background: var(--sel); border-color: transparent; }
.dm-makenote.has-new .mn-card[data-id="new"] { display: flex; }
.dm-makenote.is-search .mn-card:not([data-match]) {
  max-height: 0;
  padding-block: 0;
  margin-bottom: -8px;
  opacity: 0;
  border-color: transparent;
}

.dm-makenote .mn-fab {
  position: absolute;
  right: 24px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--pri-c);
  color: var(--on-pri-c);
  box-shadow: 0 6px 16px -6px rgba(16, 42, 107, 0.45);
}
.dm-makenote .mn-fab.is-press { transform: scale(0.9); }

/* Editor */
.dm-makenote .mn-ed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}
.dm-makenote.is-editing .mn-ed { opacity: 1; transform: none; }
.dm-makenote .mn-ed-h {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 16px 0 10px;
  border-bottom: 1px solid var(--line);
}
.dm-makenote .mn-ib {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--tx2);
}
.dm-makenote .mn-star-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.dm-makenote .mn-title { position: relative; flex: 1; align-self: stretch; align-items: center; font-size: 18px; font-weight: 600; }
.dm-makenote .mn-title-ph { position: absolute; left: 0; top: 50%; transform: translateY(-50%); line-height: 1; white-space: nowrap; color: var(--tx3); font-weight: 500; }
.dm-makenote .mn-title-v { position: relative; }
.dm-makenote .mn-title-v:not(:empty) ~ .mn-title-ph,
.dm-makenote .mn-title-v.is-typing ~ .mn-title-ph { opacity: 0; }
.dm-makenote .mn-title { display: flex; }
.dm-makenote .mn-title-v { order: -1; }
.dm-makenote .mn-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--tx2);
  font-size: 12px;
}
.dm-makenote .mn-crumb svg { color: #6d8fd6; }
.dm-makenote .mn-ed-tag { opacity: 0; transform: scale(0.7); }
.dm-makenote .mn-ed-tag.is-on { opacity: 1; transform: none; }

.dm-makenote .mn-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--tx2);
  font-size: 12.5px;
}
.dm-makenote .mn-tools > i {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  border-radius: 6px;
}
.dm-makenote .mn-mode {
  display: flex;
  margin-left: auto;
  padding: 2px;
  border-radius: 8px;
  background: var(--sf);
}
.dm-makenote .mn-mode i { padding: 2px 10px; border-radius: 6px; font-size: 11.5px; }
.dm-makenote .mn-mode i.is-on { background: var(--card); color: var(--tx); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

.dm-makenote .mn-split { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.dm-makenote .mn-src {
  padding: 14px 0;
  border-right: 1px solid var(--line);
  background: var(--sf);
  font: 400 13px/1.9 "JetBrains Mono", Consolas, "Courier New", "Noto Sans TC", monospace;
}
.dm-makenote .mn-ln { display: flex; gap: 14px; padding: 0 16px; }
.dm-makenote .mn-ln s { width: 14px; text-align: right; text-decoration: none; color: var(--tx3); }
.dm-makenote .mn-ln span { white-space: pre; color: var(--tx); }
.dm-makenote .mn-pv { padding: 14px 24px; }
.dm-makenote .mn-pv-l { opacity: 0; transform: translateY(6px); }
.dm-makenote .mn-pv-l.is-on { opacity: 1; transform: none; }
.dm-makenote .mn-pv h2 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 700; }
.dm-makenote .mn-pv p { margin: 4px 0; font-size: 14px; }
.dm-makenote .mn-todo { display: flex; align-items: center; gap: 9px; }
.dm-makenote .mn-todo i {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 2px solid var(--tx3);
}
.dm-makenote .mn-todo.is-done { color: var(--tx3); text-decoration: line-through; }
.dm-makenote .mn-todo.is-done i { background: var(--pri); border-color: var(--pri); }
.dm-makenote .mn-todo.is-done i::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 0;
  width: 4px;
  height: 8px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dm-makenote .mn-pv blockquote {
  margin: 10px 0 0;
  padding: 4px 12px;
  border-left: 3px solid var(--pri);
  background: var(--sf);
  color: var(--tx2);
  font-size: 13.5px;
}

/* Popovers */
.dm-makenote .mn-pop {
  position: absolute;
  z-index: 5;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
}
.dm-makenote .mn-pop.is-on,
.dm-makenote.show-theme .mn-theme-pop { opacity: 1; transform: none; }
.dm-makenote .mn-pop > p { padding: 0 6px 6px; font-size: 11.5px; font-weight: 600; color: var(--tx3); }
.dm-makenote .mn-folder-pop { right: 120px; top: 46px; width: 200px; }
.dm-makenote .mn-folder-pop .mn-f.is-on { background: var(--pri-c); color: var(--on-pri-c); }
.dm-makenote .mn-tag-pop { right: 40px; top: 46px; width: 210px; }
.dm-makenote .mn-tag-in {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 2px solid var(--pri);
  font-size: 13px;
  line-height: 28px;
}
.dm-makenote .mn-tag-hint { display: block; padding: 6px 4px 0; font-size: 11px; color: var(--tx3); }
.dm-makenote .mn-theme-pop { right: 14px; top: 50px; width: 170px; }
.dm-makenote .mn-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
}
.dm-makenote .mn-opt i {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--tx3);
}
.dm-makenote .mn-opt.is-on i { border-color: var(--pri); box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 8px var(--pri); }
