﻿/* Reusable components - structural rules only, colors live in themes */

/* Listing Table */
.listing-table th {
    text-align: left;
}

.listing-table th,
.listing-table td {
    padding: 0.25rem 0.5rem;
}

.listing-table th.numeric,
.listing-table td.numeric {
    text-align: right;
}

.listing-table th,
.listing-table td {
    padding: 0.25rem 0.5rem;
    vertical-align: top;
}

.listing-table th:not(.main-column),
.listing-table td:not(.main-column) {
    white-space: nowrap;
    width: 1px;
    text-align: right;
}

.listing-table th.main-column {
    text-align: left;
}

/* Stat Table */
.stat-table {
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}

.stat-table th, .stat-table td {
    padding: 0.25rem 0.5rem;
}

.stat-table tbody tr th,
.stat-table tbody tr td {
    text-align: right;
}

.stat-table tbody tr th {
    font-weight: normal;
}

/* Data Table */
.data-table-container.nowrap {
    white-space: nowrap;
}

.data-table {
    font-size: var(--size-sm);
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
    font-variant-numeric: tabular-nums;
}

.data-table caption {
    font-weight: 600;
    font-size: var(--size-md);
}

.data-table thead th {
    vertical-align: bottom;
    line-height: 1.2;
    text-align: left;
    font-weight: normal;

    position: sticky;
    top: 0;
    text-decoration: underline;
    cursor: pointer;
}

.data-table thead th,
.data-table td {
    padding: 0 0.35rem;
}

.data-table thead th {
    padding-bottom: 0.25rem;
}

.data-table thead th.center,
.data-table td.center {
    text-align: center;
}

.data-table thead th.numeric,
.data-table td.numeric {
    text-align: right;
}

/* Blog Listing */
ol#blog-listing {
    list-style-type: none;
    padding: 0;
}

ol#blog-listing > li {
    margin-top: 1rem;
}

ol#blog-listing li a.article-title {
    display: block;
}

/* Blog Header */
.topic-line + p {
    margin-top: 0;
}

/* Post Metadata Strip */
ul.post-meta {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: var(--size-sm);
}

ul.post-meta li {
    margin: 0;
}

ul.post-meta address.author {
    display: inline;
    font-style: normal;
}

/* Tag list - reusable pill/chip container for tags */
ul.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
}

ul.tag-list li {
    margin: 0;
    display: inline;
}

/* Empty state - shown when a listing has no results */
.empty-state {
    padding: 2rem 1rem;
    text-align: center;
}

.empty-state h2 {
    border: none;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin: 0;
}

/* Post navigation (Older / Newer at bottom of article) */
nav.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
}

nav.post-nav .post-nav-older,
nav.post-nav .post-nav-newer {
    flex: 1 1 0;
    min-width: 0;
}

nav.post-nav .post-nav-newer {
    text-align: right;
}

nav.post-nav a {
    display: inline-block;
    text-decoration: none;
}

nav.post-nav .post-nav-direction {
    display: block;
    font-size: var(--size-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

nav.post-nav .post-nav-title {
    display: block;
    font-family: var(--font-display);
    font-size: var(--size-base);
}

/* Blog Viewer */
pre {
    max-width: max-content;
}

pre.powershell-console {
    white-space: pre-wrap;
    word-break: break-all;
}

code {
    border-radius: 6px;
    padding: 4px;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: var(--size-sm);
}

pre code {
    padding: 1rem;
    display: block;
    overflow-x: auto;
}

pre code::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.coding-task {
    font-family: var(--font-mono);
    margin-bottom: -0.5rem;
}

/* Windows */
div.window {
    max-width: max-content;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.5);
}

div.window div.window-title {
    margin-top: 0.25rem;
    margin-left: 0.25rem;
    padding: 0.25rem 1rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: inline-block;
    font-size: var(--size-xs);
}

div.window div.window-content {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 1rem;
}

div.window div.window-content pre {
    overflow-x: auto;
    font-size: var(--size-base);
    margin: 0;
}

div.window div.window-content pre::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

/* Blog Manager (forms) */
.validation-summary-valid {
    display: none;
}

.validation-summary-errors {
    margin: 1rem;
    padding: 1rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group.col-250 {
    width: 250px;
}

input, textarea {
    width: 100%;
    font-family: inherit;
    font-size: var(--size-base);
    padding: 0.5rem;
    border-radius: 5px;
    box-sizing: border-box;
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.25) inset;
}

textarea {
    height: 500px;
}
textarea.small {
    height: 100px;
}

.button-bar {
    margin: 1rem 0;
}

/* Article-level footer (e.g. citations, notes). Structural rules only -
   colors handled by the theme via article > footer. */
article > footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: var(--size-sm);
}

article > footer ol {
    padding-inline-start: 1.5rem;
}
