/* Lovable design: Notifications page and Polls sheet. Every rule sits under :root[data-lovable]. */

/* ---------- colours and icons of the design, declared once ----------
   --d-sheet is the white of the design's sheets, --d-scrim the dim layer behind one. The icons are Lucide (ISC licence:
   static/lucide-LICENSE.txt), drawn as masks so they take the text colour of the surface they sit on. */
:root[data-lovable] { --d-sheet: #fff; --d-scrim: rgb(0 0 0 / .8);
  --d-ic-megaphone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z'/%3E%3Cpath d='M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14'/%3E%3Cpath d='M8 6v8'/%3E%3C/svg%3E");
  --d-ic-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 14h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 18h.01'/%3E%3Cpath d='M12 18h.01'/%3E%3Cpath d='M16 18h.01'/%3E%3C/svg%3E");
  --d-ic-message: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719'/%3E%3C/svg%3E");
  --d-ic-handshake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m11 17 2 2a1 1 0 1 0 3-3'/%3E%3Cpath d='m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4'/%3E%3Cpath d='m21 3 1 11h-2'/%3E%3Cpath d='M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3'/%3E%3Cpath d='M3 4h8'/%3E%3C/svg%3E");
  --d-ic-messages: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3Cpath d='M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1'/%3E%3C/svg%3E");
  --d-ic-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v16a2 2 0 0 0 2 2h16'/%3E%3Cpath d='M18 17V9'/%3E%3Cpath d='M13 17V5'/%3E%3Cpath d='M8 17v-3'/%3E%3C/svg%3E");
  --d-ic-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z'/%3E%3C/svg%3E");
  --d-ic-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E"); }
:root[data-lovable] .d-ic { flex: none; display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--d-ic-chart) center / contain no-repeat; mask: var(--d-ic-chart) center / contain no-repeat; }
:root[data-lovable] .d-ic[data-d-ic="cloud"] { -webkit-mask-image: var(--d-ic-cloud); mask-image: var(--d-ic-cloud); }
:root[data-lovable] .d-ic[data-d-ic="arrow"] { -webkit-mask-image: var(--d-ic-arrow); mask-image: var(--d-ic-arrow); }

/* ---------- Notifications (the app's Alerts screen) ----------
   Title bar: the back arrow, "Notifications" and the search alone (no bell on its own screen). */
:root[data-lovable] .app[data-screen="alerts"] .evbar .evbell { display: none; }
:root[data-lovable] .app[data-screen="alerts"] .evbar .evback .ic { width: 28px; height: 28px; stroke-width: 1.8; }
:root[data-lovable] .app[data-screen="alerts"] .evbar .screen { letter-spacing: normal; }
:root[data-lovable] .app[data-screen="alerts"] .evbar .evsearch { margin-left: 4px; padding-left: 0; }
/* no tab is the open one on this screen */
:root[data-lovable] .app[data-screen="alerts"] .tabbar :is(button, a):is(.on, .sub) { color: var(--tab-ink); box-shadow: none; }
@media (max-width: 767.98px) { :root[data-lovable] .app[data-screen="alerts"] .evbar .evsearch-btn { margin-right: -4px; } }

/* Not in the design: the time-zone line, the Pinned filter, the sign-in line, the "why" note and each card's kind label,
   pin button and "why" fold. They are hidden, not removed. "Mark all read" stays reachable: it shows beside the pills
   while "Unread" is chosen. */
