/* The web inbox, and the dropdown under the bell that draws the same rows.
   Loaded on every page (header_frameless.html) because the bell is.

   Every colour is a base.css token. This file used to read --brand,
   --divider and --surface-muted, none of which exist: each fell back to a
   light-theme literal, so in the dark theme a row's icon was a near-white
   glyph on a near-white square — the blank tiles the inbox shipped with. */

.ntf_page { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }

.ntf_head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ntf_title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.ntf_readall { background: none; border: 0; color: var(--blue); font: inherit; font-size: 14px; font-weight: 600;
               cursor: pointer; min-height: 44px; padding: 0 4px; }
.ntf_readall[hidden] { display: none; }

/* The permission row. Starts hidden and is revealed by inbox.js only when the
   browser has not already answered — a button that cannot do anything is
   worse than no button. */
.ntf_prime { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; margin-bottom: 16px;
             background: var(--container); border: 1px solid var(--border-color); border-radius: 14px; }
.ntf_prime[hidden] { display: none; }
.ntf_prime_txt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.ntf_prime_txt strong { font-size: 15px; }
.ntf_prime_txt span { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.ntf_prime_btn { border: 0; border-radius: 999px; min-height: 44px; padding: 0 20px; font: inherit; font-size: 15px;
                 font-weight: 600; cursor: pointer; background: var(--blue); color: var(--text-primary-inverted); }
.ntf_prime_btn:disabled { opacity: .6; cursor: default; }

/* Action required (notifications.html): the account's email is not verified.
   The one card on the page with a coloured edge. */
.ntf_action { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; margin-bottom: 16px;
              background: color-mix(in srgb, var(--blue) 8%, var(--container));
              border: 1px solid var(--blue); border-radius: 14px; }
.ntf_action_icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px;
                   display: flex; align-items: center; justify-content: center;
                   color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--surface)); }
.ntf_action_txt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ntf_action_kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
                     color: var(--red); }
.ntf_action_txt strong { font-size: 16px; font-weight: 600; }
.ntf_action_txt > span:last-child { font-size: 14px; line-height: 1.5; color: var(--text-intermediate);
                                    overflow-wrap: anywhere; }
.ntf_action_btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
                  border-radius: 999px; background: var(--blue); color: var(--text-primary-inverted);
                  font-size: 15px; font-weight: 600; text-decoration: none; }

.ntf_filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 4px; }
/* A filter: a link on the page, a button in the dropdown. The one that is on
   is the inverse of the page, as the segmented controls elsewhere are. */
.ntf_chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
            box-sizing: border-box; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500;
            white-space: nowrap; cursor: pointer; background: transparent;
            border: 1px solid var(--border-highlight); color: var(--text-intermediate); text-decoration: none; }
.ntf_chip.is_on { background: var(--text-primary); border-color: transparent; color: var(--text-primary-inverted);
                  font-weight: 600; }

/* The rows sit in one card. */
.ntf_list { list-style: none; margin: 0; padding: 0; overflow: hidden;
            background: var(--container); border: 1px solid var(--border-color); border-radius: 16px; }

/* On the inbox the list is cut into stretches of time: a heading row
   (.ntf_group: Today, Yesterday, This week, Earlier) and the rows under it
   as a card of their own. It stays one <ul> (inbox.js adds live rows at the
   top and redraws the headings), so the card is drawn on the rows: the list
   itself goes bare, and the first and last row of a stretch carry its
   corners. The dropdown has no headings and keeps the one card above. */
.ntf_page .ntf_list { overflow: visible; background: none; border: 0; border-radius: 0; }
.ntf_group { padding: 20px 2px 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
             text-transform: uppercase; color: var(--text-secondary); }
