/*
 * partner-needs-2026-06-17.css
 * Filter rail + feed toolbar + applied chips + tier separators for /partner/needs.
 * Loads after design-tokens + app-shell + partner-2026-06-17.css.
 * All selectors scoped under .appshell so they don't bleed into other pages.
 */

/* Page header with "View on map" + Subscribe to alerts */
.appshell .pg-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.appshell .pg-header .pg-title { margin: 0 0 4px; font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.appshell .pg-header .pg-title .tally { font-size: 13px; font-weight: 600; background: var(--hra-lavender-bg); color: var(--hra-purple); padding: 3px 10px; border-radius: 999px; letter-spacing: 0; }
.appshell .pg-header .pg-sub { margin: 0; font-size: 13px; color: var(--muted); max-width: 64ch; }
.appshell .pg-header .pg-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Thin incident strip */
.appshell .incident-thin { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #FFF1F2, #FFE4E6 60%, #FFF1F2); border: 1px solid #FECDD3; border-left: 4px solid var(--critical); border-radius: var(--r-md); padding: 10px 14px; font-size: 12.5px; color: #5C0B12; margin-bottom: 16px; }
.appshell .incident-thin .ico { width: 24px; height: 24px; border-radius: 6px; background: var(--critical); color: #fff; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; }
.appshell .incident-thin b { font-weight: 600; color: #5C0B12; }
.appshell .incident-thin .right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 11.5px; }
.appshell .incident-thin .right a { color: #5C0B12; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* 2-column needs layout */
.appshell .needs-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: flex-start; }
@media (max-width: 1100px) { .appshell .needs-layout { grid-template-columns: 1fr; } }

/* ===== Filter rail ===== */
.appshell .filter-rail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 6px 6px 12px; box-shadow: var(--shadow-sm); position: sticky; top: 80px; }
.appshell .fr-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.appshell .fr-head h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.appshell .fr-head h2 svg { width: 14px; height: 14px; color: var(--hra-purple); }
.appshell .fr-head .reset { font-size: 11.5px; color: var(--hra-purple); background: none; border: none; cursor: pointer; font-weight: 600; font-family: inherit; padding: 2px 4px; border-radius: 4px; }
.appshell .fr-head .reset:hover { background: var(--hra-lavender-bg); }

.appshell .fr-section { border-top: 1px solid var(--border-2); padding: 12px 12px 6px; }
.appshell .fr-section:first-of-type { border-top: none; }
.appshell .fr-section h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); display: flex; align-items: center; justify-content: space-between; }
.appshell .fr-section h3 .clear { font-size: 10.5px; color: var(--muted); background: none; border: none; cursor: pointer; font-family: inherit; }
.appshell .fr-section h3 .clear:hover { color: var(--hra-purple); }

.appshell .fr-check { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.appshell .fr-check:hover { background: var(--surface-2); }
.appshell .fr-check input { appearance: none; width: 14px; height: 14px; border: 1.5px solid var(--border); border-radius: 3px; background: var(--surface); position: relative; cursor: pointer; flex-shrink: 0; margin: 0; }
.appshell .fr-check input:checked { background: var(--hra-purple); border-color: var(--hra-purple); }
.appshell .fr-check input:checked::after { content: ""; position: absolute; left: 3px; top: 0px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.appshell .fr-check .ct { margin-left: auto; font-size: 11px; color: var(--muted-2); font-weight: 500; }
.appshell .fr-check.dim { opacity: 0.55; }

.appshell .fr-range { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); padding: 4px 6px; }
.appshell .fr-range input[type="range"] { flex: 1; accent-color: var(--hra-purple); }
.appshell .fr-range .val { font-weight: 600; color: var(--ink); min-width: 48px; text-align: right; }

.appshell .fr-search-input { width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); padding: 0 10px 0 28px; font: inherit; font-size: 12.5px; color: var(--text); }
.appshell .fr-search { position: relative; }
.appshell .fr-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; color: var(--muted); }

