/* "Connect your calendar" (js/app.js showCalendarSyncReminderToast). It had no
   stylesheet at all (owner 2026-10-18: "Connect button seems undeveloped").
   2026-10-19 (owner: "redesign connect calendar to look more like welcome"):
   the welcome card's look (css/first-run.css .local-only-banner-inner), so the
   two bottom cards read as one family: white card, teal hairline with a 3px
   teal left edge, teal-tinted shadow, a round tinted icon, the words in the
   card's quiet ink with a teal title, a corner close, and the teal gradient
   button. On phones the welcome's two rows: icon + words + close, then the
   button across the card. It steps aside while a window is open, like the
   other floating cards (review U4). */
.calendar-sync-toast {
  position: fixed; z-index: 9000; left: 0; right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.calendar-sync-toast.visible { opacity: 1; transform: none; }
.calendar-sync-toast-inner {
  pointer-events: auto;
  max-width: 560px; margin: 0 auto; box-sizing: border-box;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px 12px 16px;
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--primary-200, #99f6e4);
  border-left: 3px solid var(--primary-500, #14b8a6);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
}
.calendar-sync-toast .toast-icon {
  flex-shrink: 0; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-50, #f0fdfa);
  border: 1px solid var(--primary-100, #ccfbf1);
  border-radius: var(--radius-full, 9999px);
  font-size: 15px; color: var(--primary-600, #0d9488);
}
.calendar-sync-toast .toast-message {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px;
  font-size: 13px; line-height: 1.45; color: var(--text-secondary, #475569);
}
.calendar-sync-toast .toast-message strong { font-weight: 650; color: var(--primary-700, #0f766e); }
.calendar-sync-toast .toast-connect-btn {
  appearance: none; border: none; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 8px 16px;
  border-radius: var(--radius-sm, 8px);
  font-family: inherit; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-500, #14b8a6) 0%, var(--accent-500, #06b6d4) 100%);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.25);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.calendar-sync-toast .toast-connect-btn:hover {
  filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
.calendar-sync-toast .toast-connect-btn:focus-visible,
.calendar-sync-toast .toast-dismiss-btn:focus-visible {
  outline: var(--focus-ring-width, 2px) solid var(--focus-ring, #2dd4bf);
  outline-offset: var(--focus-ring-offset, 2px);
}
.calendar-sync-toast .toast-dismiss-btn {
  appearance: none; border: none; cursor: pointer; flex-shrink: 0;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm, 8px); background: transparent;
  color: var(--text-muted, #64748b); font-size: 15px;
  transition: color 0.15s ease, background 0.15s ease;
}
.calendar-sync-toast .toast-dismiss-btn:hover { color: var(--text-primary, #1e293b); background: var(--slate-100, #f1f5f9); }

/* Phones: the welcome card's two rows (first-run.css ≈594). */
@media (max-width: 640px) {
  .calendar-sync-toast { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .calendar-sync-toast-inner {
    max-width: none; margin: 0 10px;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    column-gap: 10px; row-gap: 8px; padding: 10px 10px 10px 12px;
  }
  .calendar-sync-toast .toast-icon { grid-column: 1; grid-row: 1; width: 28px; height: 28px; font-size: 13px; }
  .calendar-sync-toast .toast-message { grid-column: 2; grid-row: 1; font-size: 12.5px; line-height: 1.35; }
  .calendar-sync-toast .toast-dismiss-btn {
    grid-column: 3; grid-row: 1; width: 28px; height: 28px;
    align-self: start; justify-self: end; margin: -2px -4px 0 0;
  }
  .calendar-sync-toast .toast-connect-btn { grid-column: 1 / -1; grid-row: 2; padding: 9px 12px; }
}

body.dark-mode .calendar-sync-toast-inner {
  background: var(--slate-800, #1e293b);
  border-color: var(--primary-800, #115e59);
  border-left-color: var(--primary-400, #2dd4bf);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
body.dark-mode .calendar-sync-toast .toast-icon {
  background: rgba(20, 184, 166, 0.14); border-color: rgba(45, 212, 191, 0.3); color: var(--primary-300, #5eead4);
}
body.dark-mode .calendar-sync-toast .toast-message { color: var(--slate-300, #cbd5e1); }
body.dark-mode .calendar-sync-toast .toast-message strong { color: var(--primary-300, #5eead4); }
body.dark-mode .calendar-sync-toast .toast-dismiss-btn:hover { color: var(--slate-100, #f1f5f9); background: rgba(148, 163, 184, 0.16); }
body:has(.modal.active) .calendar-sync-toast,
body:has(.modal-overlay) .calendar-sync-toast { display: none; }
