/* Global in-portal meeting reminders, loaded by every protected app-v3 page.

   Top-center stack that slides down from the top edge (every page, My Work
   included -- the former My Work-only "notch" and the old top-right card are
   gone). Solid raised surface: Light #FFFFFF / Dark #2A262C. Above the sticky
   project header and side panels (sheet backdrop 1090, floating button 1080),
   below modals (1100). Guarded by tests/test_meeting_reminders_ui_browser.py. */

.global-meeting-reminders {
  --mr-surface: #ffffff;
  --mr-border: #e6e1db;
  --mr-text: #24211e;
  --mr-text-2: #5c5752;
  --mr-hover: #f1eeea;
  --mr-accent: var(--accent, #ff5a00);
  --mr-on-accent: #ffffff;
  --mr-shadow: 0 12px 32px rgba(30, 25, 20, 0.16), 0 2px 6px rgba(30, 25, 20, 0.06);

  position: fixed;
  top: calc(16px + var(--safe-top, 0px));
  left: 50%;
  z-index: 1098;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(520px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

html[data-theme="dark"] .global-meeting-reminders {
  --mr-surface: #2a262c;
  --mr-border: rgba(255, 255, 255, 0.12);
  --mr-text: #f3efea;
  --mr-text-2: #b3aca5;
  --mr-hover: #34303a;
  --mr-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.global-meeting-reminders:empty { display: none; }

.global-meeting-reminder {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  grid-template-areas:
    "signal eyebrow dismiss"
    ".      title   title"
    ".      time    time"
    ".      actions actions";
  align-items: center;
  column-gap: 8px;
  box-sizing: border-box;
  padding: 12px 12px 14px 14px;
  border: 1px solid var(--mr-border);
  border-radius: 16px;
  background: var(--mr-surface);
  color: var(--mr-text);
  box-shadow: var(--mr-shadow);  /* shadow-lg */
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-24px);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.global-meeting-reminder.is-in { opacity: 1; transform: none; }

.global-meeting-reminder.is-leaving {
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  border-top-width: 0;
  border-bottom-width: 0;
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity 200ms ease-in, transform 200ms ease-in, height 200ms ease, padding 200ms ease,
    margin 200ms ease, border-width 200ms ease;
}

/* One stack: meeting reminders always on top (time-critical), then mention
   toasts (manage_notifications.js; older on top, newer below). */
.global-meeting-reminders__more { order: 1; }
.global-meeting-reminder.mention-toast { order: 2; }
.mention-toasts__more { order: 3; }

.global-meeting-reminder__heading { display: contents; }

.global-meeting-reminder__signal {
  grid-area: signal;
  display: inline-flex;
  color: var(--mr-text-2);
}

.global-meeting-reminder__eyebrow {
  grid-area: eyebrow;
  margin: 0;
  color: var(--mr-text-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.global-meeting-reminder__dismiss {
  grid-area: dismiss;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mr-text-2);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.global-meeting-reminder__dismiss:hover { background: var(--mr-hover); color: var(--mr-text); }

.global-meeting-reminder__title {
  grid-area: title;
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--mr-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.global-meeting-reminder__time {
  grid-area: time;
  margin: 2px 0 0;
  color: var(--mr-text-2);
  font-size: 13px;
}

.global-meeting-reminder__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.global-meeting-reminder__join,
.global-meeting-reminder__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.global-meeting-reminder__join { border: 1px solid var(--mr-accent); background: var(--mr-accent); color: var(--mr-on-accent); }
.global-meeting-reminder__join:hover { filter: brightness(0.95); }
.global-meeting-reminder__copy { border: 1px solid var(--mr-border); background: var(--mr-surface); color: var(--mr-text); }
.global-meeting-reminder__copy:hover { background: var(--mr-hover); }

.global-meeting-reminder button:focus-visible {
  outline: 2px solid var(--mr-accent);
  outline-offset: 2px;
}

.global-meeting-reminders__more {
  align-self: center;
  margin: 0;
  padding: 4px 12px;
  border: 1px solid var(--mr-border);
  border-radius: 999px;
  background: var(--mr-surface);
  color: var(--mr-text-2);
  box-shadow: var(--mr-shadow);
  font-size: 12px;
  font-weight: 700;
  pointer-events: auto;
}

@media (max-width: 600px) {
  .global-meeting-reminder__actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Reduced motion: fade only. */
@media (prefers-reduced-motion: reduce) {
  .global-meeting-reminder,
  .global-meeting-reminder.is-leaving { transform: none; }
  .global-meeting-reminder.is-leaving { padding-top: 12px; padding-bottom: 14px; border-top-width: 1px; border-bottom-width: 1px; transition: opacity 200ms ease; }
}