/* ===== Feed ===== */
.appshell .feed { min-width: 0; }
.appshell .feed-toolbar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px 0; flex-wrap: wrap; }
.appshell .feed-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.appshell .feed-tabs button { background: transparent; border: none; padding: 10px 14px; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.appshell .feed-tabs button:hover { color: var(--text); }
.appshell .feed-tabs button.active { color: var(--hra-purple); border-bottom-color: var(--hra-purple); font-weight: 600; }
.appshell .feed-tabs .count { font-size: 11px; background: var(--surface-2); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.appshell .feed-tabs .active .count { background: var(--hra-lavender-bg); color: var(--hra-purple); }

.appshell .feed-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 0 4px 6px; }
.appshell .feed-tools .sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.appshell .feed-tools .sort select { font: inherit; font-size: 12px; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 5px 26px 5px 10px; cursor: pointer; }
.appshell .feed-tools .view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.appshell .feed-tools .view-toggle button { width: 30px; height: 30px; border: none; background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.appshell .feed-tools .view-toggle button.active { background: var(--hra-lavender-bg); color: var(--hra-purple); }
.appshell .feed-tools .view-toggle button svg { width: 14px; height: 14px; }

/* Applied filter chips */
.appshell .applied { background: var(--surface); border: 1px solid var(--border); border-top: none; border-bottom: 1px solid var(--border-2); padding: 8px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.appshell .applied b { color: var(--text); font-weight: 600; margin-right: 4px; }
.appshell .fchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--hra-lavender-bg); color: var(--hra-purple-dark); border: 1px solid var(--hra-lavender); font-size: 11.5px; font-weight: 500; }
.appshell .fchip button { width: 16px; height: 16px; border-radius: 50%; border: none; background: transparent; color: var(--hra-purple); display: grid; place-items: center; cursor: pointer; }
.appshell .fchip button:hover { background: rgba(75,46,131,0.15); }
.appshell .fchip button svg { width: 9px; height: 9px; }

/* Feed list shell + tier separators */
.appshell .feed-list { background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.appshell .tier-sep { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border-2); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.appshell .tier-sep .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--critical); box-shadow: 0 0 0 0 rgba(185,28,38,0.5); animation: pulse-critical 2.2s infinite; }
.appshell .tier-sep.high .pulse { background: var(--warning); animation: pulse-warning 2.2s infinite; }
.appshell .tier-sep.med .pulse { background: var(--hra-purple-light); box-shadow: none; animation: none; }
@keyframes pulse-critical { 0% { box-shadow: 0 0 0 0 rgba(185,28,38,0.5);} 70% { box-shadow: 0 0 0 8px rgba(185,28,38,0);} 100% { box-shadow: 0 0 0 0 rgba(185,28,38,0);} }
@keyframes pulse-warning  { 0% { box-shadow: 0 0 0 0 rgba(180,83,9,0.45);} 70% { box-shadow: 0 0 0 8px rgba(180,83,9,0);} 100% { box-shadow: 0 0 0 0 rgba(180,83,9,0);} }
.appshell .tier-sep .ct { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }

/* Feed pagination */
.appshell .feed-pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border-2); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.appshell .feed-pagination b { color: var(--ink); font-weight: 600; }
.appshell .pager { display: flex; align-items: center; gap: 4px; }
.appshell .pager button { width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 7px; font: inherit; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.appshell .pager button:hover { border-color: var(--hra-lavender); color: var(--hra-purple); }
.appshell .pager button.active { background: var(--hra-purple); color: #fff; border-color: var(--hra-purple); }

/* Polish: 768px mobile breakpoint */
@media (max-width: 768px) {
  .appshell .pg-header { flex-direction: column; align-items: stretch; }
  .appshell .pg-header .pg-actions { width: 100%; }
  .appshell .feed-toolbar { flex-direction: column; align-items: stretch; }
  .appshell .feed-toolbar .feed-tools { margin-left: 0; }
  .appshell .feed-tabs { flex-wrap: wrap; }
  .appshell .need-row { grid-template-columns: 4px 1fr; gap: 10px; padding: 12px 14px; }
  .appshell .need-row .rhs { grid-column: 2; align-items: stretch; min-width: 0; }
  .appshell .need-row .claim-btn { width: 100%; text-align: center; }
}
