/* Duo New Tab © 2026 DevRoshdi. All rights reserved. See LICENSE.txt. */
/*
 * Reminders, after Reminders in iPadOS 27 (js/reminders.js): a floating sidebar with the smart-list
 * tiles and My Lists, a list with its name large in its colour, round checkboxes, and glass details.
 */

/* ---------- the Reminders icon: white, three coloured circles and lines ---------- */

.tile.builtin-reminders { background: #fff; }
body.icons-dark .tile.builtin-reminders { background: #1c1c1e url("icons/reminders.svg") center / 100% no-repeat; }
body.icons-clear .tile.builtin-reminders, body.icons-tinted .tile.builtin-reminders { background-image: none; }
body.icons-clear .tile.builtin-reminders::before, body.icons-tinted .tile.builtin-reminders::before {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: url("icons/reminders-mask.svg") center / 100% no-repeat; mask: url("icons/reminders-mask.svg") center / 100% no-repeat;
}
body.icons-clear .tile.builtin-reminders::before { background: rgba(255, 255, 255, 0.96); }
body.icons-tinted .tile.builtin-reminders::before { background: hsl(var(--hue), 95%, 72%); }

/* ---------- colours ---------- */

.rapp {
  --r-bg: #fff;
  --r-side: #f2f2f7;
  --r-cell: #fff;
  --r-pop: #f2f2f7;
  --r-text: #000;
  --r-sub: rgba(60, 60, 67, 0.6);
  --r-sep: rgba(60, 60, 67, 0.2);
  --r-fill: rgba(118, 118, 128, 0.12);
  --r-check: #c7c7cc;
  --r-tint: #007aff;
  --r-red: #ff3b30;
  --r-glass: rgba(255, 255, 255, 0.78);
  --n-bg: var(--r-bg);
  --n-fill: var(--r-fill);
}
body.mode-dark .rapp {
  --r-bg: #000;
  --r-side: #1c1c1e;
  --r-cell: #2c2c2e;
  --r-pop: #1c1c1e;
  --r-text: #fff;
  --r-sub: rgba(235, 235, 245, 0.6);
  --r-sep: rgba(84, 84, 88, 0.6);
  --r-fill: rgba(118, 118, 128, 0.24);
  --r-check: #48484a;
  --r-tint: #0a84ff;
  --r-red: #ff453a;
  --r-glass: rgba(44, 44, 46, 0.78);
}

/* ---------- the window: sidebar and list ---------- */

.rapp .n-win.rm-win {
  display: grid; grid-template-columns: minmax(270px, min(330px, 34%)) minmax(0, 1fr); background: var(--r-bg); color: var(--r-text);
  font: 17px/1.3 var(--font); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
.rm-win svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rm-win button { font: inherit; color: inherit; }
/* A narrow window: the lists or a list, one at a time. */
.rapp .n-win.rm-win.rm-narrow { grid-template-columns: minmax(0, 1fr); }
.rm-narrow .rm-side { display: none; }
.rm-narrow.rm-show-list .rm-side { display: flex; }
.rm-narrow.rm-show-list .rm-main { display: none; }

.rm-side {
  position: relative; display: flex; flex-direction: column; min-height: 0; margin: calc(var(--n-top) + 6px) 0 10px 10px;
  border-radius: 28px; background: var(--r-side); overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 8px 30px rgba(0, 0, 0, 0.06);
}
body.mode-dark .rm-side { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08); }
.napp.windowed .rm-side { margin-top: 10px; }
.rm-narrow .rm-side { margin-right: 10px; }
.rm-side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 46px 14px 16px; }

.rm-search { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 19px; background: var(--r-fill); color: var(--r-sub); cursor: text; }
.rm-search-ico { flex: none; width: 18px; height: 18px; }
.rm-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--r-text); font: 17px var(--font); user-select: text; }
.rm-search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: 0.6; }