:root[data-lovable] .alerts { position: relative; }
:root[data-lovable] .alerts > .row.between { display: none; position: absolute; top: 0; right: 0; margin: 0; }
:root[data-lovable] .alerts > .row.between > .muted { display: none; }
:root[data-lovable] .alerts.d-only-unread:has(.alert.unread) > .row.between { display: flex; }
:root[data-lovable] .alerts .alerts-read .btn { min-height: 32px; padding: 0 2px; border: 0; border-radius: var(--r-sm); background: none; box-shadow: none; color: var(--ink); font-size: 0.8125rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
:root[data-lovable] .alerts > p.small:has(a[href^="/login"]), :root[data-lovable] .alerts > p[data-why-alert], :root[data-lovable] .alerts .d-nsearch { display: none; } /* the category chips (.alert-filter) and each alert's "Why am I getting this?" stay: muting a category starts there (ALRT-12) */
:root[data-lovable] .alerts .alert-meta > .pill, :root[data-lovable] .alerts .alert-meta > form.alert-pin { display: none; }
:root[data-lovable] .alerts .alert.emergency .alert-meta > .pill:first-child { display: inline-flex; }

/* "All" / "Unread 5" pills (built by static/lovable-notify.js; they show and hide the app's own rows) */
:root[data-lovable] .d-nfilter { display: flex; gap: 8px; margin: -8px 0 19px; } /* 4px under the 56px title bar (the bar keeps a 12px gap below it) */
:root[data-lovable] .d-npill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font: inherit; font-size: 0.8125rem; font-weight: 500; line-height: 1.5; white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); cursor: pointer; -webkit-tap-highlight-color: transparent; }
:root[data-lovable] .d-npill::after { content: ""; position: absolute; inset: -4px 0; }
:root[data-lovable] .d-npill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
:root[data-lovable] .d-npill:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
:root[data-lovable] .d-ncount { font-size: 0.6875rem; }
:root[data-lovable] .d-ncount:empty { display: none; }

