/* /notams — built on theme.css tokens (--t-*), so light and dark mode follow
   the rest of the site without per-element dark rules. */

.nt-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 16px 16px 40px;
    color: var(--t-ink);
    /* the page body fell back to a serif face for plain <p> text */
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Bootswatch Litera puts every <p> in Georgia (destination.html undoes it the same way) */
.nt-page p { font-family: inherit; }

/* Select2 sizes the dropdown from the select's own width, not the framed
   field; pin it to the field, from either side (RTL). */
.nt-select-wrap > .select2-container--open:not(.select2) {
    left: 0 !important;
    right: 0 !important;
}

.nt-select-wrap .select2-dropdown { width: 100% !important; }

.nt-crumbs { font-size: .85rem; margin-bottom: 12px; }

.nt-head h1 {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--t-ink);
}

.nt-head p { margin: 0 0 20px; color: var(--t-ink2); }

/* ---- search ------------------------------------------------------------ */
.nt-search {
    background: var(--t-surface);
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius);
    box-shadow: var(--t-e1);
    padding: 16px;
    margin-bottom: 20px;
}

.nt-label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--t-ink3);
    margin-bottom: 6px;
}

.nt-search-row { display: flex; gap: 8px; }

/* position:relative anchors Select2's dropdown (dropdownParent) to this box,
   so it is as wide as the field, not the window */
.nt-select-wrap { position: relative; flex: 1; min-width: 0; }

/* theme.css strips fields to borderless text; this one stands alone in a
   card and needs its frame. The doubled classes outrank theme.css. */
html body .nt-search .select2-container--default .select2-selection--single.select2-selection--single {
    height: 44px !important;
    display: flex;
    align-items: center;
    padding-inline: 12px 32px;
    border: 1px solid var(--t-line) !important;
    background-color: var(--t-well) !important;
    border-radius: var(--t-radius-sm) !important;
}

html body .nt-search .select2-container--focus .select2-selection--single.select2-selection--single,
html body .nt-search .select2-container--open .select2-selection--single.select2-selection--single {
    border-color: var(--t-accent) !important;
}

html body .nt-search .select2-container .select2-selection--single .select2-selection__arrow {
    display: block !important;
    height: 100% !important;
    top: 0 !important;
}

.nt-search .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-search .select2-dropdown {
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius-sm);
    background: var(--t-surface);
    box-shadow: var(--t-e3);
    overflow: hidden;
}

.nt-search .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--t-line);
    border-radius: 8px;
    background: var(--t-well);
    color: var(--t-ink);
    padding: 6px 10px;
}

.nt-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--t-radius-sm);
    font-weight: 600;
    white-space: nowrap;
}

.nt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.nt-chip {
    border: 1px solid var(--t-line);
    background: var(--t-well);
    color: var(--t-ink);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: .85rem;
    font-weight: 500;
}

.nt-chip:hover { border-color: var(--t-accent); }

.nt-chip[aria-pressed="true"] {
    background: var(--t-accent);
    border-color: var(--t-accent);
    color: #fff;
}

/* ---- results bar ------------------------------------------------------- */
.nt-bar { margin-bottom: 12px; }

.nt-bar-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.nt-bar-title strong { font-size: 1.05rem; }

.nt-muted, .nt-note { color: var(--t-ink3); font-size: .85rem; }

.nt-note { margin: 8px 0 0; }

.nt-filters { display: flex; flex-wrap: wrap; gap: 6px; }

.nt-filter {
    border: 1px solid var(--t-line);
    background: var(--t-surface);
    color: var(--t-ink2);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: .85rem;
    font-weight: 600;
}

.nt-filter span {
    margin-inline-start: 4px;
    font-weight: 700;
    color: var(--t-ink3);
}

.nt-filter.is-on {
    background: var(--t-ink);
    border-color: var(--t-ink);
    color: var(--t-surface);
}

.nt-filter.is-on span { color: inherit; opacity: .75; }

/* ---- cards ------------------------------------------------------------- */
.nt-list { display: grid; gap: 12px; }

.nt-card {
    --sev: var(--t-accent);
    background: var(--t-surface);
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius-sm);
    box-shadow: var(--t-e1);
    padding: 14px 16px;
}

.nt-card.sev-closed { --sev: var(--t-bad); }
.nt-card.sev-limited { --sev: var(--t-warn); }
.nt-card.st-ended { opacity: .6; }

.nt-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.nt-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sev);
}

.nt-status {
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-well);
    color: var(--t-ink2);
    white-space: nowrap;
}

.nt-card.st-active .nt-status { background: var(--t-ok-bg); color: var(--t-ok); }

.nt-headline {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--t-ink);
}

.nt-period {
    margin: 0 0 8px;
    font-size: .85rem;
    color: var(--t-ink2);
    unicode-bidi: plaintext;
}

.nt-period i { color: var(--t-ink3); }
.nt-period time { white-space: nowrap; }

.nt-text {
    margin: 0 0 8px;
    line-height: 1.55;
    color: var(--t-ink);
    text-align: start;
}

[dir="rtl"] .nt-text { text-align: left; }

.nt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0 0 8px;
    font-size: .85rem;
}

.nt-meta dt { font-weight: 600; color: var(--t-ink3); }
.nt-meta dd { margin: 0; }

.nt-raw summary {
    cursor: pointer;
    font-size: .8rem;
    color: var(--t-ink3);
}

.nt-id { font-family: ui-monospace, Consolas, monospace; font-weight: 600; color: var(--t-ink2); }

.nt-raw pre {
    margin: 8px 0 0;
    padding: 10px 12px;
    background: var(--t-well);
    border-radius: 8px;
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--t-ink);
}

/* ---- states ------------------------------------------------------------ */
.nt-state {
    padding: 28px 16px;
    text-align: center;
    color: var(--t-ink2);
    background: var(--t-surface);
    border: 1px dashed var(--t-line);
    border-radius: var(--t-radius-sm);
}

.nt-state.is-error { color: var(--t-bad); border-color: var(--t-bad); }

/* ---- guide ------------------------------------------------------------- */
.nt-guide {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--t-line);
    color: var(--t-ink2);
    line-height: 1.6;
}

.nt-guide h2 { font-size: 1.2rem; font-weight: 700; color: var(--t-ink); }
.nt-guide h3 { font-size: 1rem; font-weight: 700; color: var(--t-ink); margin-top: 16px; }
.nt-disclaimer { font-size: .85rem; color: var(--t-ink3); }

.nt-credit { margin-top: 16px; font-size: .8rem; text-align: center; }

@media (max-width: 576px) {
    .nt-search-row { flex-direction: column; }
    .nt-go { justify-content: center; }
}
