
/* The list "+N" opens: one compact row per notification, newest first. */
.xisland-list {
  display: grid;
  padding: 6px;
  color: var(--text);
  pointer-events: auto;
}
.xisland-row {
  --xt-rgb: var(--accent-rgb);
  --xt-ink: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
}
.xisland-row + .xisland-row { border-top: 1px solid var(--xt-veil); }
.xisland-row-open {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 52px;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 13px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, scale 0.32s var(--xt-spring);
}
.xisland-row-open:hover { background: var(--xt-veil); }
.xisland-row-open:active { scale: 0.98; transition-duration: 0.15s, var(--xt-press-ms); }
.xisland-row-open:focus-visible { outline: 2px solid rgb(var(--xt-rgb)); outline-offset: -2px; }
.xisland-row .xtoast-icon { width: 30px; height: 30px; border-radius: 9px; }
.xisland-row .xtoast-icon svg { width: 16px; height: 16px; }
.xisland-row-text { display: grid; min-width: 0; }
.xisland-row .xtoast-kicker { font-size: 11.5px; }
.xisland-row .xtoast-title { margin-top: 0; font-size: 14px; font-weight: 650; display: block; white-space: nowrap; text-overflow: ellipsis; }
.xisland-list-clear { justify-self: end; margin: 6px 4px 2px; }

/* The app tile: a solid square in the source's colour, like an app icon. */
.xtoast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--xt-ink);
  background: rgb(var(--xt-rgb));
}
.xtoast-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* App-supplied icon (Windows notification mirror): the real logo fills the
   tile, on a neutral ground in case it has transparent corners. */
.xtoast-icon--img { overflow: hidden; background: var(--xt-veil); }
.xtoast-icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
/* The picture just taken stands in for the tile: the card shows what it took. */
.xtoast--shot { grid-template-columns: 72px minmax(0, 1fr) auto; }
.xtoast-icon--shot { width: 72px; height: 46px; border-radius: 4px; }
.xtoast-icon--shot img { object-fit: contain; }
/* The tile springs into place as the card arrives, and a success draws its
   tick once the tile has landed: the one moment that says "done". */
.xtoast-in > .xtoast-icon { animation: xtoast-pop 0.42s var(--xt-spring) 0.08s backwards; }
.xtoast-in > .xtoast-icon .xtoast-tick {
  stroke-dasharray: 1;
  animation: xtoast-draw 0.34s cubic-bezier(0.3, 0, 0.2, 1) 0.24s backwards;
}

/* At least the tile's height, text centred in it: a lone title sits on the
   tile's centre, a kicker and title pair fills it, anything longer starts at
   its top and runs on below. */
.xtoast-body {
  min-width: 0;
  min-height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.xtoast-kicker {
  color: var(--muted-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Two lines before it is cut: a reminder's title is the reminder. */
.xtoast-title {
  margin-top: 1px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xtoast-msg {
  margin-top: 2px;
  color: var(--muted-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.38;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A card with its own buttons explains a choice: it may take a few more lines. */
.xtoast:has(.xtoast-actions) .xtoast-msg { -webkit-line-clamp: 4; }

/* Explicit toast actions (opts.actions) — a second choice next to the toast's
   own tap action. Touch-sized, because the Edge is a touchscreen. */
.xtoast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.xtoast-action {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--xt-veil);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.32s var(--xt-spring);
}
.xtoast-action:hover { background: var(--xt-veil-strong); }
.xtoast-action.is-primary {
  background: rgb(var(--xt-rgb));
  color: var(--xt-ink);
}
.xtoast-action.is-primary:hover { background: color-mix(in srgb, rgb(var(--xt-rgb)) 88%, var(--xt-ink)); }

/* Close and "+N": round, quiet, with a 44px target around them. */
.xtoast-close,
.xisland-more {
  position: relative;
  height: 30px;
  border: 0;
  border-radius: 15px;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.32s var(--xt-spring);
}
/* Centred on the app tile: (36 - 30) / 2. */
.xtoast-close {
  width: 30px;
  margin-top: 3px;
  color: var(--muted-text);
}
.xtoast-close::after,
.xisland-more::after { content: ""; position: absolute; inset: -7px; }
/* The chip's target stops at its own edge so it never covers the close button's. */
.xisland-more::after { right: 0; }
.xtoast-close:hover,
.xisland-more:hover { background: var(--xt-veil); color: var(--text); }
.xtoast-x { display: grid; }
/* Even size inside the 30px button, so the glyph lands on whole pixels and sits
   dead centre in the ring (an odd size starts on a half pixel and gets rounded
   to one side). */
.xtoast-x svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* Buttons go down fast under the finger and bounce back on release. */
.xtoast-close:active,
.xisland-more:active,
.xtoast-action:active {
  transform: scale(0.94);
  transition-duration: 0.15s, 0.15s, var(--xt-press-ms);
}
.xtoast-action:active { transition-duration: 0.15s, var(--xt-press-ms); }

.xtoast-close:focus-visible,
.xisland-more:focus-visible,
.xtoast-action:focus-visible { outline: 2px solid rgb(var(--xt-rgb)); outline-offset: 2px; }

/* The time left: a ring around the close button that empties clockwise from
   the top. Its circle keeps the .xtoast-progress name (toast-island.js resumes
   it by that name). */
.xtoast-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  rotate: -90deg;
  pointer-events: none;
}
.xtoast-progress {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  animation-name: xtoast-ring;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
/* Hover / press-hold pauses both the JS dismiss timer and this ring, in lockstep. */
.xtoast.is-held .xtoast-progress,
.xtoast:hover .xtoast-progress { animation-play-state: paused; }

/* While a finger is dragging the toast, kill the entrance transition so it tracks
   the pointer 1:1 (JS sets the transform inline). */
.xtoast.is-dragging { transition: none; }

@keyframes xtoast-ring { to { stroke-dashoffset: -100; } }
@keyframes xtoast-pop { from { scale: 0.8; } }
@keyframes xtoast-draw { from { stroke-dashoffset: 1; } }

@media (prefers-reduced-motion: reduce) {
  .xtoast { transition: opacity 0.2s ease; transform: none; }
  .xtoast-in, .xtoast-out { transform: none; }
  .xtoast-in > .xtoast-icon,
  .xtoast-in > .xtoast-icon .xtoast-tick { animation: none; }
  /* Presses still show, without the travel or the bounce. */
  .xisland-bg,
  .xisland-slot,
  .xisland-row-open,
  .xtoast-close,
  .xisland-more,
  .xtoast-action { transition: none; }
  /* The island script skips its own motion here too; this is only the snap-back. */
  .xisland { transition: none; }
}
