/* Blog folder (Finder 10.3 list view) + post documents (TextEdit). Every rule is scoped to
   .pblog-* so nothing here can reach the other windows. Values mirror index.html's
   .finder-table / .itunes-table header and row styles and .textedit-doc. */

/* ---------- Finder list view ---------- */
.pblog-list {
  height: 100%;
  min-height: 60px;
  overflow: auto;
  background: #fff;
  outline: none;
  container-type: inline-size;
  -webkit-user-select: none;
  user-select: none;
}
.pblog-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: "Lucida Grande", "Lucida Grande Web", Geneva, Verdana, sans-serif;
  font-size: 11.5px;
  color: #000;
  cursor: default;
}
/* Panther list header: near-white dipping to #e9e9e9 mid-height; the sorted column is blue gel */
.pblog-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: linear-gradient(180deg, #fff 0%, #f2f2f2 45%, #e9e9e9 50%, #f2f2f2 60%, #fff 100%);
  border-bottom: 1px solid #666;
  border-left: 1px solid #c3c3c3;
  padding: 0 6px;
  height: 16px;
  line-height: 15px;
  font-size: 11px;
  font-weight: 400;
  white-space: nowrap;
}
.pblog-table th:first-child { border-left: 0; }
.pblog-table th.pblog-sorted {
  background: linear-gradient(180deg, #c7e1fb 0%, #9cc8f4 45%, #79b0ee 50%, #92c3f5 60%, #c9e2fb 100%);
  padding-right: 18px;
  position: sticky;
}
/* sort arrow: right-aligned triangle; up = ascending, down = descending */
.pblog-table th.pblog-sorted::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 5px;
  width: 7px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath d='M3.5 0L7 6H0z' fill='%23222'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pblog-table th.pblog-sorted.pblog-desc::after { transform: rotate(180deg); }
.pblog-table td {
  padding: 1px 6px;
  height: 17px;
  line-height: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pblog-table .pblog-c-name { width: 36%; }
.pblog-table .pblog-c-date { width: 24%; }
.pblog-table .pblog-c-size { width: 9%; text-align: right; }
.pblog-table th.pblog-c-size { text-align: right; }
.pblog-table .pblog-c-kind { width: 31%; }
.pblog-table td.pblog-c-date, .pblog-table td.pblog-c-size, .pblog-table td.pblog-c-kind { color: #333; }
.pblog-table tbody tr:nth-child(odd) { background: #fff; }
.pblog-table tbody tr:nth-child(even) { background: #edf3fe; }
.pblog-table tbody tr.pblog-selected { background: #3a81e0; }
.pblog-table tbody tr.pblog-selected td { color: #fff; }
/* Finder dims the selection to grey when the list is not the key view */
.pblog-list:not(:focus-within) .pblog-table tbody tr.pblog-selected { background: #c9c9c9; }
.pblog-list:not(:focus-within) .pblog-table tbody tr.pblog-selected td { color: #000; }
.pblog-ico { width: 16px; height: 16px; vertical-align: -4px; margin-right: 4px; }
.pblog-fname { vertical-align: 0; }

/* narrow windows (and phones): Kind goes first, then Size */
@container (max-width: 460px) {
  .pblog-table .pblog-c-kind { display: none; }
  .pblog-table .pblog-c-name { width: 58%; }
  .pblog-table .pblog-c-date { width: 30%; }
  .pblog-table .pblog-c-size { width: 12%; }
}
@container (max-width: 300px) {
  .pblog-table .pblog-c-size { display: none; }
  .pblog-table .pblog-c-name { width: 60%; }
  .pblog-table .pblog-c-date { width: 40%; }
}

/* ---------- TextEdit document ---------- */
.pblog-doc {
  max-width: 620px;
  font-family: "Lucida Grande", "Lucida Grande Web", Geneva, Verdana, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #242629;
  -webkit-user-select: text;
  user-select: text;
  overflow-wrap: anywhere;
}
.pblog-title {
  margin: 2px 0 2px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #111;
}
.pblog-date {
  display: block;
  margin: 0 0 12px;
  font-size: 11px;
  color: #6b6f76;
}
.pblog-body p { margin: 0 0 10px; }
.pblog-body ul, .pblog-body ol { margin: 0 0 10px; padding-left: 22px; }
.pblog-body .pblog-h { margin: 14px 0 6px; font-weight: bold; line-height: 1.25; }
.pblog-body h2.pblog-h { font-size: 15px; }
.pblog-body h3.pblog-h { font-size: 13px; }
.pblog-body h4.pblog-h { font-size: 12px; font-style: italic; }
.pblog-body li { margin: 0 0 2px; }
.pblog-body a { color: #0000ee; text-decoration: underline; }
.pblog-body a:visited { color: #551a8b; }
.pblog-body code {
  font-family: Monaco, "Lucida Console", monospace;
  font-size: 11px;
  background: #f1f2f4;
  padding: 0 2px;
}
.pblog-body .pblog-fig { margin: 4px 0 12px; }
.pblog-body .pblog-img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #888;
  padding: 3px;
  background: #fff;
  box-sizing: border-box;
}
.pblog-body p > .pblog-img { display: inline-block; vertical-align: middle; max-height: 1.6em; padding: 0; border: 0; }
.pblog-body .pblog-fig > .pblog-img { max-height: none; padding: 3px; border: 1px solid #888; display: block; }
.pblog-empty { padding: 10px; color: #6b6f76; font-size: 11px; }
