/* issues + headlines screens. Owned by the "Issues + Headlines" build session; shared tokens and classes are in app.css. */

/* dialogs (issue detail, new issue, headline edit) */
dialog.eos-dialog { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto; background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
dialog.eos-dialog::backdrop { background: rgba(20, 14, 10, .45); }
dialog.eos-dialog h2 { margin-bottom: .3rem; }
dialog.eos-dialog h2 .subtitle { font-size: .9rem; }
dialog.eos-dialog .actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
dialog.eos-dialog .actions.split { justify-content: space-between; }
dialog.eos-dialog .actions .left, dialog.eos-dialog .actions .right { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
dialog.eos-dialog .actions .right { margin-left: auto; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 .75rem; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
@media (max-width: 560px) { .row-3, .row-2 { grid-template-columns: 1fr; } }

/* issue lists */
.issues-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.issues td { vertical-align: top; }
table.issues td.title { min-width: 280px; }
table.issues td.owner, table.issues td.date, table.issues td.list { white-space: nowrap; }
table.issues th.rank, table.issues td.rank { width: 4.5rem; }
table.issues td.act { width: 1%; white-space: nowrap; text-align: right; }
table.issues .issue-title { text-decoration: none; color: var(--text); font-weight: 600; text-align: left; }
table.issues .issue-title:hover { text-decoration: underline; color: var(--link); }
table.issues .desc { margin-top: .15rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.issues tr.ranked td.rank { box-shadow: inset 3px 0 0 var(--brand); }
.rank-pick { width: 3.6rem; min-height: 30px; padding: .2rem .3rem; }
tr.ranked .rank-pick { background: var(--ok-bg); color: var(--ok-text); font-weight: 700; border-color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin-top: .6rem; }
.pager .muted { margin-right: auto; }

/* issue detail: comments */
.comments-box { border-top: 1px solid var(--line); margin-top: 1rem; }
.comments { max-height: 260px; overflow-y: auto; }
.comments li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.comments li:last-child { border-bottom: 0; }
.comments .c-body { white-space: pre-wrap; margin-top: .15rem; overflow-wrap: anywhere; }
.comments .c-del { margin-left: .6rem; }
.c-add { display: flex; gap: .5rem; align-items: flex-end; margin-top: .5rem; }
.c-add textarea { flex: 1; }

/* headlines */
.hl-section { margin-bottom: 1.5rem; }
.hl-list { display: grid; gap: .6rem; }
ul.plain.hl-list li + li { margin-top: 0; }
.hl-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem; box-shadow: var(--shadow); }
.hl-item.archived { background: transparent; box-shadow: none; }
.hl-top { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.hl-top .badge, .hl-top .tag { margin-left: 0; }
.hl-title { font-size: 1rem; }
.hl-body { white-space: pre-wrap; margin-top: .3rem; overflow-wrap: anywhere; }
.hl-meta { margin-top: .35rem; }
.hl-actions { display: flex; gap: .4rem; margin-top: .55rem; flex-wrap: wrap; }
.badge.kind-customer { background: #dbe8fb; color: #163f7a; }
.badge.kind-employee { background: #e3ecd0; color: #2f4a12; }
.badge.kind-general { background: var(--surface-2); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .badge.kind-customer { background: #1f3354; color: #c6dbfb; }
  .badge.kind-employee { background: #2c3a16; color: #c3d98f; }
}
fieldset.share { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem .6rem; margin: 0 0 .75rem; }
fieldset.share legend { font-size: .82rem; font-weight: 600; color: var(--muted); padding: 0 .3rem; }
fieldset.share .check { align-items: center; gap: .3rem; padding-right: .6rem; }
fieldset.share .check input { margin-top: 0; }
fieldset.share .hint { margin-top: .35rem; }
