/* ehr_page_yaps.css                                                                                         2026-11-14
   YAPS_20261114 (run list 678, owner 11-14): yaps, short posts by SysOps and BTB admins.
     1. the main page top row: the admin note and the yap box side by side on a full screen, stacked below 980px
        (jinja/mainpage/mainpage_VARS.j2, default.py). The red admin note comes first, else the yap box (mp_top_yapfirst).
     2. the yap box bar: dark red under 6 hours old, lighter every 3 hours, the normal bar from 24 hours (yap_s0 .. yap_s6,
        yap_sn). The red is a layer over the kit bar, so the normal bar shows through as it fades.
     3. the BOT badge (default game messages, as jayi).
     4. the side menu circle: yaps of the last 3 days, maroon when one is under 24 hours old.
     5. Misc -> Yaps and the Account page Yap panel (yaps/jinja/yaps.j2): tabs, rows, the write box, the default messages.
     6. YAPSOCIAL_20261114 (run list 681): the post look (a square picture or the first letter, the SysOp / BTB badge, the
        26-11-14 13:40 stamp), the poster chips, the friendlier page head, the empty state, the Pictures panel (SysOps).
   Our own file (not Will's). Colours from the kit tokens where there is one. */

/* 1. the main page top row */
.mp_top                    { display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-start; }
.mp_top_cell               { flex: 1 1 calc(50% - .5em); min-width: 280px; }
.mp_top_cell:empty,
.mp_top_none               { display: none; }
.mp_top_yapfirst .mp_top_yap { order: -1; }
@media (max-width: 980px) {
  .mp_top_cell             { flex-basis: 100%; }
}

