/* Power & Sun Sizing Tool as an installable app: "Get the app" page, install buttons, offline notice. */

/* Shown or hidden by what this browser can do (classes set by sizing/app.js). */
.app-if-can-install, .app-if-in-app, .app-if-installed { display: none !important; }
html.can-install .app-if-can-install { display: inline-flex !important; }
html.is-app .app-if-in-app, html.app-installed .app-if-installed { display: block !important; }
html.is-app .app-hide-in-app, html.can-install .app-hide-if-can-install { display: none !important; }

/* Link to the install page in the sizing tool's page header. */
.app-get { margin: 16px 0 0; }
.app-get a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; }
.app-get a:hover, .app-get a:focus-visible { background: rgba(255, 255, 255, .14); }
.app-get svg { width: 16px; height: 16px; flex: none; }

/* "Get the app" page. */
.app-page { padding: clamp(28px, 4vw, 56px) 0 clamp(40px, 6vw, 80px); }
.app-card { display: grid; grid-template-columns: auto 1fr; gap: 20px 24px; align-items: center; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line, #e5e9f1); border-radius: var(--radius-lg, 24px); background: #fff; box-shadow: var(--shadow-sm, 0 2px 10px rgba(7, 26, 61, .06)); }
.app-card__icon { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line, #e5e9f1); box-shadow: var(--shadow-sm, 0 2px 10px rgba(7, 26, 61, .06)); }
.app-card h2 { margin: 0 0 4px; font-size: clamp(20px, 2.2vw, 26px); color: var(--ink, #0d1b33); }
.app-card p { margin: 0; color: var(--text, #3a4558); }
.app-card__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.app-card__note { grid-column: 1 / -1; padding: 12px 16px; border-radius: var(--radius-sm, 10px); background: var(--tint, #f3f6fc); font-size: 14.5px; }
.app-card__note--ok { background: #e8f6ee; color: #0c5b36; font-weight: 600; }

.app-devices-title { margin: clamp(32px, 4vw, 52px) 0 6px; font-size: clamp(20px, 2.2vw, 26px); color: var(--ink, #0d1b33); }
.app-devices-sub { margin: 0 0 20px; color: var(--muted, #687389); }
.app-devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.app-device { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line, #e5e9f1); border-radius: var(--radius, 16px); background: #fff; scroll-margin-top: 110px; }
.app-device:target { border-color: var(--brand-orange, #F05A2D); box-shadow: 0 0 0 3px rgba(240, 90, 45, .16); }
.app-device__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.app-device__head svg { width: 34px; height: 34px; flex: none; color: var(--brand-blue, #134C97); }
.app-device h3 { margin: 0; font-size: 18px; color: var(--ink, #0d1b33); }
.app-device__yours { display: none; margin-inline-start: auto; padding: 3px 10px; border-radius: 999px; background: var(--ivory, #fff9f0); border: 1px solid var(--amber, #FAAE43); color: #8a4b00; font-size: 12px; font-weight: 600; white-space: nowrap; }
.app-device ol { margin: 0 0 16px; padding-inline-start: 20px; color: var(--text, #3a4558); font-size: 15px; }
.app-device li { margin-bottom: 8px; }
.app-device li::marker { color: var(--brand-orange, #F05A2D); font-weight: 700; }
.app-device__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.app-device__install { display: none !important; }

/* The card for the device in hand comes first, is marked, and carries the install button. */
html[data-app-platform="android"] #android, html[data-app-platform="ios"] #ios,
html[data-app-platform="windows"] #windows, html[data-app-platform="mac"] #mac { order: -1; border-color: var(--amber, #FAAE43); }
html[data-app-platform="android"] #android .app-device__yours, html[data-app-platform="ios"] #ios .app-device__yours,
html[data-app-platform="windows"] #windows .app-device__yours, html[data-app-platform="mac"] #mac .app-device__yours { display: inline-block; }
html.can-install[data-app-platform="android"] #android .app-device__install, html.can-install[data-app-platform="windows"] #windows .app-device__install,
html.can-install[data-app-platform="mac"] #mac .app-device__install { display: inline-flex !important; }

.app-facts { margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.app-facts li { padding: 16px 18px; border-radius: var(--radius-sm, 10px); background: var(--tint, #f3f6fc); color: var(--text, #3a4558); font-size: 15px; }
.app-facts strong { display: block; color: var(--ink, #0d1b33); margin-bottom: 2px; }

@media (max-width: 560px) {
  .app-card { grid-template-columns: 1fr; text-align: start; }
  .app-card__icon { width: 76px; height: 76px; border-radius: 18px; }
}

/* Notice while the device is offline. */
.app-offline { position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 9999; margin: 0 auto; max-width: 560px; padding: 12px 16px; border-radius: 12px; background: #0d1b33; color: #fff; font-size: 14.5px; line-height: 1.4; text-align: center; box-shadow: 0 12px 32px -12px rgba(7, 26, 61, .5); }
.app-offline[hidden] { display: none; }
