/* 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: #fff; font: 800 10px/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: 12.5px; line-height: 1.45; margin: 6px 0 0; }

/* Tabs */
.ntf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin: 0 0 16px; }
.ntf-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: var(--r-pill); text-decoration: none; font-weight: 750; font-size: 14px; color: var(--muted); }
.ntf-tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-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: #fff; font-size: 11px; font-weight: 800; }

/* Consent card */
.ntf-consent { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 14px; background: radial-gradient(120% 90% at 0% 0%, var(--accent-soft) 0%, transparent 65%), var(--surface); }
.ntf-consent h2 { font: 650 20px/1.2 var(--display); margin: 2px 0 6px; font-stretch: var(--display-stretch);}
.ntf-consent p { color: var(--ink-2); font-size: 14px; margin: 0; }
.ntf-consent .ntf-fine { color: var(--muted); font-size: 12.5px; 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: 12px; padding: 12px 14px; margin: 0 0 16px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); text-decoration: none; color: inherit; min-width: 0; }
.ntf-social-icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); }
.ntf-social-copy { display: grid; flex: 1; min-width: 0; }
.ntf-social-copy strong { font-size: 15px; }
.ntf-social-copy small { color: var(--muted); font-size: 12.5px; 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: #fff; font-size: 11.5px; 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: 13px; 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(--r-lg); background: var(--surface); border: var(--card-border); 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(--bg-elev); }
.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: 21px; 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: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.ntf-body { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.ntf-copy small { color: var(--muted); font-size: 12px; 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: 16px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); 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: 16.5px; 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: 13px; 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: 14px; padding: 12px 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: 14.5px; }
.ntf-switch-copy small { color: var(--muted); font-size: 12.5px; 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-quiet input[type="time"] { width: 100%; min-height: 46px; padding: 0 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--bg-elev); color: var(--ink); font-weight: 700; font-size: 15px; }
.ntf-empty .button { margin-top: 4px; }
.ntf-switch input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; margin: 0; position: relative; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer; transition: background .18s var(--ease); }
.ntf-switch input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.ntf-switch input[role="switch"]:checked { background: var(--ok); box-shadow: none; }
.ntf-switch input[role="switch"]:checked::after { transform: translateX(20px); }