.rm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 24px; }
.rm-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "badge count" "name name"; align-items: center; gap: 8px 6px;
  min-width: 0; padding: 10px 12px 9px; border: 0; border-radius: 14px; background: var(--r-cell); text-align: left; cursor: pointer;
  transition: background 0.2s ease, scale 0.25s var(--spring-pop, ease);
}
.rm-tile:active { scale: 0.96; }
.rm-tile .rm-badge { grid-area: badge; }
.rm-tile-count { grid-area: count; justify-self: end; font: 700 26px/1 var(--font); font-variant-numeric: tabular-nums; }
.rm-tile-name { grid-area: name; font: 600 15px/1.2 var(--font); color: var(--r-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-tile.on { background: var(--sel); color: #fff; }
.rm-tile.on .rm-tile-name { color: rgba(255, 255, 255, 0.9); }
.rm-tile.on .rm-badge, .rm-listrow.on .rm-badge { background: #fff !important; color: var(--sel); }

.rm-badge { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; }
.rm-badge svg { width: 17px; height: 17px; stroke-width: 2.3; }

.rm-side-head { margin: 0 4px 8px; font: 700 22px/1.2 var(--font); letter-spacing: 0.01em; }
.rm-lists { border-radius: 14px; background: var(--r-cell); overflow: hidden; }
.rm-listrow {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 14px; border: 0; background: transparent;
  text-align: left; cursor: pointer;
}
.rm-listrow + .rm-listrow::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 0.5px; background: var(--r-sep); }
.rm-listrow:hover { background: var(--r-fill); }
.rm-listrow.on { background: var(--sel); color: #fff; }
.rm-listrow.on::before, .rm-listrow.on + .rm-listrow::before { display: none; }
.rm-listrow-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-listrow-count { color: var(--r-sub); font-variant-numeric: tabular-nums; }
.rm-listrow.on .rm-listrow-count { color: rgba(255, 255, 255, 0.85); }
.rm-addlist {
  flex: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 22px 16px; border: 0; background: transparent;
  color: var(--r-tint) !important; font-size: 17px; text-align: left; cursor: pointer;
}
.rm-addlist-ico { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--r-tint); color: #fff; stroke-width: 2.8 !important; }

/* The list. */
.rm-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rm-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 56px; padding: calc(var(--n-top) + 4px) 20px 0 24px; }
.rm-narrow:not(.rm-show-list) .rm-bar { padding-left: 96px; }
.rm-bar-title { display: none; font-weight: 600; }
.rm-bar-gap { flex: 1; }
.rm-back { display: none; align-items: center; gap: 2px; padding: 4px 6px 4px 0; border: 0; background: transparent; color: var(--list) !important; font-size: 17px; cursor: pointer; }
.rm-back-ico { width: 22px; height: 22px; stroke-width: 2.4 !important; }
.rm-narrow .rm-back { display: inline-flex; }
.rm-gbtn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--list) !important; cursor: pointer;
  background: var(--r-glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.08);
}
.rm-gbtn svg { width: 22px; height: 22px; stroke-width: 3; }
.rm-gbtn:active { scale: 0.92; }
.rm-gbtn[hidden] { display: none; }

.rm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 36px 110px; }
.rm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 2px 0 6px; color: var(--list); }
.rm-h1 { min-width: 0; margin: 0; font: 700 34px/1.15 var(--font); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.rm-h1-count { flex: none; font: 700 34px/1.15 var(--font); font-variant-numeric: tabular-nums; }
.rm-donebar { display: flex; align-items: center; gap: 6px; padding: 6px 0 8px; font-size: 15px; color: var(--r-sub); border-bottom: 0.5px solid var(--r-sep); }
.rm-donebar:empty { display: none; }
.rm-link { padding: 0; border: 0; background: transparent; color: var(--list) !important; font-size: 15px; cursor: pointer; }
.rm-dot { opacity: 0.7; }
.rm-sec-head { margin: 22px 0 2px; font: 700 20px/1.25 var(--font); }
.rm-empty { padding: 60px 0; text-align: center; font-size: 17px; color: var(--r-sub); }

.rm-row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 11px 0 11px; min-height: 46px; cursor: text; }
.rm-row::after { content: ""; position: absolute; left: 36px; right: 0; bottom: 0; height: 0.5px; background: var(--r-sep); }
.rm-row.flash { animation: rm-flash 1.2s ease; }
@keyframes rm-flash { 0%, 40% { background: color-mix(in srgb, var(--list) 14%, transparent); } }
.rm-check {
  position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; padding: 0;
  border: 1.6px solid var(--r-check); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color 0.2s ease;
}
.rm-check span { width: 14px; height: 14px; border-radius: 50%; background: var(--c); scale: 0; transition: scale 0.3s var(--spring-pop, ease); }
.rm-row.done .rm-check { border-color: var(--c); }
.rm-row.done .rm-check span { scale: 1; }
.rm-check:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--r-check)); }
.rm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rm-line { display: flex; align-items: baseline; gap: 6px; }
.rm-pri { flex: none; font-weight: 700; color: var(--c); }
.rm-title { flex: 1; min-width: 0; min-height: 22px; outline: none; overflow-wrap: anywhere; user-select: text; caret-color: var(--list); }
.rm-row.done .rm-title { color: var(--r-sub); }
/* A reminder without a title reads as one (as in the widget), until you type into it. */
.rm-title:empty:not(:focus)::before { content: 'New Reminder'; color: var(--r-sub); pointer-events: none; }
.rm-notes { font-size: 15px; color: var(--r-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.rm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; color: var(--r-sub); }
.rm-when.late { color: var(--r-red); }
.rm-url { color: var(--r-tint); text-decoration: none; }
.rm-url:hover { text-decoration: underline; }
.rm-inlist { opacity: 0.85; }
.rm-flag { flex: none; color: #ff9500; margin-top: 1px; }
body.mode-dark .rm-flag { color: #ff9f0a; }
.rm-flag svg { width: 18px; height: 18px; fill: currentColor; stroke-width: 1.6; }
.rm-info { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -2px; padding: 0; border: 0; background: transparent; color: var(--list) !important; cursor: pointer; opacity: 0; }
.rm-info svg { width: 24px; height: 24px; stroke-width: 1.8; }
.rm-row:hover .rm-info, .rm-row.sel .rm-info, .rm-info:focus-visible { opacity: 1; }

/* New Reminder, at the bottom left in the list's colour. */
.rm-new {
  position: absolute; left: 24px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 10px;
  border: 0; border-radius: 22px; color: var(--list) !important; font-weight: 600 !important; cursor: pointer;
  background: var(--r-glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 6px 20px rgba(0, 0, 0, 0.1);
}
.rm-new[hidden] { display: none; }
.rm-new:active { scale: 0.95; }
.rm-new-plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--list); color: #fff; }
.rm-new-plus svg { width: 16px; height: 16px; stroke-width: 3; }

/* ---------- details and list info ---------- */

.rm-pop {
  position: absolute; z-index: 20; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; color: var(--r-text);
  background: color-mix(in srgb, var(--r-pop) 92%, transparent); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 24px 70px rgba(0, 0, 0, 0.28);
}
body.mode-dark .rm-pop { box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 24px 70px rgba(0, 0, 0, 0.6); }
.rm-pop[hidden] { display: none; }
.rm-pop-head { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 16px 6px; }
.rm-pop-title { grid-column: 2; font-weight: 600; }
.rm-pop-done { grid-column: 3; justify-self: end; padding: 4px 2px; border: 0; background: transparent; color: var(--r-tint) !important; font-weight: 600 !important; cursor: pointer; }
.rm-pop-done:disabled { opacity: 0.35; cursor: default; }
.rm-pop-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 16px; }
.rm-grp { margin-top: 12px; border-radius: 14px; background: var(--r-cell); overflow: hidden; }
body:not(.mode-dark) .rm-pop .rm-grp { background: #fff; }
.rm-in { display: block; width: 100%; padding: 12px 14px; border: 0; outline: 0; background: transparent; color: var(--r-text); font: 17px/1.3 var(--font); user-select: text; resize: none; }
.rm-in + .rm-in { border-top: 0.5px solid var(--r-sep); }
.rm-in-title { font-weight: 600; }
.rm-in::placeholder { color: var(--r-sub); }
.rm-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 14px; }
.rm-grp > * + .rm-opt::before, .rm-grp > .rm-opt + *::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 0.5px; background: var(--r-sep); }
.rm-cal, .rm-timebox { position: relative; }
.rm-opt-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; }
.rm-opt-ico svg { width: 18px; height: 18px; stroke-width: 2.2; }
.rm-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rm-opt-sub { font-size: 14px; color: var(--r-tint); }
.rm-opt .pm-btn { color: var(--r-sub); font-size: 17px; }
.rm-switch {
  position: relative; flex: none; width: 51px; height: 31px; padding: 0; border: 0; border-radius: 16px; background: var(--r-fill); cursor: pointer;
  transition: background 0.25s ease;
}
.rm-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.04); transition: translate 0.3s var(--spring-pop, ease);
}
.rm-switch[aria-checked="true"] { background: #34c759; }
body.mode-dark .rm-switch[aria-checked="true"] { background: #30d158; }
.rm-switch[aria-checked="true"]::after { translate: 20px 0; }
.rm-del { display: block; width: 100%; padding: 13px 14px; border: 0; background: transparent; color: var(--r-red) !important; text-align: left; cursor: pointer; }

/* The month calendar under Date. */
.rm-cal { padding: 4px 12px 12px; }
.rm-cal-head { display: flex; align-items: center; gap: 4px; padding: 6px 4px 8px; }
.rm-cal-month { font-weight: 600; }
.rm-cal-nav { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--r-tint) !important; cursor: pointer; }
.rm-cal-nav svg { width: 20px; height: 20px; stroke-width: 2.6; }
.rm-cal-nav:hover { background: var(--r-fill); }
.rm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.rm-cal-dow { padding-bottom: 4px; font: 600 12px var(--font); color: var(--r-sub); text-transform: uppercase; }
.rm-cal-day { justify-self: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; font-size: 19px !important; cursor: pointer; font-variant-numeric: tabular-nums; }
.rm-cal-day:hover { background: var(--r-fill); }
.rm-cal-day.today { color: var(--r-tint) !important; font-weight: 600 !important; }
.rm-cal-day.on { background: color-mix(in srgb, var(--r-tint) 16%, transparent); color: var(--r-tint) !important; font-weight: 600 !important; }
.rm-timebox { padding: 2px 14px 12px; }
.rm-in-time { width: auto; margin: 0 auto; padding: 6px 12px; border-radius: 10px; background: var(--r-fill); font-size: 22px; text-align: center; }
.rm-in-time::-webkit-calendar-picker-indicator { display: none; }

/* List info: the symbol large over the name, then colours and symbols. */
.rm-name-grp { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 14px 16px; }
.rm-big-badge { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); }
.rm-big-badge svg { width: 48px; height: 48px; stroke-width: 2; }
.rm-name-input { width: 100%; padding: 12px 14px; border: 0; outline: 0; border-radius: 12px; background: var(--r-fill); color: var(--r-text); font: 700 22px var(--font); text-align: center; user-select: text; }
.rm-colors, .rm-glyphs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 8px; padding: 14px; justify-items: center; }
.rm-colors button, .rm-glyphs button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.rm-colors button { background: var(--c); }
.rm-glyphs button { background: var(--r-fill); color: var(--r-sub) !important; }
.rm-glyphs button svg { width: 22px; height: 22px; }
.rm-colors button[aria-checked="true"], .rm-glyphs button[aria-checked="true"] { box-shadow: 0 0 0 3px var(--r-pop), 0 0 0 6px var(--r-sub); }
.rm-glyphs button[aria-checked="true"] { color: var(--r-text) !important; }