.ntf_group:first-child { padding-top: 8px; }
.ntf_page .ntf_row { overflow: hidden; background: var(--container);
                     border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
.ntf_page .ntf_row.is_unread { background: color-mix(in srgb, var(--blue) 7%, var(--container)); }
.ntf_page .ntf_group + .ntf_row, .ntf_page .ntf_row:first-child {
  border-top: 1px solid var(--border-color); border-top-left-radius: 16px; border-top-right-radius: 16px; }
.ntf_page .ntf_row:has(+ .ntf_group), .ntf_page .ntf_row:last-child {
  border-bottom: 1px solid var(--border-color); border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }

.ntf_row { display: flex; flex-wrap: wrap; align-items: stretch; }
.ntf_row + .ntf_row { border-top: 1px solid var(--border-color); }
.ntf_row.is_unread { background: color-mix(in srgb, var(--blue) 7%, transparent); }
.ntf_row_main { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; padding: 16px 8px 16px 18px;
                text-decoration: none; color: inherit; }
.ntf_row_main:hover { background: color-mix(in srgb, var(--text-primary) 4%, transparent); }

/* The tile: the sender's picture when the notification has one, otherwise a
   glyph for what kind of thing happened. --ntf-hue is that kind's colour;
   it tints the tile and draws the glyph. */
.ntf_row_icon { --ntf-hue: var(--text-secondary);
                flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; overflow: hidden;
                display: flex; align-items: center; justify-content: center; font-size: 22px;
                color: var(--ntf-hue); background: color-mix(in srgb, var(--ntf-hue) 16%, var(--surface)); }
.ntf_row_icon img { width: 100%; height: 100%; object-fit: cover; }

/* Which glyph, by category (notifications.Category). The codes are the icon
   font's own (icons.css); a category not listed keeps the bell. */
.ntf_row_icon[data-cat="messages"] i::before, .ntf_row_icon[data-cat="calls"] i::before { content: "\e93a"; }
.ntf_row_icon[data-cat="your_posts"] i::before { content: "\e94e"; }
.ntf_row_icon[data-cat="followers"] i::before, .ntf_row_icon[data-cat="account"] i::before { content: "\e902"; }
.ntf_row_icon[data-cat="following"] i::before, .ntf_row_icon[data-cat="family"] i::before { content: "\e91e"; }
.ntf_row_icon[data-cat="polls"] i::before { content: "\e924"; }
.ntf_row_icon[data-cat="snaps"] i::before { content: "\e922"; }
.ntf_row_icon[data-cat="tournaments"] i::before { content: "\e91c"; }
.ntf_row_icon[data-cat="games"] i::before { content: "\e912"; }
.ntf_row_icon[data-cat="ranklists"] i::before, .ntf_row_icon[data-cat="quests"] i::before { content: "\e918"; }
.ntf_row_icon[data-cat="communities"] i::before { content: "\e914"; }
.ntf_row_icon[data-cat="events"] i::before { content: "\e93c"; }
.ntf_row_icon[data-cat="rewards"] i::before, .ntf_row_icon[data-cat="wallet"] i::before { content: "\e908"; }

/* And its colour. Five hues, each a token, so both themes carry them. */
.ntf_row_icon[data-cat="messages"], .ntf_row_icon[data-cat="calls"],
.ntf_row_icon[data-cat="communities"], .ntf_row_icon[data-cat="events"] { --ntf-hue: var(--blue); }
.ntf_row_icon[data-cat="your_posts"] { --ntf-hue: var(--red); }
.ntf_row_icon[data-cat="followers"], .ntf_row_icon[data-cat="following"],
.ntf_row_icon[data-cat="family"] { --ntf-hue: var(--green); }
.ntf_row_icon[data-cat="quests"], .ntf_row_icon[data-cat="tournaments"], .ntf_row_icon[data-cat="games"],
.ntf_row_icon[data-cat="rewards"], .ntf_row_icon[data-cat="wallet"] { --ntf-hue: var(--ember); }
.ntf_row_icon[data-cat="polls"], .ntf_row_icon[data-cat="snaps"],
.ntf_row_icon[data-cat="ranklists"] { --ntf-hue: var(--text-gold); }

.ntf_row_text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
/* Read rows step back; unread ones carry the weight. */
.ntf_row_title { font-weight: 500; font-size: 15px; color: var(--text-intermediate); }
.ntf_row.is_unread .ntf_row_title { font-weight: 600; color: var(--text-primary); }
.ntf_row_body { font-size: 14px; line-height: 1.5; color: var(--text-secondary);
                display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ntf_row_time { font-size: 13px; color: var(--text-secondary); }
.ntf_row_dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; margin-top: 8px;
               background: var(--blue); }

/* Hidden until the row is hovered on a pointer device, and always visible on
   touch — there is no hover to reveal it there. */
.ntf_row_archive { flex: 0 0 auto; border: 0; background: none; cursor: pointer; min-width: 44px; padding: 0 12px;
                   color: var(--text-secondary); opacity: 0; transition: opacity .12s; }
.ntf_row:hover .ntf_row_archive, .ntf_row_archive:focus-visible { opacity: 1; }
@media (hover: none) { .ntf_row_archive { opacity: 1; } }

/* Accept and Decline on a join request (TC212): a line of their own under the
   text, lined up with it (18 padding + 48 icon + 14 gap), so a phone keeps the
   sentence whole. Monochrome, like the rest of the chrome. */
.ntf_row_actions { flex: 1 0 100%; display: flex; gap: 8px; padding: 0 16px 16px 80px; }
.ntf_row_actions[hidden] { display: none; }
.ntf_row_btn { border: 0; border-radius: 999px; min-height: 40px; padding: 0 18px; font: inherit; font-size: 14px;
               font-weight: 600; cursor: pointer; background: var(--elevated); color: var(--text-primary); }
.ntf_row_btn.is_primary { background: var(--text-primary); color: var(--text-primary-inverted); }
.ntf_row_btn:disabled { opacity: .6; cursor: default; }

/* What an answer did, for a moment: the row itself goes. */
.ntf_toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
             max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; font-size: 14px;
             background: var(--elevated-surface); color: var(--text-primary);
             box-shadow: 0 4px 16px var(--elevated-shadow-color); }

