/* The few things only the web app shows. Everything else is the extension's own stylesheet.
   Same colours, type, shapes and slow transitions (tokens from base.css). */

/* The web app's own screens: signing in, "open in another tab", opening for the first time. */
.web-screen {
  position: fixed; inset: 0; z-index: 45; display: grid; /* under NoRush's own windows (50 and up), over the page */ place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg));
  animation: web-in var(--t-scene) var(--calm) both;
}
.web-screen-in { display: grid; justify-items: center; gap: 12px; max-width: 440px; text-align: center; }
.web-screen .logo { width: 48px; height: 48px; border-radius: 12px; background: url("../icons/icon.svg") center / contain no-repeat; }
.web-screen h1 { margin: 6px 0 0; font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: -.015em; }
.web-lede { margin: 0 0 8px; color: var(--ink-2); font-size: 15.5px; }
.web-wait { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 0; color: var(--ink-2); --c: var(--accent); }
@keyframes web-in { from { opacity: 0; } }

/* "In the Chrome extension" beside a setting that only does something there. */
.ext-note { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.ext-note a { color: var(--accent); }

/* The one quiet line that offers the extension (closed for 14 days with the x). */
.web-invite {
  display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 0 auto 10px; padding: 9px 10px 9px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink-2); font-size: 13.5px; animation: web-in var(--t-panel) var(--calm) both;
}
.web-invite .grow { flex: 1; }
.web-invite a.btn { white-space: nowrap; }
.web-invite.leaving { opacity: 0; transition: opacity var(--t-leave) var(--calm); }
body.focus-mode .web-invite, body.meeting-mode .web-invite, body.plan-ended .web-invite { display: none; }

/* Notifications in Settings and when a reminder is set. */
.web-notify { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.web-notify small { color: var(--ink-3); }
.web-notify a { color: var(--accent); }

@media (max-width: 560px) {
  .web-invite { border-radius: var(--r-lg); align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .web-screen, .web-invite { animation: none; }
}
html.reduce-motion .web-screen, html.reduce-motion .web-invite { animation: none; }

/* ---------- phones (docs/WEBAPP.md section 7) ----------
   The extension's pages were made for a computer's new tab. In the web app they also have to
   work from 360 pixels wide, by touch. One column, the big card first, nothing wider than the
   screen, and nothing that needs a mouse to hover over it. */
@media (max-width: 600px) {
  /* The top bar: your greeting on one line, the buttons on the next, spread across the width. */
  header.top { flex-wrap: wrap; row-gap: 12px; padding-top: 18px; }
  header.top .brand { flex: 1 1 100%; }
  header.top .greeting { white-space: normal; }
  header.top .top-actions { flex: 1 1 100%; justify-content: space-between; align-items: center; min-width: 0; }
  .cmd-btn { margin-right: 0; padding: 0; width: 44px; justify-content: center; }
  .cmd-btn .t, .cmd-btn .kbd { display: none; }
  .top-actions [id$="Slot"]:empty { display: none; }
  header.top .top-actions > * { flex: 0 1 auto; margin-left: 0; margin-right: 0; }
  header.top .top-actions .icon-btn, header.top .cmd-btn { min-width: 40px; width: 40px; }
  #pricingSlot, #acctSlot { border: 0; padding: 0; margin: 0; }
  .pricing-btn { padding: 0 8px; }
  /* One column that never grows wider than the screen. */
  main.page { grid-template-columns: minmax(0, 1fr); }
  /* The week of dots in the footer: a little closer together, so it fits. */
  .week { gap: 5px; }
  .foot-line { padding: 14px; }
  .web-invite { margin: 0 16px 10px; }
  /* Side panels (Settings, a task) fill the screen, inside a small margin. */
  .backdrop.sheet-mode { padding: 8px; }
  .sheet { width: calc(100vw - 16px); height: calc(100dvh - 16px); padding: 20px 18px 32px; }
  .sheet-foot { flex-wrap: wrap; }
  /* On a narrow screen a task row keeps its words: the round tick marks it done, and a tap on
     the task opens it, with Delete, Focus and everything else inside. */
  .row .actions { display: none; }
}
/* Touch screens: every button at least 44 pixels to tap, small ones at least 40. */
@media (pointer: coarse) {
  .icon-btn, .acct-avatar { min-width: 44px; min-height: 44px; }
  .icon-btn.sm { min-width: 40px; min-height: 40px; }
  .btn { min-height: 44px; }
  .btn.sm, .seg button, .si-tabs button { min-height: 40px; }
  .cmd-btn, .pricing-btn { min-height: 44px; }
  /* There is no hovering on a touch screen: on a wider one, a task's buttons are always there, quietly. */
  .row .actions { opacity: .75; }
  .daypick button, .dur { min-height: 40px; }
  /* Text links stay the same size but take a bigger tap, like the round "done" check does. */
  button.link { position: relative; }
  button.link::after { content: ""; position: absolute; inset: -8px -4px; }
}