/* Menus (More, a list, a reminder). */
.rm-menu {
  position: absolute; z-index: 30; min-width: 230px; padding: 6px 0; border-radius: 18px; color: var(--r-text);
  background: var(--r-glass); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 18px 50px rgba(0, 0, 0, 0.25);
  animation: rm-pop 0.28s var(--spring-pop, ease) both; transform-origin: top right;
}
@keyframes rm-pop { from { opacity: 0; scale: 0.8; } }
.rm-menu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 11px 16px; border: 0; background: transparent; text-align: left; font-size: 16px; cursor: pointer; }
.rm-menu button svg { width: 19px; height: 19px; flex: none; }
.rm-menu button:hover, .rm-menu button:focus-visible { background: var(--r-fill); outline: 0; }
.rm-menu button.danger { color: var(--r-red); }
.rm-menu-sep { height: 7px; background: rgba(0, 0, 0, 0.08); }

/* A narrow window: tighter margins. */
.rm-narrow .rm-scroll { padding: 0 20px 110px; }
.rm-narrow .rm-new { left: 16px; }

/* Full screen, the status bar takes the list's colours: black or white. */
body[data-full-app="reminders"].mode-dark .statusbar { color: #fff; }

/* The bell in the Dynamic Island when a reminder is due. */
.rm-isl-badge { width: 44px; height: 44px; }
.rm-isl-badge svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
