/* ── Notification balloons (Windows-style toast) ── */
.notify-center {
  position: fixed;
  right: 16px;
  bottom: calc(var(--taskbar-h) + 16px);
  z-index: 250;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.notify-toast {
  --notify-accent: var(--accent);
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0 12px;
  padding: 14px 14px 14px 16px;
  background: rgba(32, 32, 32, 0.82);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: notify-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom right;
}

.notify-toast.is-leaving {
  animation: notify-leave 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.notify-toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--notify-accent), color-mix(in srgb, var(--notify-accent) 60%, transparent));
  border-radius: 10px 0 0 10px;
}

.notify-toast--info    { --notify-accent: #0078d4; }
.notify-toast--success { --notify-accent: #6ccb5f; }
.notify-toast--warning { --notify-accent: #f5a623; }
.notify-toast--error   { --notify-accent: #e74856; }
.notify-toast--release { --notify-accent: #7c6cf0; }

.notify-toast-icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--notify-accent) 18%, transparent);
  color: var(--notify-accent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--notify-accent) 25%, transparent);
}

.notify-toast-icon svg {
  width: 22px;
  height: 22px;
}

.notify-toast-content {
  min-width: 0;
  padding-top: 1px;
}

.notify-toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 3px;
}

.notify-toast-message {
  font-size: 0.75rem;
  color: var(--text-2);
  line-height: 1.45;
}

.notify-toast-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.notify-toast-action {
  grid-column: auto;
  margin-top: 0;
  border: none;
  background: color-mix(in srgb, var(--notify-accent) 14%, transparent);
  color: var(--notify-accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  justify-self: start;
  transition: background 0.12s;
}

.notify-toast-action:hover {
  background: color-mix(in srgb, var(--notify-accent) 24%, transparent);
}

.notify-toast-action--ghost {
  background: transparent;
  color: var(--text-3);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.notify-toast-action--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}

.notify-toast-close {
  grid-row: 1;
  grid-column: 3;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
  align-self: start;
}

.notify-toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
}

.notify-toast-progress {
  position: absolute;
  left: 4px;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  transform-origin: left center;
}

.notify-toast-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--notify-accent), color-mix(in srgb, var(--notify-accent) 70%, white));
  transform: scaleX(1);
  transform-origin: left center;
  animation: notify-progress var(--notify-duration, 7s) linear forwards;
}

.notify-toast.is-paused .notify-toast-progress-bar {
  animation-play-state: paused;
}

@keyframes notify-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes notify-enter {
  from {
    opacity: 0;
    transform: translateX(24px) translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes notify-leave {
  to {
    opacity: 0;
    transform: translateX(20px) scale(0.96);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .notify-center {
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* ── Reminder centrale (a schermo intero) ── */
.notify-reminder-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.notify-reminder-overlay[hidden] {
  display: none !important;
}

.notify-reminder {
  --notify-accent: #f5a623;
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 28px 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--notify-accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(40, 42, 48, 0.99), rgba(26, 28, 32, 0.99));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
  animation: notify-reminder-enter 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.notify-reminder.is-leaving {
  animation: notify-reminder-leave 0.26s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.notify-reminder--info     { --notify-accent: #3a9be8; }
.notify-reminder--success  { --notify-accent: #6ccb5f; }
.notify-reminder--warning  { --notify-accent: #f5a623; }
.notify-reminder--error    { --notify-accent: #e74856; }
.notify-reminder--reminder { --notify-accent: #f0a92b; }

.notify-reminder-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--notify-accent);
  background: color-mix(in srgb, var(--notify-accent) 16%, transparent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--notify-accent) 8%, transparent);
}

.notify-reminder-icon svg {
  width: 30px;
  height: 30px;
}

.notify-reminder-body {
  min-width: 0;
  width: 100%;
}

.notify-reminder-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--notify-accent);
  margin-bottom: 6px;
}

.notify-reminder-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.notify-reminder-message {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.5;
}

.notify-reminder-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
}

.notify-reminder-link {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 11px;
  padding: 11px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.12s;
}

.notify-reminder-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.notify-reminder-ok {
  margin-top: 0;
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: var(--notify-accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--notify-accent) 32%, transparent);
  transition: filter 0.12s, transform 0.08s;
}

.notify-reminder-ok:hover {
  filter: brightness(1.07);
}

.notify-reminder-ok:active {
  transform: translateY(1px);
}

@keyframes notify-reminder-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notify-reminder-leave {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}
