/* App mode: notifications the member controls and the native polish around them (assets/css/app.css has the tokens).
   - Settings > Notifications (settings-email.php): this device's switch, push per kind, e-mail per kind
   - the permission sheets (assets/js/native-app.js: appPush/appLocation, .app-ask inside .app-sheet)
   - the bell's panel as a sheet on phones (assets/js/member-notifications.js, main/notification.php)
   - pull to refresh (assets/js/app-ptr.js)
   Phone-layout rules sit inside the phone media query; wider screens keep their look. */

/* ---- any width ---- */
.app-push-card > form {margin:0;}
.app-push-subhead {margin:18px 0 2px;color:var(--ui-muted);font-size:13px;font-weight:650;line-height:1.4;}
.member-app .app-push-card .switch input:disabled + .lever {opacity:.5;cursor:default;}
.member-app .app-push-card .ui-option-hint.app-push-always {margin:12px 0 0;}
.app-push-status:empty {display:none;}

/* The explanation before a system prompt: illustration, title, one sentence, "Ja, gärn" / "Später". */
.app-ask {text-align:center;}
.app-ask img {display:block;width:min(100%,232px);height:auto;aspect-ratio:1;margin:0 auto 6px;border-radius:28px;object-fit:cover;
  -webkit-mask-image:radial-gradient(closest-side,#000 80%,transparent);mask-image:radial-gradient(closest-side,#000 80%,transparent);}
.app-sheet .app-ask h2 {margin:0 6px 6px;text-wrap:balance;}
.app-sheet .app-ask .app-sheet-text {margin:0 6px 16px;font-size:15.5px;text-wrap:pretty;}

/* The bell's panel on wider screens: headings only on phones, the illustrated empty state too. */
.app-notif-group,#notif_dropdown .app-notif-empty-art,#notif_dropdown .app-notif-empty-text {display:none;}
.app-notif-backdrop,.app-ptr {display:none;}

/* ---- phones ---- */
@media(max-width:675px) {
 /* The page never overscrolls: no browser refresh on top of the app's own, no bounce behind the bars. */
 html:has(> body.member-app) {overscroll-behavior-y:none;}

 /* Settings > Notifications */
 .member-app .ui-settings .app-push-device {border-bottom:1px solid var(--app-line);}
 .member-app .ui-settings .app-push-device .switch {border-bottom:0 !important;}
 .member-app .ui-settings .app-push-device .ui-option-hint {display:block;margin:-6px 0 14px;padding-right:66px;}
 .member-app .ui-settings .app-push-status {margin:0;padding:0 16px 12px;font-size:13px;}
 .member-app .ui-settings .app-push-subhead {margin:16px 0 2px;color:var(--app-mut);font:700 12px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.06em;text-transform:uppercase;}
 .member-app .ui-settings .app-push-card .ui-option-hint.app-push-always {margin:10px 0 0;padding:12px 0 0;border-top:1px solid var(--app-line);font-size:13px;line-height:1.45;}

 /* The bell's panel: a sheet from below the top bar to the bottom of the screen, over the dimmed page. */
 .app-notif-backdrop {display:block;position:fixed;inset:0;z-index:99;background:#05080cb3;opacity:0;transition:opacity .2s;touch-action:none;}
 .app-notif-backdrop.is-open {opacity:1;}
 #notif_dropdown.is-sheet {top:calc(var(--app-top) + var(--app-safe-top) + 6px) !important;left:0 !important;right:0;bottom:0;width:auto;max-width:none;max-height:none !important;
   padding:0 0 var(--app-safe-bottom);border:0;border-top:1px solid var(--app-line);border-radius:26px 26px 0 0;background:var(--app-deep);color:var(--app-text);
   box-shadow:0 -14px 40px #0009;transform:translateY(102%);transition:transform .26s var(--app-ease);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;}
 #notif_dropdown.is-sheet.is-open {transform:none;}
 #notif_dropdown.is-sheet::before {content:"";display:block;flex:none;width:44px;height:5px;margin:10px auto 2px;border-radius:3px;background:#3a4759;}
 #notif_dropdown.is-sheet .ui-notifications-heading {position:relative;padding:8px 20px 4px;border-bottom:0;}
 #notif_dropdown.is-sheet h2 {color:var(--app-text);font:800 22px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:-.01em;}
 /* The sheet closes with a swipe down, a tap beside it or Back (assets/js/app-shell.js): the cross stays for screen
    readers only. */
 #notif_dropdown.is-sheet [data-close-notifications] {position:absolute;width:1px;height:1px;min-width:0;min-height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);}
 #notif_dropdown.is-sheet [data-close-notifications] {border-radius:50%;color:var(--app-mut);font-size:26px;}
 #notif_dropdown.is-sheet .dt_notifis_prnt {flex:1;padding:0 8px 18px;scrollbar-width:none;}
 #notif_dropdown.is-sheet .app-notif-group {display:block;margin:14px 12px 4px;color:var(--app-mut);font:700 12.5px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.08em;text-transform:uppercase;}
 #notif_dropdown.is-sheet .app-notif-group:first-child {margin-top:6px;}
 #notif_dropdown.is-sheet .dt_notifs a {align-items:center;gap:14px;min-height:68px;padding:10px 12px;border-radius:16px;color:var(--app-text);-webkit-tap-highlight-color:transparent;}
 #notif_dropdown.is-sheet .dt_notifs a:hover {background:transparent;}
 #notif_dropdown.is-sheet .dt_notifs a:active {background:var(--app-raised);}
 #notif_dropdown.is-sheet .dt_notifs.noti_not_seen a {background:var(--app-teal-soft);background:#00aaaa1a;background:color-mix(in srgb,var(--app-teal) 10%,transparent);}
 #notif_dropdown.is-sheet .dt_notifs.noti_not_seen a::after {content:"";flex:none;width:9px;height:9px;margin-left:auto;border-radius:50%;background:var(--app-teal);}
 #notif_dropdown.is-sheet .avatar {flex:0 0 48px;width:48px;height:48px;background:var(--app-card);}
 #notif_dropdown.is-sheet .dt_notifs.is-system .avatar {border-radius:14px;}
 #notif_dropdown.is-sheet .n_detail {flex:1;}
 #notif_dropdown.is-sheet .n_detail p {margin:0 0 3px;color:var(--app-text);font-size:15px;line-height:1.4;}
 #notif_dropdown.is-sheet .n_detail b {font-weight:700;}
 #notif_dropdown.is-sheet .time {color:var(--app-mut);font-size:13px;}
 #notif_dropdown.is-sheet .ui-notifications-status {padding:32px 16px;color:var(--app-mut);}
 #notif_dropdown.is-sheet .app-notif-empty {display:flex;flex-direction:column;align-items:center;gap:8px;margin:0;padding:8px 20px 28px;background:none;color:var(--app-mut);font:400 15.5px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;text-align:center;}
 #notif_dropdown.is-sheet .app-notif-empty > svg {display:none !important;}
 #notif_dropdown.is-sheet .app-notif-empty-art {display:block;width:min(100%,260px);height:auto;aspect-ratio:1;margin:0 0 4px;border-radius:28px;object-fit:cover;
   -webkit-mask-image:radial-gradient(closest-side,#000 82%,transparent);mask-image:radial-gradient(closest-side,#000 82%,transparent);}
 #notif_dropdown.is-sheet .app-notif-empty-title {color:var(--app-text);font:800 22px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:-.01em;text-wrap:balance;}
 #notif_dropdown.is-sheet .app-notif-empty-text {display:block;max-width:300px;text-wrap:pretty;}

 /* Pull to refresh: a small wave chip slides out from under the top bar, fills while pulled, flows while loading. */
 .app-ptr {position:fixed;left:50%;top:calc(var(--app-top) + var(--app-safe-top));z-index:98;display:flex;align-items:center;gap:8px;box-sizing:border-box;height:40px;min-width:40px;padding:0 10px;
   border:1px solid var(--app-line);border-radius:20px;background:var(--app-card);color:var(--app-mut);font:600 13px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
   box-shadow:0 8px 24px #0008;opacity:0;transform:translate(-50%,-60px);pointer-events:none;transition:transform .24s var(--app-ease),opacity .2s;}
 .app-ptr.is-pulling {opacity:1;transition:none;}
 .app-ptr.is-loading {opacity:1;transition:transform .2s var(--app-ease);}
 .app-ptr-wave {display:grid;place-items:center;width:20px;height:20px;}
 .app-ptr-wave svg {width:20px;height:12px;overflow:visible;fill:none;stroke:var(--app-teal);stroke-width:3.2;stroke-linecap:round;stroke-dasharray:1 1;stroke-dashoffset:calc(1 - var(--app-ptr-pull,0));}
 .app-ptr.is-ready .app-ptr-wave svg {stroke:var(--app-blue);}
 .app-ptr.is-loading .app-ptr-wave svg {stroke:var(--app-teal);stroke-dasharray:.45 .25;animation:app-ptr-flow .9s linear infinite;}
 .app-ptr-label:empty {display:none;}
 .app-ptr-label {padding-right:4px;white-space:nowrap;}
}
@keyframes app-ptr-flow {to {stroke-dashoffset:-.7;}}
@media(prefers-reduced-motion:reduce) {
 #notif_dropdown.is-sheet,.app-notif-backdrop,.app-ptr,.app-ptr.is-loading {transition:none !important;}
 .app-ptr.is-loading .app-ptr-wave svg {animation:none;}
}
