/* Installable app (docs/PWA.md). The "Get the app" card, the iPhone guide, and the App settings. Uses the portal's own colours. */

/* ---------- the card in the side menu (above your name and the bell) ---------- */
.pwa-card { position: relative; margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #FFFFFF; }
.pwa-card + .side-user { margin-top: 0; }
.pwa-head { display: flex; align-items: center; gap: 10px; margin: 0 26px 8px 0; }
.pwa-mark { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 700 13px/1 var(--display, inherit); letter-spacing: .02em; overflow: hidden; }
.pwa-mark.big { width: 48px; height: 48px; border-radius: 11px; font-size: 17px; }
.pwa-mark.pwa-img img, .pwa-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pwa-title { font: 600 14px/1.3 var(--display, inherit); }
.pwa-text { margin: 0 0 12px; font-size: 13px; line-height: 1.45; color: var(--night-ink, #D0D5DD); }
.pwa-go { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: #FFFFFF; color: #101828; font: 600 14px var(--body, inherit); cursor: pointer; }
.pwa-go:hover { background: #F2F4F7; }
.pwa-go .ico { width: 16px; height: 16px; }
.pwa-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--night-ink, #98A2B3); cursor: pointer; padding: 0; }
.pwa-x:hover { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.pwa-x .ico { width: 14px; height: 14px; }
.pwa-card button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand, #0E7C7B) 55%, white); outline-offset: 2px; }

/* menu shrunk to icons: only the round Install button stays */
@media (min-width: 861px) {
  .layout.rail .pwa-card { padding: 0; background: none; border: 0; display: flex; justify-content: center; }
  .layout.rail .pwa-card .pwa-head, .layout.rail .pwa-card .pwa-text, .layout.rail .pwa-card .pwa-x { display: none; }
  .layout.rail .pwa-card .pwa-go { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
  .layout.rail .pwa-card .pwa-go > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* phones: one slim row */
@media (max-width: 860px) {
  .pwa-card { margin-top: 0; padding: 10px 44px 10px 12px; display: flex; align-items: center; gap: 12px; }
  .pwa-card .pwa-head { margin: 0; flex: 1 1 auto; min-width: 0; }
  .pwa-card .pwa-text { display: none; }
  .pwa-card .pwa-go { width: auto; flex: none; padding: 0 16px; }
  .pwa-card .pwa-x { top: 50%; transform: translateY(-50%); }
}

/* ---------- the iPhone and iPad guide ---------- */
.pwa-pop { position: fixed; inset: 0; z-index: 80; }
.pwa-dim { position: absolute; inset: 0; background: rgba(16, 24, 40, .55); }
.pwa-sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; max-height: calc(100vh - 24px); overflow-y: auto; box-sizing: border-box;
  background: #FFFFFF; color: #101828; border-radius: 22px 22px 0 0; padding: 12px 22px calc(26px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 16px; font-family: var(--body, inherit); }
@media (min-width: 640px) { .pwa-sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 22px; } }
.pwa-grip { width: 40px; height: 5px; border-radius: 3px; background: #D0D5DD; align-self: center; }
.pwa-sh-head { display: flex; align-items: center; gap: 12px; }
.pwa-sh-head h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.pwa-sh-head p { margin: 2px 0 0; font-size: 13px; color: #475467; }
.pwa-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pwa-step { display: flex; gap: 12px; align-items: center; background: #F8FAFA; border-radius: 12px; padding: 12px; }
.pwa-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #101828; color: #FFFFFF; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.pwa-st { flex: 1 1 auto; font-size: 14px; line-height: 1.4; }
.pwa-pic { flex: none; min-width: 48px; height: 48px; border-radius: 10px; background: #FFFFFF; border: 1px solid #EAECF0; display: grid; place-items: center; color: #101828; }
.pwa-pic .ico { width: 22px; height: 22px; }
.pwa-blue { color: #0A84FF; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-row { display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 11px; line-height: 1.2; max-width: 120px; }
.pwa-add { color: #0A84FF; font-weight: 600; font-size: 15px; padding: 0 10px; }
.pwa-note { margin: 0; font-size: 12px; line-height: 1.5; color: #475467; }
.pwa-ok { min-height: 48px; border: 0; border-radius: 10px; background: var(--brand, #0E7C7B); color: var(--brand-ink, #FFFFFF); font: 600 15px var(--body, inherit); cursor: pointer; }
.pwa-ok:focus-visible { outline: 3px solid #101828; outline-offset: 3px; }

/* ---------- App settings (Branding & settings › Brand › App, and Platform settings › App) ---------- */
.pwa-set .pwa-h { margin: 0 0 4px; }
.pwa-sub { margin: 0 0 16px; color: var(--muted, #475467); font-size: 14px; }
.pwa-switch-row { display: flex; align-items: center; gap: 20px; padding: 16px 18px; border: 1px solid var(--rule, #EAECF0); border-radius: 12px; background: var(--surface, #FFFFFF); }
.pwa-switch-row > div { flex: 1 1 auto; min-width: 0; }
.pwa-sw-label { font-weight: 600; font-size: 15px; }
.pwa-sw-help { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted, #475467); }
.pwa-switch { flex: none; width: 52px; height: 30px; padding: 3px; border: 0; border-radius: 15px; background: #98A2B3; display: flex; justify-content: flex-start; cursor: pointer; }
.pwa-switch[aria-checked="true"] { background: var(--brand, #0E7C7B); justify-content: flex-end; }
.pwa-knob { width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(16, 24, 40, .3); }
.pwa-switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand, #0E7C7B) 45%, #101828); outline-offset: 3px; }
.pwa-who { margin: 8px 0 18px; font-size: 12px; color: var(--muted, #475467); }
.pwa-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; transition: opacity .2s; }
.pwa-faded { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .pwa-grid { transition: none; } }
@media (max-width: 900px) { .pwa-grid { grid-template-columns: minmax(0, 1fr); } }
.pwa-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pwa-field label, .pwa-lbl { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.pwa-field input[type=text] { width: 100%; box-sizing: border-box; }
.pwa-name-h { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--muted, #475467); }
.pwa-count { flex: none; }
.pwa-iconrow { display: flex; gap: 16px; align-items: flex-start; }
.pwa-iconside { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.pwa-set label.pwa-drop { margin: 0; display: inline-flex; }
.pwa-drop { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px dashed var(--rule-strong, #98A2B3); border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--surface, #FFFFFF); }
.pwa-drop.over { border-style: solid; border-color: var(--brand, #0E7C7B); background: color-mix(in srgb, var(--brand, #0E7C7B) 8%, white); }
.pwa-drop .ico { width: 16px; height: 16px; }
.pwa-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pwa-drop:focus-within { outline: 3px solid color-mix(in srgb, var(--brand, #0E7C7B) 45%, #101828); outline-offset: 2px; }
.pwa-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted, #475467); }
.pwa-auto { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--brand, #0E7C7B) 7%, white); }
.pwa-auto p { margin: 0; font-size: 13px; line-height: 1.5; }
.pwa-tile { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font: 700 17px/1 var(--display, inherit); letter-spacing: .02em; overflow: hidden; border-radius: 11px; }
.pwa-tile.big { width: 96px; height: 96px; font-size: 32px; border-radius: 22px; }
.pwa-tile.round { border-radius: 50%; }
.pwa-tile.soft { border-radius: 9px; }
.pwa-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.pwa-state { margin-right: auto; font-size: 13px; font-weight: 600; color: #B54708; }
.pwa-state.pwa-ok-msg { color: #027A48; font-weight: 600; }
.pwa-prev { padding: 18px; border: 1px solid var(--rule, #EAECF0); border-radius: 12px; background: var(--surface, #FFFFFF); gap: 14px; }
.pwa-home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 8px; padding: 22px 16px; border-radius: 20px; background: #1D2939; justify-items: center; }
.pwa-ghost, .pwa-mine { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.pwa-ghost > span { width: 48px; height: 48px; border-radius: 12px; background: #475467; }
.pwa-ghost > i { width: 36px; height: 6px; border-radius: 3px; background: #475467; }
.pwa-mine .pwa-tile { box-shadow: 0 0 0 3px var(--sun, #FFC857); }
.pwa-hs-name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #FFFFFF; font-weight: 500; }
.pwa-shapes { display: flex; gap: 18px; flex-wrap: wrap; }
.pwa-shapes > span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #475467); }
.pwa-covers { margin-top: 20px; padding: 18px; border: 1px solid var(--rule, #EAECF0); border-radius: 12px; }
.pwa-covers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pwa-covers li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--paper, #F8FAFA); border-radius: 8px; font-size: 14px; }
.pwa-covers b { color: var(--muted, #475467); white-space: nowrap; }
.pwa-covers b.ok { color: #027A48; }