/* 2. the yap box */
.yap_top                   { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4em; }
.yap_top::before           { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0;
                             background: linear-gradient(135deg, #8a1111 30%, #5c0909 100%); }
.yap_s0::before            { opacity: 1; }
.yap_s1::before            { opacity: .86; }
.yap_s2::before            { opacity: .72; }
.yap_s3::before            { opacity: .58; }
.yap_s4::before            { opacity: .44; }
.yap_s5::before            { opacity: .30; }
.yap_s6::before            { opacity: .16; }
.yap_s0, .yap_s1, .yap_s2, .yap_s3 { color: #fff; }
.yap_top .yap_when         { margin-left: auto; font-weight: 400; font-size: 12px; opacity: .9; }
.yap_box .yap_body         { display: block; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
/* YAPMORE_20261114 (run list 682): the more link in the bar, beside Yap (the All yaps row under the post is gone) */
.yap_box .yap_top a.yap_top_more { align-self: center; display: inline-block; padding: 0 8px; border: 1px solid currentColor;
                             border-radius: 999px; color: inherit; font-size: 11.5px; font-weight: 600; line-height: 18px;
                             text-decoration: none; opacity: .85; }
.yap_box .yap_top a.yap_top_more:hover,
.yap_box .yap_top a.yap_top_more:focus-visible { opacity: 1; text-decoration: none; background: rgba(255, 255, 255, .16); }
.yap_box .race-body        { padding-bottom: 8px; }
/* YAPMORE_20261114 (run list 682, owner 11-14: "can you round the edges on the yap screen as well?"): Misc -> Yaps only.
   The kit cards are square site-wide (--pg-radius 0); inside .yap_wrap the radius is 14px, so the cards, their heads and the
   pager round with it (the kit draws those from --pg-radius). The tab bar takes the top corners, the card under it none. */
.yap_wrap                  { --pg-radius: 14px; }
.yap_wrap .yap_tabbar      { border-radius: var(--pg-radius) var(--pg-radius) 0 0; }
.yap_wrap .yap_tabbar ~ .yap_panel .yap_card:first-child,
.yap_wrap .yap_tabbar ~ .yap_panel .yap_card:first-child > .pg_card_hd { border-top-left-radius: 0; border-top-right-radius: 0; }

/* 3. the BOT badge */
.yap_bot                   { display: inline-block; margin-left: 6px; padding: 0 7px; border: 1px solid currentColor; border-radius: 9px;
                             font-size: 10.5px; font-weight: 700; line-height: 16px; letter-spacing: .04em; vertical-align: middle;
                             background: rgba(255, 255, 255, .14); }

/* 4. the side menu circle (the lease badge shape, css/automated.css .lzn_menu_badge) */
.yap_menu_badge            { display: inline-block; min-width: 16px; box-sizing: border-box; margin-left: 4px; padding: 0 5px;
                             border-radius: 8px; background: #0f766e; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px;
                             text-align: center; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.yap_menu_badge_hot        { background: #800000; }
.ehr-quick-btn .yap_menu_badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; }

/* 5. Misc -> Yaps and the Account page Yap panel */
.yap_tabs                  { position: relative; }
.yap_tab_radio             { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.yap_tab                   { user-select: none; }
#yap_tab_all:checked   ~ .yap_tabbar .yap_tab_all,
#yap_tab_write:checked ~ .yap_tabbar .yap_tab_write,
#yap_tab_def:checked   ~ .yap_tabbar .yap_tab_def,
#yap_tab_pic:checked   ~ .yap_tabbar .yap_tab_pic,
#yap_tab_po:checked    ~ .yap_tabbar .yap_tab_po { font-weight: 700; }
#yap_tab_all:checked   ~ .yap_tabbar .yap_tab_all::after,
#yap_tab_write:checked ~ .yap_tabbar .yap_tab_write::after,
#yap_tab_def:checked   ~ .yap_tabbar .yap_tab_def::after,
#yap_tab_pic:checked   ~ .yap_tabbar .yap_tab_pic::after,
#yap_tab_po:checked    ~ .yap_tabbar .yap_tab_po::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
                                                            height: .25rem; background: var(--ehr-theme-accent); }
#yap_tab_all:focus-visible   ~ .yap_tabbar .yap_tab_all,
#yap_tab_write:focus-visible ~ .yap_tabbar .yap_tab_write,
#yap_tab_def:focus-visible   ~ .yap_tabbar .yap_tab_def,
#yap_tab_pic:focus-visible   ~ .yap_tabbar .yap_tab_pic,
#yap_tab_po:focus-visible    ~ .yap_tabbar .yap_tab_po { outline: 2px solid var(--ehr-action); outline-offset: -2px; }
.yap_panel                 { display: none; }
#yap_tab_all:checked   ~ .yap_panel_all,
#yap_tab_write:checked ~ .yap_panel_write,
#yap_tab_def:checked   ~ .yap_panel_def,
#yap_tab_pic:checked   ~ .yap_panel_pic,
#yap_tab_po:checked    ~ .yap_panel_po { display: block; }
.yap_tabbar + .yap_panel .yap_card:first-child { border-top: 0; }

.yap_posters               { overflow-wrap: anywhere; }
.yap_pn                    { margin-left: 4px; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.yap_rows                  { display: flex; flex-direction: column; }
.yap_row                   { padding: 10px 4px; border-bottom: 1px solid var(--ehr-border); }
.yap_row:last-child        { border-bottom: 0; }
.yap_row_alt               { background: var(--ehr-table-row-alt-bg, transparent); }
.yap_row_off .yap_dlook    { opacity: .55; }
.yap_meta                  { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.yap_meta .yap_del,
.yap_meta .yap_dedit       { margin-left: auto; }
.yap_meta .yap_dedit + .yap_dsave { margin-left: 0; }
.yap_role                  { font-size: 11px; }
.yap_rows .yap_body        { margin-top: 4px; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45; }
.yap_confirm,
.yap_dedit_row             { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 8px 10px;
                             border: 1px solid var(--ehr-border); border-radius: 6px; background: var(--ehr-surface-bg); }
.yap_confirm[hidden],
.yap_dedit_row[hidden]     { display: none; }
.yap_dedit_row textarea    { flex: 1 1 100%; }

.yap_write, .yap_dform     { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.yap_lbl                   { font-weight: 600; font-size: 13px; }
.yap_text, .yap_dbody      { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--ehr-border); border-radius: 6px;
                             background: var(--ehr-surface-bg); color: inherit; font: inherit; resize: vertical; }
.yap_pct                   { width: 6em; padding: 4px 8px; border: 1px solid var(--ehr-border); border-radius: 6px;
                             background: var(--ehr-surface-bg); color: inherit; font: inherit; }
.yap_inline                { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* YAPEMOJI_20261116 (run list 714): the smiley row under the write box; it wraps, so it is never wider than the box */
.yap_emos                  { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; }
.yap_emo                   { min-width: 36px; min-height: 36px; padding: 4px 6px; border: 1px solid var(--ehr-border); border-radius: 8px;
                             background: var(--ehr-surface-bg); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.yap_emo:hover, .yap_emo:focus-visible { border-color: currentColor; }
/* YAPEMOJI_20261116 run2: the eYap box (eyap_old undistinguished blog_input.j2), in our colours: the round smiley button at
   the end of the row, the box floats under the row over the page (absolute, nothing moves), never wider than the write box;
   the smileys scroll inside it; hover grows one a little, as eYap did. */
.yap_emos                  { position: relative; }
.yap_emo_more              { min-height: 36px; padding: 2px 12px; border: 2px solid var(--ehr-border); border-radius: 20px;
                             background: var(--ehr-surface-bg); color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.yap_emo_more:hover, .yap_emo_more:focus-visible, .yap_emo_more[aria-expanded="true"] { border-color: var(--ehr-theme-accent); }
.yap_emobox                { position: absolute; z-index: 10; left: 0; top: calc(100% + 6px); width: min(440px, 100%); box-sizing: border-box;
                             border: 2px solid var(--ehr-border); border-radius: 12px; overflow: hidden; background: var(--ehr-surface-bg);
                             box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.yap_emobox[hidden]        { display: none; }
.yap_emobox .pg_tabs       { gap: 0 .6em; padding: 0 .5em; }
.yap_emobox .pg_tab        { height: 34px; padding: 0 4px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.yap_emogrid               { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; max-height: 220px;
                             overflow-y: auto; padding: 10px; }
.yap_emogrid .yap_emo      { min-width: 0; min-height: 40px; padding: 4px; border: 0; border-radius: 8px; background: none; font-size: 24px;
                             transition: transform .2s, background-color .2s; }
.yap_emogrid .yap_emo:hover, .yap_emogrid .yap_emo:focus-visible { background: color-mix(in srgb, var(--ehr-theme-accent) 12%, transparent);
                             transform: scale(1.2); }
.yap_write_foot            { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.yap_count                 { margin-right: auto; font-variant-numeric: tabular-nums; }
.yap_count_over            { color: var(--pg-neg); font-weight: 700; }
.yap_hint                  { margin: 0; }
.yap_acc_title             { margin: 16px 0 4px; font-size: 14px; }
.yap_msg                   { margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--ehr-border); }
.yap_msg_ok                { border-color: var(--pg-ok-border); background: var(--pg-ok-bg); color: var(--pg-ok-text); }
.yap_msg_bad               { border-color: var(--pg-bad-border); background: var(--pg-bad-bg); color: var(--pg-bad-text); }
.yap_wmsg:empty            { display: none; }

/* 6. YAPSOCIAL_20261114: the post look */
.yap_av                    { flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
                             width: 40px; height: 40px; border-radius: 10px; overflow: hidden; object-fit: cover; vertical-align: middle;
                             background: #64748b; color: #fff; font-size: 18px; font-weight: 700; line-height: 1; user-select: none; }
img.yap_av                 { background: var(--ehr-surface-bg); border: 1px solid var(--ehr-border); }
.yap_av[hidden]            { display: none; }
.yap_av_c0                 { background: #0f766e; }
.yap_av_c1                 { background: #1d4ed8; }
.yap_av_c2                 { background: #7c3aed; }
.yap_av_c3                 { background: #b45309; }
.yap_av_c4                 { background: #be123c; }
.yap_av_c5                 { background: #15803d; }
.yap_av_c6                 { background: #4338ca; }
.yap_av_c7                 { background: #a21caf; }
.yap_av_bot                { background: #334155; font-size: 22px; }
.yap_av_xs                 { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.yap_av_lg                 { width: 96px; height: 96px; border-radius: 18px; font-size: 40px; }
.yap_av_none               { background: transparent; color: inherit; opacity: .45; border: 1px dashed currentColor; }
.yap_post                  { display: flex; gap: 12px; align-items: flex-start; }
.yap_post_main             { flex: 1 1 auto; min-width: 0; }
.yap_rows .yap_post        { padding: 12px 4px; }
/* JAYITIPS_20261115 (run list 706): JayI Tips rows look like the yap rows (yap_post is taken by the click code) */
.yap_tip                   { display: flex; gap: 12px; align-items: flex-start; }
.yap_rows .yap_tip         { padding: 12px 4px; }
.yap_tips_lede             { margin: 0 0 4px; }
.yap_who                   { font-weight: 700; }
.yap_badge                 { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 10.5px; font-weight: 700; line-height: 17px;
                             letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.yap_badge_sysop           { background: #800000; }
.yap_badge_btb             { background: #1e3a8a; }
.yap_stamp,
.yap_ago                   { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.yap_mrow,
.yap_box .race-body .race-row.yap_mrow { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; text-align: left; }
.yap_pager .pg_pager_at    { color: var(--ehr-table-header-text, #fff); opacity: .85; }
.yap_mrow .yap_meta        { gap: 2px 8px; }
.yap_mrow .yap_body        { margin-top: 2px; }

/* the page head, the poster chips, the empty state */
.yap_hero                  { display: flex; align-items: center; gap: 14px; }
.yap_hero_icon             { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
                             border-radius: 14px; border: 1px solid var(--ehr-border); background: var(--ehr-surface-bg); font-size: 28px; }
.yap_filter                { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 4px; }
.yap_chip                  { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; box-sizing: border-box; padding: 3px 10px;
                             border: 1px solid var(--ehr-border); border-radius: 999px; background: var(--ehr-surface-bg); color: inherit;
                             font-size: 13px; text-decoration: none; }
.yap_chip .yap_av_xs       { margin-left: -6px; }
.yap_chip:hover            { border-color: var(--ehr-theme-accent); text-decoration: none; }
.yap_chip_on               { border-color: var(--ehr-theme-accent); box-shadow: inset 0 0 0 1px var(--ehr-theme-accent); font-weight: 700; }
.yap_chip .yap_pn          { margin-left: 0; }
.yap_empty                 { padding: 18px 8px; text-align: center; }
.yap_empty_icon            { display: block; font-size: 32px; }
.yap_empty p               { margin: 6px 0 0; opacity: .8; }

/* the Pictures panel (SysOps) */
.yap_pform                 { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin: 10px 0 8px; }
.yap_pform_fields          { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yap_pstable               { padding: 6px 10px; border: 1px solid var(--ehr-border); border-radius: 6px; background: var(--ehr-surface-bg);
                             color: inherit; font: inherit; }
.yap_pfile                 { max-width: 100%; font: inherit; }
.yap_pprev_box             { flex: none; }

/* YAPPOSTERS_20261114 (run list 683): the Posters panel (SysOps) */
.yap_poform                { margin: 10px 0 8px; }
.yap_poform_row            { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.yap_postable              { flex: 1 1 auto; min-width: 0; padding: 6px 10px; border: 1px solid var(--ehr-border); border-radius: 6px;
                             background: var(--ehr-surface-bg); color: inherit; font: inherit; }
.yap_poform_row .yap_poadd { flex: none; }

/* YAPSCROLL_20261116 (run list 715): the main page yap box steps through more cards. All cards share one grid cell, so the box
   is as tall as the tallest and nothing below moves; the hidden ones keep their space (visibility). The arrows sit in a gutter
   inside the card row, half way down, round, in the card colours. */
.yap_reel                  { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
.yap_reel > .yap_slide     { grid-area: 1 / 1; display: flex; min-width: 0; }
.yap_reel > .yap_slide > .race-container { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.yap_reel .race-body       { flex: 1 1 auto; }
.yap_reel > .yap_slide_off { visibility: hidden; }
.yap_reel .yap_mrow        { flex: 1 1 auto; padding-left: 40px; padding-right: 40px; }
.yap_reel_btn              { position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: 7px; padding: 0;
                             border: 1px solid var(--ehr-border); border-radius: 50%; background: var(--ehr-surface-bg); color: inherit;
                             font-size: 22px; line-height: 26px; text-align: center; cursor: pointer; opacity: .85; }
/* half way down the card under its bar (the bar is about 44px: the centre sits 22px below the middle of the box) */
.yap_reel_btn:hover, .yap_reel_btn:focus-visible { opacity: 1; border-color: currentColor; }
.yap_reel_btn[hidden]      { display: none; }
.yap_reel_prev             { left: 12px; }
.yap_reel_next             { right: 12px; }
.yap_all_row .yap_body     { margin-bottom: 8px; }
.yap_all_btn               { display: inline-block; }
