/* DP Mail - installable app: install banner, This device settings, app lock, Open in… (see pwa-addon js). */
[data-dpm-pwa-hidden] { display: none !important; }

/* installed app: respect the phone's notch / home bar */
html.dpm-standalone body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }

.dpm-install {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 110;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--panel, #fff); color: var(--text); border: 1px solid var(--line, #e4e7ec); border-radius: 14px;
  box-shadow: 0 10px 30px #0f192833; max-width: 520px; margin: 0 auto;
}
.dpm-install img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dpm-install-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 13px; line-height: 1.3; }
.dpm-install-txt span { color: var(--muted); font-size: 12.5px; }
.dpm-install-x { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 6px; cursor: pointer; }

.dpm-pwa-panel { display: flex; flex-direction: column; gap: 16px; }
.dpm-pwa-sec { display: flex; flex-direction: column; gap: 12px; }
.dpm-pwa-sec > .btn { align-self: flex-start; }
.dpm-pwa-sec .field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; max-width: 320px; }
.dpm-pwa-msg { margin: 0; font-size: 13.5px; color: var(--ok-fg, #067647); }
.dpm-pwa-msg.bad { color: var(--bad-fg, #B42318); }
.dpm-pwa-warn { margin: 0; font-size: 13px; color: var(--warn-fg, #93370D); background: var(--warn-bg, #FEF0C7); padding: 8px 10px; border-radius: 8px; }
.dpm-pwa-small { margin: 0; font-size: 12.5px; }

/* Open in… on attachments (phones) */
.att-card .dpm-pwa-share {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; align-self: stretch;
  border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--text);
  padding: 0 9px; font: 500 12px/1 var(--font-ui, system-ui, sans-serif); cursor: pointer;
}

/* app lock */
html.dpm-locked body { overflow: hidden; }
.dpm-lock { position: fixed; inset: 0; z-index: 2147483000; background: var(--bg, #f5f7fb); color: var(--text, #0f1a2b); display: grid; place-items: center; padding: 24px;
  font: 15px/1.5 var(--font-ui, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); }
.dpm-lock button { font-family: inherit; }
.dpm-lock-box { text-align: center; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dpm-lock-box img { width: 72px; height: 72px; border-radius: 18px; }
.dpm-lock-box h2 { margin: 6px 0 0; font-size: 20px; }
.dpm-lock-box p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.dpm-lock-btn { height: 44px; min-width: 160px; font-size: 15px; justify-content: center; }
.dpm-lock-out { margin-top: 18px; border: 0; background: transparent; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; }

/* sheets and toasts */
.dpm-pwa-veil { position: fixed; inset: 0; z-index: 120; background: #0a142266; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .dpm-pwa-veil { align-items: center; } }
.dpm-pwa-sheet { width: min(440px, 100%); background: var(--panel, #fff); color: var(--text); border-radius: 16px 16px 0 0; padding: 18px 18px calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .dpm-pwa-sheet { border-radius: 14px; } }
.dpm-pwa-sheet h3 { margin: 0 0 8px; font-size: 16px; }
.dpm-pwa-sheet ol { margin: 0 0 14px; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.dpm-pwa-sheet .btn { width: 100%; height: 42px; justify-content: center; }
.dpm-pwa-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2147483001; max-width: min(92vw, 520px); background: #0f1a2b; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 30px #0006; transition: opacity .3s; }
.dpm-pwa-toast.bad { background: #912018; }
.dpm-pwa-toast.out { opacity: 0; }