/* day headings and the list */
:root[data-lovable] .alerts .alert-list { margin: 0; gap: 12px; }
:root[data-lovable] .alerts .alert-list > .d-nday { margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: var(--muted); }
:root[data-lovable] .alerts .alert-list > .d-nday:first-child { margin-top: 0; }
:root[data-lovable] .alerts.d-only-unread .alert:not(.unread) { display: none; }
:root[data-lovable] .alerts [data-alerts-empty], :root[data-lovable] .alerts .d-nempty { margin: 56px auto; max-width: 300px; text-align: center; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

/* a notification: icon tile, title with the time (and a green dot when unread) at the top right, then the text */
:root[data-lovable] .alerts .alert { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: start; padding: 17px 17px 17px 69px; border: 0; border-radius: var(--r, 12px); background: var(--surface); color: var(--ink); box-shadow: none; }
:root[data-lovable] .alerts .alert > *, :root[data-lovable] .alerts .alert-tr > * { grid-column: 1 / -1; }
:root[data-lovable] .alerts .alert-tr { display: contents; }
:root[data-lovable] .alerts .alert .alert-meta { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 6px; padding-top: 4px; font-size: 0.625rem; line-height: 1; color: var(--muted); white-space: nowrap; }
:root[data-lovable] .alerts .alert .alert-meta time { font: inherit; color: inherit; }
:root[data-lovable] .alerts .alert .alert-title { grid-column: 1; grid-row: 1; margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.375; overflow-wrap: anywhere; }
:root[data-lovable] .alerts .alert .alert-body { margin: 6px 0 0; font-size: 0.8125rem; font-weight: 400; line-height: 1.625; color: var(--muted); }
:root[data-lovable] .alerts .alert time[data-d-rel] [data-rel-vis] { display: none; }
:root[data-lovable] .alerts .alert time[data-d-rel]::before { content: attr(data-d-rel); }
:root[data-lovable] .alerts .alert.unread .alert-meta::after { position: static; flex: none; width: 6px; height: 6px; background: var(--st-live); }
:root[data-lovable] .alerts .alert::before { left: 17px; top: 17px; border-radius: 12px; background: color-mix(in oklab, var(--ink) 5%, var(--surface)); }
:root[data-lovable] .alerts .alert::after { left: 29px; top: 29px; width: 16px; height: 16px; -webkit-mask-image: var(--d-ic-megaphone); mask-image: var(--d-ic-megaphone); }
:root[data-lovable] .alerts .alert:is(.k-reminder, .k-networking, [data-d-ic]:not([data-d-ic="megaphone"]))::after { left: 27px; top: 27px; width: 20px; height: 20px; }
:root[data-lovable] .alerts .alert.k-reminder::after, :root[data-lovable] .alerts .alert[data-d-ic="calendar"]::after { -webkit-mask-image: var(--d-ic-calendar); mask-image: var(--d-ic-calendar); }
:root[data-lovable] .alerts .alert.k-networking::after, :root[data-lovable] .alerts .alert[data-d-ic="handshake"]::after { -webkit-mask-image: var(--d-ic-handshake); mask-image: var(--d-ic-handshake); }
:root[data-lovable] .alerts .alert[data-d-ic="message"]::after { -webkit-mask-image: var(--d-ic-message); mask-image: var(--d-ic-message); }
:root[data-lovable] .alerts .alert[data-d-ic="messages"]::after { -webkit-mask-image: var(--d-ic-messages); mask-image: var(--d-ic-messages); }
/* the whole card opens what the alert points to (the app's own "Open it" link, stretched over the card) */
:root[data-lovable] .alerts .alert-foot { margin: 0; }
:root[data-lovable] .alerts .alert-open { position: absolute; inset: 0; min-height: 0; border-radius: var(--r, 12px); font-size: 0; line-height: 0; }
:root[data-lovable] .alerts .alert-open:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
:root[data-lovable] .alerts .alert.emergency { box-shadow: inset 0 0 0 2px var(--err); }
:root[data-lovable] .alerts .alert .alert-orig { margin-top: 6px; }
:root[data-lovable] .alerts .alert :is(.alert-action, .alert-media, .alert-ack, .alert-orig, .alert-img) { position: relative; z-index: 1; }
:root[data-lovable] .alerts .alert .alert-action { margin-top: 8px; font-size: 0.8125rem; }

/* ---------- Polls ----------
   The poll list of the Live Q&A screen: "Live now" / "Closed" pills and one outlined card per poll (scope line,
   question, "Vote now"). A card opens in place to the app's own voting controls or results. */
:root[data-lovable] .d-polls .d-pfilter { display: flex; gap: 8px; margin: 0 0 16px; padding: 0 0 8px; }
:root[data-lovable] .d-polls .d-ppill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.5; white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); cursor: pointer; -webkit-tap-highlight-color: transparent; }
:root[data-lovable] .d-polls .d-ppill::after { content: ""; position: absolute; inset: -2px 0; }
:root[data-lovable] .d-polls .d-ppill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
:root[data-lovable] .d-polls .d-ppill:focus-visible, :root[data-lovable] .d-polls :is(.d-pvote, .d-pclose):focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
:root[data-lovable] .d-polls .d-pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-live); }
:root[data-lovable] .d-polls[data-d-pf="open"] .eng-poll[data-status="closed"], :root[data-lovable] .d-polls[data-d-pf="closed"] .eng-poll:not([data-status="closed"]) { display: none; }
:root[data-lovable] .d-polls .eng-polls { display: grid; gap: 12px; }
:root[data-lovable] .d-polls .eng-poll { display: flex; flex-direction: column; align-items: stretch; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r, 12px); background: var(--surface); color: var(--ink); box-shadow: none; cursor: pointer; }
:root[data-lovable] .d-polls .eng-poll.d-open { cursor: auto; }
:root[data-lovable] .d-polls .eng-poll > .d-pscope { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.75rem; line-height: 1.5; color: color-mix(in oklab, var(--ink) 59%, var(--surface)); }
:root[data-lovable] .d-polls .eng-poll > .row.between { display: block; }
:root[data-lovable] .d-polls .eng-poll > .row.between > .pill, :root[data-lovable] .d-polls .eng-poll > .row.between + p.tiny.muted { display: none; }
:root[data-lovable] .d-polls .eng-pq { display: block; font-size: 1rem; font-weight: 600; line-height: 1.375; overflow-wrap: anywhere; }
:root[data-lovable] .d-polls .eng-poll:not(.d-open) > :not(.d-pscope, .row.between, .d-pvote) { display: none; }
:root[data-lovable] .d-polls .d-pvote { position: relative; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 20px; margin: 12px 0 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.8125rem; font-weight: 500; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:root[data-lovable] .d-polls .d-pvote::after { content: ""; position: absolute; inset: -11px -8px; }
:root[data-lovable] .d-polls .d-pvote:not([data-d-go="1"]) .d-ic { display: none; }
:root[data-lovable] .d-polls .eng-poll.d-open :is(.eng-vote, .eng-results, .eng-cloud, .eng-optlist) { margin-top: 12px; }
:root[data-lovable] .d-polls .eng-empty, :root[data-lovable] .d-polls .d-pempty { margin: 40px auto; max-width: 300px; text-align: center; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
:root[data-lovable] .d-polls .d-pclose, :root[data-lovable] .eng .d-pback { display: none; }

/* The same list as the design's bottom sheet (html.d-polls-open, set by static/lovable-notify.js): white, a drag
   handle, "Polls" and a close X, over a dimmed page. The section stays where it is in the page, so voting keeps working. */
:root[data-lovable].d-polls-open { overflow: hidden; }
:root[data-lovable].d-polls-open [data-panel="live"]:not(.on) { display: block; }
:root[data-lovable].d-polls-open [data-panel="live"]:not(.on) > :not(.eng), :root[data-lovable].d-polls-open [data-panel="live"]:not(.on) .eng > :not(.d-polls, .d-pback) { display: none; }
:root[data-lovable].d-polls-open .eng .d-pback { display: block; position: fixed; inset: 0; z-index: 95; background: var(--d-scrim); }
:root[data-lovable].d-polls-open .eng .d-polls { position: fixed; z-index: 96; top: calc(56px + env(safe-area-inset-top)); bottom: 0; left: 0; right: 0; width: 100%; max-width: 440px; margin: 0 auto; padding: 0 20px calc(32px + env(safe-area-inset-bottom));
  border: 0; border-radius: 20px 20px 0 0; background: var(--d-sheet); color: var(--ink); box-shadow: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
:root[data-lovable].d-polls-open .eng .d-polls::-webkit-scrollbar { display: none; }
:root[data-lovable].d-polls-open .eng .d-polls::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
:root[data-lovable].d-polls-open .eng .d-polls > h2 { margin: 0; padding: 13px 0 7px; font-size: 1.125rem; font-weight: 600; line-height: 2; color: var(--ink); }
:root[data-lovable].d-polls-open .eng .d-polls .d-pclose { position: absolute; top: 22px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; }
:root[data-lovable].d-polls-open .eng .d-polls .d-pclose .ic { width: 16px; height: 16px; stroke-width: 2; }
:root[data-lovable].d-polls-open .eng .d-polls .d-pfilter { position: sticky; top: 0; z-index: 2; background: var(--d-sheet); }
:root[data-lovable].d-polls-open .eng .d-polls .d-ppill:not([aria-pressed="true"]) { border: 1px solid var(--line); }
:root[data-lovable].d-polls-open .eng .d-polls .eng-poll { background: var(--d-sheet); }
@media (prefers-reduced-motion: no-preference) {
  :root[data-lovable].d-polls-open .eng .d-polls { animation: d-psheet-in .3s cubic-bezier(.32, .72, 0, 1); }
  :root[data-lovable].d-polls-open .eng .d-pback { animation: d-pfade-in .2s ease; }
  :root[data-lovable] .d-polls .d-ppill .d-pdot { animation: d-ppulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
}
@keyframes d-psheet-in { from { transform: translateY(100%); } }
@keyframes d-pfade-in { from { opacity: 0; } }
@keyframes d-ppulse { 50% { opacity: .5; } }
