/* WNC Design System - Retention Schedule Search */
@import url('https://fonts.googleapis.com/css2?family=Asap:wght@400;500;600;700&display=swap');

:root {
    --wnc-primary: #0E335B;
    --wnc-secondary: #385889;
    --wnc-gold: #E2CA76;
    --wnc-text: #3C3C3B;
    --wnc-bg: #F5F5F5;
    --wnc-white: #FFFFFF;
    --wnc-border: #000000;
    --wnc-link: #385889;
    --wnc-focus-ring: #E2CA76;
    --wnc-tag-pii: #d4351c;
    --wnc-tag-scd: #912b88;
    --wnc-tag-statutory: #1d70b8;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    font-family: 'Asap', Helvetica, Arial, sans-serif;
    font-size: 19px;
    line-height: 1.45;
    color: var(--wnc-text);
    background: var(--wnc-white);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.wnc-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

/* Breadcrumb */
.wnc-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 20px;
    color: var(--wnc-link);
}

.wnc-breadcrumb a {
    color: var(--wnc-link);
    text-decoration: underline;
}

.wnc-breadcrumb a:hover {
    text-decoration: none;
}

.wnc-breadcrumb .separator {
    margin: 0 6px;
    color: #999;
}

/* Headings */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wnc-text);
    margin: 0 0 16px;
    line-height: 1.2;
}

.wnc-intro {
    font-size: 1rem;
    color: #505050;
    margin-bottom: 30px;
    max-width: 700px;
}

/* Search */
.search-container {
    background: var(--wnc-bg);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.search-bar {
    display: flex;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--wnc-border);
    border-radius: 6px 0 0 6px;
    min-height: 44px;
    outline: none;
}

.search-bar input:focus,
.search-bar input:active {
    border: 2px solid var(--wnc-border);
    box-shadow: 0 0 0 2px var(--wnc-focus-ring), 0 0 0 4px var(--wnc-border);
    border-radius: 6px 0 0 6px;
}

.search-bar button {
    min-height: 44px;
    width: 48px;
    border: 2px solid var(--wnc-border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: var(--wnc-text);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.search-bar button:hover {
    background: var(--wnc-primary);
}

.search-bar button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--wnc-focus-ring), 0 0 0 4px var(--wnc-border);
}

/* Filters */
.filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--wnc-text);
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 2px solid var(--wnc-border);
    border-radius: 6px;
    min-height: 44px;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-group select:focus {
    box-shadow: 0 0 0 2px var(--wnc-focus-ring), 0 0 0 4px var(--wnc-border);
}

/* Results summary */
.results-summary {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #505050;
}

.results-summary strong {
    color: var(--wnc-text);
}

/* Result cards */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: var(--wnc-white);
    border: 1px solid #ddd;
    border-left: 4px solid var(--wnc-secondary);
    border-radius: 4px;
    padding: 20px 24px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.result-card:hover {
    border-left-color: var(--wnc-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-card h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--wnc-primary);
    margin: 0 0 12px;
    line-height: 1.35;
}

.result-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-row {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.meta-label {
    font-weight: 600;
    color: #505050;
    min-width: 120px;
    flex-shrink: 0;
}

.meta-value {
    color: var(--wnc-text);
}

.retention-period .meta-value {
    color: var(--wnc-primary);
}

.meta-row.notes {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* Tags */
.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    margin-top: 8px;
    margin-right: 6px;
    color: white;
    letter-spacing: 0.02em;
}

.tag-pii {
    background: var(--wnc-tag-pii);
}

.tag-scd {
    background: var(--wnc-tag-scd);
}

.tag-statutory {
    background: var(--wnc-tag-statutory);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.page-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    border: 2px solid var(--wnc-primary);
    border-radius: 6px;
    background: white;
    color: var(--wnc-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.page-btn:hover {
    background: var(--wnc-primary);
    color: white;
}

.page-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--wnc-focus-ring), 0 0 0 4px var(--wnc-border);
}

.page-info {
    font-size: 0.85rem;
    color: #505050;
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #505050;
    font-size: 0.95rem;
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .wnc-page {
        padding: 16px 16px 40px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .search-container {
        padding: 16px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .meta-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .meta-label {
        min-width: auto;
    }
    
    .result-card {
        padding: 16px;
    }
}

/* WASM badge */
.wasm-badge {
    font-size: 0.5em;
    background: #9b59b6;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: 600;
    letter-spacing: 0.05em;
}
