﻿/* =================================================================== */
/* Task Explorer: filter panel, results area and the discussion thread */
/* inside the shared drawer. Drawer chrome itself lives in              */
/* Shared/components.css.                                              */
/* =================================================================== */

/* The explorer page owns the full height under the topbar, so the view
   container's padding is removed for it. */
.view.view-flush { padding: 0; overflow: hidden; display: flex; }

.explorer { display: grid; grid-template-columns: 304px 1fr; gap: 0; height: 100%; flex: 1; min-width: 0; }

/* ============ FILTER PANEL ============ */
/* Filters sit in four boxed, collapsible sections on a gray ground so
   each section reads as its own unit. */
.fpanel { border-right: 1px solid var(--line); background: var(--surface-2); overflow-y: auto; padding: 16px 14px 44px; }
.fpanel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
    .fpanel-head h3 { font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin: 0; font-weight: 700; }
.reset-btn { font-size: 12.5px; color: var(--gold-ink); background: none; border: 0; font-weight: 700; padding: 2px 4px; }
    .reset-btn:hover { text-decoration: underline; }

.fsec { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; box-shadow: var(--sd); overflow: hidden; }
    .fsec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 12px 14px; transition: background .12s; }
        .fsec > summary::-webkit-details-marker { display: none; }
        .fsec > summary:hover { background: var(--surface-2); }
    .fsec[open] > summary { border-bottom: 1px solid var(--surface-3); }
.fsec-name { font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: .01em; flex: 1; }
.fsec-ct { background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-ink); font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.fsec-chev { width: 16px; height: 16px; stroke: var(--text-2); transition: transform .18s; flex: none; }
.fsec[open] .fsec-chev { transform: rotate(90deg); }
.fsec-body { padding: 13px 14px 15px; }
.fsec[open] .fsec-body { animation: fsecslide .18s ease; }

@keyframes fsecslide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: none; }
}

.fgroup { margin-bottom: 16px; }
    .fgroup:last-child { margin-bottom: 0; }
    .fgroup > .fg-title { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); font-weight: 700; margin-bottom: 8px; }

/* Full-width stacked option rows: service types and authority sources */
.stack-list { display: flex; flex-direction: column; gap: 6px; }
.stack-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 7px; padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: all .12s; font-family: inherit; text-align: left; }
    .stack-row:hover { border-color: var(--line-strong); color: var(--text); background: var(--surface-2); }
    .stack-row .ct { font-family: var(--font-mono); font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text-2); padding: 1px 8px; border-radius: 10px; flex: none; }
    .stack-row.on { background: var(--ink); border-color: var(--ink); color: #fff; }
        .stack-row.on .ct { background: rgba(255,255,255,.18); color: #fff; }
    .stack-row.op.on { background: var(--op); border-color: var(--op); }
    .stack-row.mg.on { background: var(--mg); border-color: var(--mg); }
    .stack-row.en.on { background: var(--en); border-color: var(--en); }

/* Collapsible sub-lists for the long check-lists */
.fsub { border: 1px solid var(--surface-3); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
    .fsub:last-child { margin-bottom: 0; }
    .fsub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); transition: background .12s; }
        .fsub > summary::-webkit-details-marker { display: none; }
        .fsub > summary:hover { background: var(--surface-3); }
.fsub-name { font-size: 12.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; flex: 1; }
.fsub-chev { width: 14px; height: 14px; stroke: var(--text-2); transition: transform .18s; flex: none; }
.fsub[open] .fsub-chev { transform: rotate(90deg); }
.fsub-body { padding: 10px 11px 11px; }

/* ============ RESULTS ============ */
.results { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.rtoolbar { padding: 14px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--surface); position: sticky; top: 0; z-index: 5; }
.rcount { font-size: 14px; color: var(--text-2); white-space: nowrap; }
    .rcount b { color: var(--text); font-weight: 700; font-family: var(--font-display); font-size: 17px; }
.rsearch { position: relative; flex: 1; min-width: 170px; max-width: 360px; }
    .rsearch input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13.5px; background: var(--surface-2); font-family: inherit; color: var(--text); }
        .rsearch input:focus { outline: none; border-color: var(--gold-2); background: #fff; box-shadow: 0 0 0 3px var(--gold-soft); }
    .rsearch svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-3); }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; flex: 2; }
.rtools-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }

.rlist { padding: 18px 24px 60px; flex: 1; overflow-x: auto; }

/* card view */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 15px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 17px 18px; cursor: pointer; transition: all .13s; position: relative; border-left-width: 3px; }
    .tcard.op { border-left-color: var(--op); }
    .tcard.mg { border-left-color: var(--mg); }
    .tcard.en { border-left-color: var(--en); }
    .tcard:hover { box-shadow: var(--sd-md); border-color: var(--line-2); transform: translateY(-1px); }
.tcard-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
    .tcard-top .tid { background: var(--surface-3); padding: 2px 7px; border-radius: 5px; }
.tcard-task { font-size: 14.5px; color: var(--text); font-weight: 550; line-height: 1.45; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard-crumb { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .tcard-crumb .cr-sep { color: var(--line-strong); }
.tcard-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--surface-3); }
.tcard-cases { font-size: 11.5px; color: var(--text-2); font-family: var(--font-mono); margin-left: auto; }

/* ============ DISCUSSION THREAD ============ */
.thread-msg { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.thread-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
    .thread-meta b { color: var(--text-2); }
.thread-version { font-family: var(--font-mono); font-size: 10.5px; background: var(--surface-3); color: var(--text-2); padding: 1px 6px; border-radius: 9px; }
    .thread-version.old { background: var(--gold-soft); color: var(--gold-ink); }
.thread-text { font-size: 13.5px; color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.thread-toggle { font-size: 12.5px; color: var(--gold-ink); background: none; border: 0; font-weight: 600; padding: 2px 0; margin-bottom: 9px; }
    .thread-toggle:hover { text-decoration: underline; }
.thread-form textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 7px; font-size: 13.5px; font-family: inherit; min-height: 62px; resize: vertical; }
    .thread-form textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px var(--gold-soft); }
.thread-form .thread-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.thread-note { font-size: 13px; color: var(--text-2); font-style: italic; }

/* responsive */
.mobile-filter-btn { display: none; }

@media (max-width: 960px) {
    .explorer { grid-template-columns: 1fr; }
    .fpanel { position: fixed; left: 0; top: 0; bottom: 0; width: 300px; z-index: 30; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--sd-lg); }
        .fpanel.open { transform: translateX(0); }
    .mobile-filter-btn { display: inline-flex; }
}
