/* /tools/pst-checker - page-specific styles. Loaded only on that page via
   <link> in HeadContent so it doesn't bloat the rest of the marketing site.
   Uses the same --em-* tokens as marketing.css and matches the visual
   language of the existing format/use-case pages. */

.pst-checker-section { padding-top: 2rem; }

.pst-uploader {
    background: var(--mkt-card-bg, #fff);
    border: 1px solid var(--mkt-border, #e5e7eb);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}

:root[data-theme='dark'] .pst-uploader {
    background: var(--mkt-card-bg, #0f172a);
    border-color: var(--mkt-border, #1f2937);
}

.pst-drop {
    border: 2px dashed var(--em-blue, #2563EB);
    border-radius: 12px;
    padding: 56px 24px;
    text-align: center;
    transition: background-color 120ms ease, border-color 120ms ease;
    cursor: pointer;
}

.pst-drop--hover {
    background-color: rgba(37, 99, 235, 0.06);
    border-color: var(--em-blue-hov, #1d4ed8);
}

.pst-drop-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
}

.pst-drop-title {
    font-size: 1.5rem;
    margin: 0 0 6px;
}

.pst-drop-sub {
    color: var(--em-muted, #6b7280);
    margin: 0 0 4px;
}

.pst-drop-hint {
    font-size: 0.875rem;
    color: var(--em-muted, #6b7280);
    margin: 0 0 20px;
}

.pst-drop-button {
    margin-top: 8px;
}

.pst-noscript {
    margin-top: 16px;
    color: var(--em-muted, #6b7280);
    font-size: 0.95rem;
}

/* Progress */
.pst-progress {
    padding: 16px 4px;
}

.pst-progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 8px;
}

.pst-progress-bar {
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.pst-progress-fill {
    background: var(--em-blue, #2563EB);
    height: 100%;
    width: 0%;
    transition: width 240ms ease;
}

.pst-progress-hint {
    font-size: 0.875rem;
    color: var(--em-muted, #6b7280);
    margin: 12px 0 0;
}

/* Error */
.pst-error {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #b91c1c;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

:root[data-theme='dark'] .pst-error {
    background: rgba(248, 113, 113, 0.08);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.3);
}

.pst-error .btn { margin-left: auto; }

/* Result */
.pst-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pst-result-title {
    margin: 4px 0 0;
    font-size: 1.5rem;
    word-break: break-word;
}

.pst-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.pst-stat {
    background: var(--mkt-tint, #f8fafc);
    border-radius: 12px;
    padding: 16px 18px;
}

:root[data-theme='dark'] .pst-stat {
    background: rgba(255, 255, 255, 0.04);
}

.pst-stat-label {
    font-size: 0.8125rem;
    color: var(--em-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.pst-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--em-ink, #0f172a);
}

:root[data-theme='dark'] .pst-stat-value {
    color: var(--em-ink, #f1f5f9);
}

.pst-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.pst-detail-card {
    background: var(--mkt-tint, #f8fafc);
    border-radius: 12px;
    padding: 20px;
}

:root[data-theme='dark'] .pst-detail-card {
    background: rgba(255, 255, 255, 0.04);
}

.pst-detail-title {
    font-size: 1rem;
    margin: 0 0 12px;
    color: var(--em-ink, #0f172a);
}

:root[data-theme='dark'] .pst-detail-title {
    color: var(--em-ink, #f1f5f9);
}

.pst-sender-list {
    list-style: decimal;
    padding-left: 1.4em;
    margin: 0;
}

.pst-sender-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pst-sender-list li:last-child { border-bottom: none; }

.pst-sender-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pst-sender-count {
    color: var(--em-muted, #6b7280);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pst-folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
}

.pst-folder-list li {
    padding: 4px 0;
    color: var(--em-ink, #0f172a);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    word-break: break-all;
}

:root[data-theme='dark'] .pst-folder-list li {
    color: var(--em-ink, #e2e8f0);
}

.pst-folder-more {
    margin: 12px 0 0;
    font-size: 0.8125rem;
    color: var(--em-muted, #6b7280);
}

.pst-empty {
    margin: 0;
    color: var(--em-muted, #6b7280);
}

/* CTA */
.pst-cta-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
}

.pst-cta-card h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.pst-cta-card p {
    margin: 0 0 20px;
    color: var(--em-muted, #4b5563);
}

:root[data-theme='dark'] .pst-cta-card p {
    color: #cbd5e1;
}

.pst-cta-fine {
    margin: 14px 0 0 !important;
    font-size: 0.8125rem;
    color: var(--em-muted, #6b7280) !important;
}

/* Mobile */
@media (max-width: 600px) {
    .pst-uploader { padding: 20px; }
    .pst-drop { padding: 36px 16px; }
    .pst-drop-title { font-size: 1.25rem; }
    .pst-stat-value { font-size: 1.25rem; }
}
