/* =========================================================================
   DisclosureIQ PWA stylesheet (May 2026)

   Loaded last so it can layer on top of the existing app + streamline
   layers. Brand: navy #0F1B2D + gold #C9A961. No em dashes.
   ========================================================================= */

/* Cross-document View Transitions: makes navigation feel native on
   browsers that support it (iOS Safari 18.2+, Chrome 126+). The default
   crossfade is conservative; named transitions on the hero card and tile
   grid can be added later. */
@view-transition {
  navigation: auto;
}

/* When running as an installed PWA, the document gets the
   diq-pwa-standalone class. Hide the marketing brokerage bar at the top
   on small screens so we feel app-native, not website-y. */
.diq-pwa-standalone .brokerage-bar {
  display: none;
}
.diq-pwa-standalone body {
  /* Pad for iOS notch / home indicator */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Window Controls Overlay (desktop installed PWA). When active, the
   title bar area is reserved by the OS and we get
   `--diq-titlebar-area-h` etc. Use the variable to pad content under it. */
.diq-wco-active .nav,
.diq-wco-active .brokerage-bar {
  padding-top: max(8px, var(--diq-titlebar-area-h, 0px));
}

/* ============================================================
   Update toast -- slides up from bottom-right when a new SW is ready
   ============================================================ */
.diq-pwa-toast {
  position: fixed;
  z-index: 100000;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 16px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: #0F1B2D;
  color: #FAF7F2;
  border-radius: 14px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  box-shadow: 0 14px 32px -10px rgba(15, 27, 45, 0.45);
  font-size: 13.5px;
  font-weight: 500;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.1, 1), opacity 240ms;
  max-width: calc(100vw - 32px);
}
.diq-pwa-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.diq-pwa-toast-text {
  letter-spacing: 0.1px;
}
.diq-pwa-toast-action {
  background: #C9A961;
  color: #0F1B2D;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
}
.diq-pwa-toast-action:hover { background: #d8b76e; }
.diq-pwa-toast-close {
  background: transparent;
  border: 0;
  color: rgba(250, 247, 242, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  margin-right: -4px;
  font-family: inherit;
  line-height: 1;
}
.diq-pwa-toast-close:hover { color: #FAF7F2; }
@media (prefers-reduced-motion: reduce) {
  .diq-pwa-toast { transition: opacity 0ms; transform: none; }
}

/* ============================================================
   Install pill -- Chromium beforeinstallprompt
   ============================================================ */
.diq-pwa-install-pill {
  position: fixed;
  z-index: 99999;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(80px, calc(env(safe-area-inset-bottom) + 80px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 14px;
  background: linear-gradient(135deg, #C9A961 0%, #B39847 100%);
  color: #0F1B2D;
  border: 0;
  border-radius: 999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 12px 28px -10px rgba(201, 169, 97, 0.5),
              0 4px 12px -4px rgba(15, 27, 45, 0.25);
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  transition: opacity 280ms cubic-bezier(0.2, 0.7, 0.1, 1),
              transform 280ms cubic-bezier(0.2, 0.7, 0.1, 1);
}
.diq-pwa-install-pill.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.diq-pwa-install-pill:hover {
  filter: brightness(1.05);
}
.diq-pwa-install-pill:active { transform: translateY(0) scale(0.97); }
.diq-pwa-install-pill svg {
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .diq-pwa-install-pill { transition: opacity 0ms; transform: translateY(0); }
  .diq-pwa-install-pill.is-visible { transform: translateY(0); }
}

/* ============================================================
   Always-on Install chip (top-right of page, before user generates)
   This is the SMALL persistent affordance so the user can see the PWA
   capability immediately, without waiting for the post-first-report
   prompt. Hidden when already running as an installed PWA.
   ============================================================ */
.diq-pwa-install-chip {
  position: fixed;
  top: max(12px, calc(env(safe-area-inset-top) + 8px));
  right: max(12px, env(safe-area-inset-right));
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  background: rgba(15, 27, 45, 0.92);
  color: #C9A961;
  border: 1px solid rgba(201, 169, 97, 0.45);
  border-radius: 999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px -6px rgba(15, 27, 45, 0.4);
  transition: transform 160ms, background 160ms, border-color 160ms;
}
.diq-pwa-install-chip:hover {
  transform: translateY(-1px);
  background: #0F1B2D;
  border-color: #C9A961;
}
.diq-pwa-install-chip:active { transform: translateY(0); }
.diq-pwa-install-chip svg { color: #C9A961; }
.diq-pwa-install-chip:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .diq-pwa-install-chip {
    /* Slightly smaller on phones so it doesn't crowd the brokerage bar */
    font-size: 10.5px;
    padding: 6px 11px 6px 9px;
  }
}
/* When the streamline reveal is showing the report iframe, drop the chip
   below the share trigger so they don't overlap. */
[data-screen="reveal"].is-active ~ .diq-pwa-install-chip,
.diq-pwa-standalone .diq-pwa-install-chip { display: none; }

/* ============================================================
   iOS Add-to-Home-Screen bottom sheet (Safari)
   ============================================================ */
.diq-pwa-ios-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 27, 45, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.2, 0.7, 0.1, 1);
}
.diq-pwa-ios-sheet.is-visible { opacity: 1; }
.diq-pwa-ios-sheet-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: 22px 22px 0 0;
  padding: 24px 22px max(28px, calc(env(safe-area-inset-bottom) + 18px));
  transform: translateY(110%);
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.1, 1);
  box-shadow: 0 -20px 40px -10px rgba(15, 27, 45, 0.25);
}
.diq-pwa-ios-sheet.is-visible .diq-pwa-ios-sheet-card {
  transform: translateY(0);
}
.diq-pwa-ios-sheet-card::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: rgba(15, 27, 45, 0.18);
  border-radius: 2px;
  margin: -8px auto 16px;
}
.diq-pwa-ios-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 27, 45, 0.06);
  border: 0;
  font-size: 16px;
  color: #0F1B2D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.diq-pwa-ios-sheet-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8C6E2E;
  margin-bottom: 6px;
  text-align: center;
}
.diq-pwa-ios-sheet-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #0F1B2D;
  margin: 0 0 8px;
  line-height: 1.22;
  text-align: center;
  letter-spacing: -0.2px;
}
.diq-pwa-ios-sheet-sub {
  font-size: 13.5px;
  color: #5A6470;
  line-height: 1.55;
  margin: 0 0 18px;
  text-align: center;
}
.diq-pwa-ios-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diq-pwa-ios-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #FAF7F2;
  border: 1px solid rgba(201, 169, 97, 0.22);
  border-radius: 12px;
  font-size: 14px;
  color: #0F1B2D;
}
.diq-pwa-ios-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0F1B2D;
  color: #C9A961;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.diq-pwa-ios-sheet-dismiss {
  width: 100%;
  background: rgba(15, 27, 45, 0.06);
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: #5A6470;
  cursor: pointer;
  margin-top: 4px;
}
.diq-pwa-ios-sheet-dismiss:hover { background: rgba(15, 27, 45, 0.1); }

@media (prefers-reduced-motion: reduce) {
  .diq-pwa-ios-sheet,
  .diq-pwa-ios-sheet-card { transition: opacity 0ms; transform: none; }
}
