/* Notifications (web/notify.js): header bell with badge, #notifiche center and preferences. */

/* ---------- Header bell ----------
 * The header keeps logo + city chip + actions on one line (app.css, "Header on phones"). With the bell there
 * are three round actions: below 400px the info button leaves the header (it stays in Altro › "Cosa puoi fare
 * adesso"), so the city name keeps room at 360px. */
.ntf-bell { position: relative; }
.ntf-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--color-accent-ink); font: 800 var(--type-caption-size)/1 var(--font); letter-spacing: 0; border: 2px solid var(--bg); pointer-events: none; animation: ntf-pop .25s var(--ease); }
@keyframes ntf-pop { from { transform: scale(.4); } to { transform: none; } }
@media (max-width: 400px) {
  .app-header .app-header-actions [data-action="about"] { display: none; }
}

.ntf-i { width: 18px; height: 18px; flex: none; }
.ntf-page { min-width: 0; }
.ntf-intro { padding-bottom: 12px; }
.ntf-fine { color: var(--muted); font-size: var(--type-caption-size); line-height: 1.45; margin: 6px 0 0; }

/* Tabs */
/* Notifiche | Preferenze is the segmented control of §4.3 */
.ntf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); max-width: 480px; padding: var(--space-1); border-radius: var(--radius-pill); background: var(--color-surface-2); margin: 0 0 var(--space-5); }
.ntf-tabs a { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; border-radius: var(--radius-pill); border: var(--border-width) solid transparent; text-decoration: none; font: var(--type-label); color: var(--color-ink-2); }
.ntf-tabs a.is-active { background: var(--color-surface); color: var(--color-ink); border-color: var(--color-outline); box-shadow: var(--elevation-1); }
.ntf-tab-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--accent); color: var(--color-accent-ink); font-size: var(--type-caption-size); font-weight: 800; }

/* Consent card */
.ntf-consent { display: flex; gap: var(--space-4); align-items: flex-start; margin: 0 0 var(--space-4); }
.ntf-consent h2 { font: 650 var(--type-display-s-size)/1.2 var(--display); margin: 2px 0 6px; font-stretch: var(--display-stretch);}
.ntf-consent p { color: var(--ink-2); font-size: var(--type-label-size); margin: 0; }
.ntf-consent .ntf-fine { color: var(--muted); font-size: var(--type-caption-size); margin-top: 8px; }
.ntf-consent .actions { margin-top: 12px; }
.ntf-consent-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.ntf-consent-icon .ntf-i { width: 22px; height: 22px; }

/* Community shortcut */
.ntf-social { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-3) var(--space-4); margin: 0 0 var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface); border: var(--border-width) solid var(--color-outline); box-shadow: var(--elevation-3); text-decoration: none; color: inherit; min-width: 0; }
.ntf-social-icon { width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--color-blue-soft); color: var(--color-blue); }
.ntf-social-copy { display: grid; flex: 1; min-width: 0; }
.ntf-social-copy strong { font-size: var(--type-body-size); }
.ntf-social-copy small { color: var(--muted); font-size: var(--type-caption-size); font-weight: 600; }
.ntf-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--color-accent-ink); font-size: var(--type-caption-size); font-weight: 800; flex: none; }
.ntf-chevron { color: var(--muted); }

/* List */
.ntf-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 4px; color: var(--muted); font-size: var(--type-body-s-size); font-weight: 700; }
.ntf-toolbar .text-button .ntf-i { width: 16px; height: 16px; }
.ntf-day { margin: 14px 0 0; }
.ntf-day .app-menu-title { margin: 0 0 8px; }
.ntf-list { display: grid; border-radius: var(--radius-lg); background: var(--color-surface); border: var(--border-width) solid var(--color-outline); box-shadow: var(--elevation-3); overflow: hidden; }
.ntf-item { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; text-decoration: none; color: inherit; background: transparent; min-width: 0; transition: background .15s; }
.ntf-item + .ntf-item { border-top: 1px solid var(--line); }
.ntf-item:hover { background: var(--color-surface-2); }
.ntf-item.is-unread { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.ntf-lead { --nc: var(--accent); width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: var(--type-display-s-size); line-height: 1; background: color-mix(in srgb, var(--nc) 18%, var(--surface)); }
.ntf-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ntf-copy strong { font-size: var(--type-body-size); line-height: 1.3; overflow-wrap: anywhere; }
.ntf-body { color: var(--ink-2); font-size: var(--type-body-s-size); line-height: 1.4; overflow-wrap: anywhere; }
.ntf-copy small { color: var(--muted); font-size: var(--type-caption-size); font-weight: 650; margin-top: 2px; }
.ntf-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--accent); margin-top: 6px; }

/* Preferences */
.ntf-form { display: grid; gap: 12px; }
.ntf-block { padding: var(--space-5); border-radius: var(--radius-lg); background: var(--color-surface); border: var(--border-width) solid var(--color-outline); box-shadow: var(--elevation-3); min-width: 0; }
.ntf-block + .ntf-block, .ntf-form + .ntf-block { margin-top: 12px; }
.ntf-form .ntf-block + .ntf-block { margin-top: 0; }
.ntf-block-head { display: flex; align-items: flex-start; gap: 12px; }
.ntf-block-head > div { flex: 1; min-width: 0; }
.ntf-block-head h2 { font-size: var(--type-title-size); margin: 2px 0 2px; }
.ntf-block-head .button { flex: none; }
.ntf-block-icon { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.ntf-state { display: flex; align-items: center; gap: 5px; margin: 0; font-size: var(--type-body-s-size); font-weight: 750; }
.ntf-state.is-on { color: var(--ok); }
.ntf-state.is-off { color: var(--warn); }
.ntf-state.is-muted { color: var(--muted); }
.ntf-state .ntf-i { width: 15px; height: 15px; }
.ntf-consent-state .text-button, .ntf-consent-state .button { margin-top: 8px; }
.ntf-switches { margin-top: 6px; }
.ntf-switch { display: flex; align-items: center; gap: var(--space-4); min-height: 56px; padding: var(--space-3) 0; cursor: pointer; min-width: 0; }
.ntf-switch + .ntf-switch { border-top: 1px solid var(--line); }
.ntf-phone .ntf-switch { border-top: 1px solid var(--line); margin-top: 10px; }
.ntf-switch-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ntf-switch-copy strong { font-size: var(--type-body-size); }
.ntf-switch-copy small { color: var(--muted); font-size: var(--type-caption-size); line-height: 1.4; font-weight: 600; }
.ntf-quiet { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.ntf-quiet .field { margin: 8px 0 0; }
.ntf-empty .button { margin-top: 4px; }
