/* The app shell: the install card, the offline banner, the notifications switch and the offline page.
   Navy, gold and ivory from lux.css; quiet, never in the way. */

/* ---------- install card (account area only) ---------- */
.sy-install {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: min(380px, calc(100% - 32px));
  padding: 20px;
  background: var(--lux-ink, #0b1220);
  border: 1px solid rgba(201, 169, 106, 0.45);
  box-shadow: 0 18px 48px rgba(4, 7, 14, 0.35);
  color: #fff;
  animation: sy-rise 0.35s ease-out;
}
.sy-install[hidden] { display: none; }
.sy-install__icon { flex: none; width: 44px; height: 44px; }
.sy-install__copy { min-width: 0; }
.sy-install__title { margin: 0; font-family: var(--lux-serif); font-size: 22px; font-weight: 500; line-height: 1.15; color: var(--lux-gold-soft, #e6d3a8); }
.sy-install__text { margin: 6px 0 0; color: rgba(255, 255, 255, 0.78); font-size: 14px; line-height: 1.5; }
.sy-install__actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; }
.sy-install__go,
.sy-install__later {
  min-height: 40px;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.sy-install__go { padding: 0 16px; background: var(--lux-gold, #c9a96a); border: 1px solid var(--lux-gold, #c9a96a); color: var(--lux-ink, #0b1220); }
.sy-install__go:hover { background: var(--lux-gold-soft, #e6d3a8); }
.sy-install__later { padding: 0 2px; background: none; border: 0; color: rgba(255, 255, 255, 0.72); }
.sy-install__later:hover { color: #fff; }
.sy-install button:focus-visible { outline: 2px solid var(--lux-gold-soft, #e6d3a8); outline-offset: 3px; }

@keyframes sy-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- offline banner (added by the service worker to a page kept on the device) ---------- */
.sy-offline-banner {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--lux-gold-soft, #e6d3a8);
  border-bottom: 1px solid var(--lux-gold, #c9a96a);
  color: var(--lux-ink, #0b1220);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
.sy-offline-banner__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8a6a2c; }
.sy-offline-banner__reload {
  padding: 4px 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.sy-offline-banner__reload:focus-visible { outline: 2px solid var(--lux-ink, #0b1220); outline-offset: 2px; }

/* ---------- small notices ---------- */
.sy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 12px 18px;
  background: var(--lux-ink, #0b1220);
  border: 1px solid rgba(201, 169, 106, 0.45);
  color: var(--lux-gold-soft, #e6d3a8);
  font-size: 14px;
  transform: translateX(-50%);
}
.sy-toast[hidden] { display: none; }

/* ---------- the notifications page ---------- */
.sy-notify-body { display: grid; gap: 20px; max-width: 860px; margin: 0 auto; padding: 56px 16px 96px; }
.sy-switch-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--lux-rule, #e8e3d6); border-bottom: 1px solid var(--lux-rule, #e8e3d6); }
.sy-switch-row__label { margin: 0; color: var(--lux-ink, #0b1220); font-size: 17px; font-weight: 600; }
.sy-switch {
  position: relative;
  flex: none;
  width: 56px;
  height: 32px;
  padding: 0;
  background: #c9c4b6;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.sy-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(4, 7, 14, 0.3);
  transition: transform 0.2s;
}
.sy-switch[aria-checked="true"] { background: var(--lux-ink, #0b1220); }
.sy-switch[aria-checked="true"]::after { background: var(--lux-gold, #c9a96a); transform: translateX(24px); }
.sy-switch[disabled] { opacity: 0.5; cursor: not-allowed; }
.sy-switch[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.sy-switch:focus-visible { outline: 2px solid #8a6a2c; outline-offset: 3px; }
.sy-devices__title { margin: 28px 0 0; color: var(--lux-ink, #0b1220); font-size: 15px; font-weight: 600; }
.sy-status { min-height: 1.5em; margin: 12px 0 0; color: var(--lux-text-mute, #6e6e73); font-size: 14px; }
.sy-devices { margin: 20px 0 0; padding: 0; list-style: none; }
.sy-devices li { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--lux-rule, #e8e3d6); }
.sy-devices li:last-child { border-bottom: 1px solid var(--lux-rule, #e8e3d6); }
.sy-devices form { margin: 0 !important; }
.sy-devices__meta { display: block; color: var(--lux-text-mute, #6e6e73); font-size: 13px; }
.sy-steps { margin: 16px 0 0; padding-left: 20px; color: var(--acct-text, #424245); font-size: 15px; line-height: 1.6; }
.sy-steps li + li { margin-top: 6px; }

/* ---------- the offline page ---------- */
.sy-offline { padding: 56px 16px 96px; background: var(--lux-ivory, #f6f3ec); }
.sy-offline__inner { max-width: 680px; margin: 0 auto; }
.sy-offline h2 { margin: 0 0 12px; font-family: var(--lux-serif); font-size: 30px; font-weight: 500; }
.sy-offline ul { margin: 0 0 32px; padding: 0; list-style: none; }
.sy-offline li { padding: 12px 0; border-top: 1px solid var(--lux-rule, #e8e3d6); color: var(--lux-text-mute, #6e6e73); font-size: 14px; }
.sy-offline li a { color: var(--lux-ink, #0b1220); font-size: 16px; font-weight: 600; }
.sy-offline a:focus-visible, .sy-offline button:focus-visible { outline: 2px solid #8a6a2c; outline-offset: 3px; }
.sy-offline__retry {
  min-height: 46px;
  padding: 0 22px;
  background: var(--lux-ink, #0b1220);
  border: 1px solid var(--lux-ink, #0b1220);
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 600px) {
  .sy-install { right: 16px; bottom: 16px; padding: 16px; }
  .sy-notify-body { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .sy-install { animation: none; }
  .sy-switch, .sy-switch::after { transition: none; }
}