.ntf_empty { margin: 0; padding: 32px 16px; text-align: center; color: var(--text-secondary); font-size: 14px;
             line-height: 1.5; }

/* ============================================================
   THE DROPDOWN UNDER THE BELL (notif_peek.js)

   The latest few rows without leaving the page. It hangs off the header's
   right-hand group; below 640px the bell stays a plain link to the inbox
   and this never opens.
   ============================================================ */
.ntf_peek { position: absolute; top: calc(100% + 12px); right: 0; z-index: 1200;
            width: 440px; max-width: calc(100vw - 24px); max-height: min(640px, calc(100vh - 96px));
            display: flex; flex-direction: column; overflow: hidden; text-align: left;
            background: var(--container); border: 1px solid var(--border-highlight); border-radius: 18px;
            box-shadow: 0 20px 48px var(--shadow-color); }
.ntf_peek[hidden] { display: none; }
.ntf_peek_head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px 2px; }
.ntf_peek_title { font-size: 18px; font-weight: 700; }
.ntf_peek_tabs { display: flex; gap: 8px; padding: 4px 18px 12px; }
.ntf_peek_tabs .ntf_chip { min-height: 36px; padding: 0 16px; }
.ntf_peek_body { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--border-color); }
/* The same rows, a size down, and as links only: removing a row and answering
   a join request are the inbox's job. */
.ntf_peek .ntf_list { background: none; border: 0; border-radius: 0; }
.ntf_peek .ntf_row_main { gap: 12px; padding: 12px 18px; }
.ntf_peek .ntf_row_icon { width: 40px; height: 40px; border-radius: 12px; font-size: 19px; }
.ntf_peek .ntf_row_title { font-size: 14px; }
.ntf_peek .ntf_row_body { font-size: 13px; -webkit-line-clamp: 2; }
.ntf_peek .ntf_row_time { font-size: 12px; }
.ntf_peek .ntf_row_dot { width: 8px; height: 8px; margin-top: 6px; }
.ntf_peek .ntf_row_archive, .ntf_peek .ntf_row_actions { display: none; }
.ntf_peek_all { display: flex; align-items: center; justify-content: center; min-height: 52px;
                border-top: 1px solid var(--border-color); background: var(--surface);
                color: var(--blue); font-size: 15px; font-weight: 600; text-decoration: none; }
.ntf_peek_all:hover { text-decoration: underline; }


/* ============================================================
   PHONE GUTTERS (≤ 639px)

   One scale, applied across the dashboard: the page gutter is 8px
   (.hm_pne, home.css), a card's own padding is 12, a hero or a section
   header is 14–16, and an empty state is 16. Desktop values ride straight
   through to a 390px screen otherwise — 12 of page gutter plus 16 of card
   padding plus the hairline left 332px of 390 for the content, and the
   cards read as a column of margins with text down the middle.
   Held at 390 by TestDashboardPhoneGutters in phone_shell_test.go.
   ============================================================ */
@media screen and (max-width: 639px) {
  .ntf_page { padding: 12px; }
}
