/* "Pipeline-Plus" pages. Loaded after pipeline.css and uses its colors (--wvges-navy, --panel-bg and so on),
   so the pages share the "Pipeline" banner, search panel and footer look. */

/* Banner menu: the current page in the breadcrumb's maroon; the menu stays at the right when it wraps. */
.banner-bottom nav.links { margin-left: auto; }
/* The current page's menu link (maroon, bold) is styled in pipeline.css, for both menus. */

.heading-note {
    margin-left: 0.75rem;
    font-size: 0.8rem;
    font-weight: normal;
    color: #000;
}

/* Text pages (overview, help, file repositories) */
.pp-text { max-width: 75rem; }
.pp-text h2 {
    margin: 1rem 0 0.25rem;
    font-size: 0.95rem;
    color: var(--wvges-navy);
}
.pp-text h2 a { color: inherit; }
.pp-text .help-link { font-size: 0.8rem; font-weight: normal; }
.pp-text .help-link a { color: var(--wvges-navy); }
.pp-text p { margin: 0.35rem 0 0.6rem; }
.pp-help-list { padding-left: 1.5rem; }
.pp-help-list li { margin-bottom: 0.5rem; }
.pp-link-list { margin: 0.25rem 0 0.75rem; padding-left: 1.75rem; font-size: 0.95rem; }
.pp-link-list li { margin: 0.3rem 0; }
.pp-rule { margin-top: 1rem; padding-top: 0.25rem; border-top: 1px solid #43649d; }
.pp-intro { margin: 0 0 0.5rem; max-width: 60rem; }
.pp-address, .pp-contact-lines { margin: 1rem 0; font-style: normal; line-height: 1.5; }
.pp-address { font-size: 0.95rem; }
.pp-figure { margin: 0.5rem 0 1rem; }
.pp-figure img { display: block; max-width: 100%; height: auto; border: 1px solid #8c8c8c; }
.pp-figure-wide img { max-width: none; }

/* Search panels: the "Pipeline" search panel (light sand, navy border, strata stripe across the top). */
.pp-search {
    position: relative;
    width: fit-content;
    max-width: 100%;
    padding: calc(6px + 0.4rem) 0.75rem 0.5rem;
    border: 1px solid var(--wvges-navy);
    border-radius: 4px;
    background: var(--panel-bg);
    overflow: hidden;
}
.pp-search::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to bottom,
        var(--wvges-sky) 0 2px,
        var(--wvges-sand) 2px 4px,
        var(--wvges-green) 4px 5px,
        var(--wvges-brown) 5px 6px);
}
.pp-search .errors { margin-bottom: 0.5rem; }

/* Label on the left (right-aligned, as on the old forms), control on the right. */
.pp-row {
    display: grid;
    grid-template-columns: var(--pp-label-width, 12rem) minmax(0, auto);
    align-items: center;
    gap: 0.1rem 0.5rem;
    margin: 0.15rem 0;
}
.pp-row > label,
.pp-batch legend,
.pp-inline label,
.pp-inline-form label {
    font-weight: bold;
    color: var(--wvges-navy);
}
.pp-row > label { text-align: right; }
.pp-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.5rem;
}

.pp-search select,
.pp-search input[type="text"],
.pp-inline-form select {
    font: inherit;
    color: #000;
    background: #fff;
    border: 1px solid var(--wvges-navy);
    border-radius: 3px;
    padding: 0 0.25rem;
    min-height: 1.4rem;
    max-width: 100%;
}
.pp-search input[type="checkbox"] {
    margin: 0;
    width: 0.95rem;
    height: 0.95rem;
    accent-color: var(--wvges-navy);
}
.w-api { width: 11ch; font-variant-numeric: tabular-nums; }
.w-num { width: 7ch; font-variant-numeric: tabular-nums; }
.w-date { width: 11ch; font-variant-numeric: tabular-nums; }
.w-text { width: 14ch; }
.hint { font-size: 0.75rem; color: #3d3d3d; }
.pp-search .field-error { flex-basis: auto; font-weight: bold; }
input[aria-invalid="true"] { border-color: var(--accent-red) !important; outline: 1px solid var(--accent-red); }

/* Header search: two columns of fields, then the list options and instructions. */
.pp-search-header { --pp-label-width: 13.5rem; }
.pp-cols { display: flex; flex-wrap: wrap; gap: 0 2rem; }
.pp-col { min-width: 0; }
.pp-col:last-child { --pp-label-width: 15.5rem; }
.pp-options {
    display: grid;
    grid-template-columns: auto minmax(0, 32rem);
    grid-template-rows: auto auto;
    gap: 0 2rem;
    margin-top: 0.35rem;
}
.pp-options .pp-row:first-child { grid-column: 1; grid-row: 1; }
.pp-options .pp-row:nth-child(2) { grid-column: 1; grid-row: 2; }
.pp-instructions {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0.15rem 0 0;
    color: var(--wvges-navy);
}
.pp-instructions a { color: var(--wvges-navy); }
.pp-search .actions { margin-top: 0.4rem; padding-left: calc(var(--pp-label-width, 12rem) + 0.5rem); }
.pp-search-header .actions { padding-left: 0; }
.actions .pp-export {
    margin-left: 1.5rem;
    padding: 0.05rem 0.6rem;
    border: 1px solid var(--wvges-navy);
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
    font-weight: bold;
}
.actions .pp-export:hover { text-decoration: underline; }
button.pp-secondary,
.pp-inline-form button {
    font: inherit;
    font-weight: bold;
    color: var(--wvges-navy);
    background: #fff;
    border: 1px solid var(--wvges-navy);
    border-radius: 3px;
    padding: 0 0.6rem;
    cursor: pointer;
}

/* Digital Records Search: the form and list on the left, the file viewer frame on the right (650 px, as before). */
.pp-search-records { --pp-label-width: 8rem; width: auto; }
.pp-records {
    display: grid;
    /* The list gets about 60% of the window, the viewer 40% (at most 650 px, the old frame width). */
    grid-template-columns: minmax(0, 1fr) clamp(20rem, 40vw, 650px);
    gap: 0.75rem;
    align-items: start;
}
.pp-records-main { min-width: 0; }
.pp-records-viewer {
    position: sticky;
    top: 0.5rem;
}
.pp-records-viewer iframe {
    display: block;
    width: 100%;
    height: min(750px, calc(100vh - 1rem));
    border: 1px solid var(--wvges-navy);
    border-radius: 4px;
    background: #fff;
}
.pp-batch {
    margin: 0.35rem 0;
    padding: 0.3rem 0.5rem 0.35rem calc(var(--pp-label-width) + 0.5rem);
    border: 0;
    border-top: 1px dotted var(--wvges-navy);
    border-bottom: 1px dotted var(--wvges-navy);
    position: relative;
}
.pp-batch legend {
    float: left;
    width: var(--pp-label-width);
    margin-left: calc(-1 * (var(--pp-label-width) + 0.5rem));
    padding: 0.1rem 0.5rem 0 0;
    text-align: right;
}
.pp-batch-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.pp-inline { display: inline-flex; align-items: center; gap: 0.35rem; }
#f-batchdate { min-width: 11rem; }
#f-month { min-width: 7rem; }
.pp-batch-range { display: flex; flex-wrap: wrap; gap: 0 2rem; margin: 0.2rem 0 0; }
.pp-batch .hint { clear: both; margin: 0.1rem 0 0; max-width: 40rem; }
select:disabled { background: #ececec !important; color: #595959 !important; }

@media (max-width: 70rem) {
    .pp-records { grid-template-columns: minmax(0, 1fr); }
    .pp-records-viewer { position: static; }
    .pp-records-viewer iframe { height: 600px; }
}

/* Result lists */
.pp-results { margin-top: 0.75rem; }
.pp-count { margin: 0.25rem 0; font-weight: bold; }
.pp-grid {
    border-collapse: collapse;
    border: 1px solid var(--wvges-navy);
    font-size: var(--table-size);
}
.pp-grid caption { caption-side: top; text-align: left; padding: 0 0 0.2rem; font-size: 0.75rem; color: #3d3d3d; }
.pp-grid thead th {
    background: var(--wvges-navy);
    color: #fff;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
    vertical-align: bottom;
}
.pp-grid td,
.pp-grid tbody th {
    padding: 0.1rem 0.4rem;
    font-weight: normal;
}
.pp-grid tbody tr:nth-child(even) { background: #f6f0e4; }
.pp-grid tbody tr:hover { background: #e8eef5; }
.pp-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.pp-grid .large { color: var(--accent-red); font-weight: bold; }
.pp-grid-roomy { font-size: var(--body-size); }
.pp-grid-roomy td, .pp-grid-roomy tbody th { padding: 0.15rem 0.6rem; }
/* position: relative keeps the hidden screen-reader text inside the scrolling box on narrow screens. */
.table-scroll { position: relative; margin: 0.25rem 0; }

.pp-pager ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.6rem;
    margin: 0.3rem 0;
    padding: 0;
    list-style: none;
}
.pp-pager a { color: var(--wvges-navy); }
.pp-pager [aria-current="page"] {
    font-weight: bold;
    padding: 0 0.3rem;
    border: 1px solid var(--wvges-navy);
    border-radius: 3px;
    background: var(--panel-bg);
}

/* Small forms with one drop-down (images per page, county, data type) */
.pp-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.6rem;
    margin: 0.5rem 0 0.75rem;
}

/* Core viewer */
.pp-well-info {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.15rem 0.6rem;
    margin: 0 0 0.5rem;
}
.pp-well-info dt { font-weight: bold; color: var(--wvges-navy); }
.pp-well-info dd { margin: 0; }
.pp-note { font-style: italic; }
.pp-thanks { color: var(--wvges-navy); }
.pp-photo-pager { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1.5rem; margin: 0.5rem 0; }
.pp-photo-pager a { font-weight: bold; color: var(--wvges-navy); }
.pp-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pp-photos img { display: block; max-width: 250px; height: auto; border: 1px solid #8c8c8c; }
.pp-photos a:focus-visible img { outline: 3px solid var(--wvges-navy); outline-offset: 2px; }

/* Data counts */
.pp-counts h2 { font-size: 0.95rem; margin: 0.5rem 0 0.15rem; }
.pp-counts p { margin: 0.1rem 0; }
.pp-total { font-weight: bold; }
.pp-count-columns { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; margin-top: 0.5rem; }

/* Disclaimer page shown inside the Digital Records Search viewer frame */
.pp-frame-start { margin: 0.75rem 1rem; }
.pp-frame-start .disclaimer { margin-top: 0; }

/* Narrow windows: labels above their fields. */
@media (max-width: 40rem) {
    .pp-row { grid-template-columns: minmax(0, 1fr); }
    .pp-row > label { text-align: left; }
    .pp-options { grid-template-columns: minmax(0, 1fr); }
    .pp-options .pp-row:first-child, .pp-options .pp-row:nth-child(2), .pp-instructions { grid-column: 1; grid-row: auto; }
    .pp-search .actions { padding-left: 0; }
    .pp-batch { padding-left: 0.5rem; }
    .pp-batch legend { float: none; width: auto; margin-left: 0; text-align: left; }
}

@media print {
    .pp-search, .pp-pager, .pp-records-viewer, .pp-inline-form { display: none; }
    .pp-records { display: block; }
}

/* OGHeaderExport2: help, Excel download panel, field descriptions */
.pp-help { max-width: 75rem; margin: 0 0 0.5rem; }
.pp-help summary { cursor: pointer; font-weight: bold; color: var(--wvges-navy); }
.pp-help p { margin: 0.3rem 0; }
.pp-export {
    max-width: 75rem;
    margin: 0.75rem 0 0;
    padding: 0.3rem 0.75rem;
    border-left: 4px solid var(--wvges-navy);
    background: var(--panel-bg);
}
.pp-export h2 { margin: 0 0 0.2rem; font-size: 0.95rem; color: var(--wvges-navy); }
.pp-export p { margin: 0.2rem 0; }
.pp-button {
    display: inline-block;
    margin-right: 0.75rem;
    padding: 0.1rem 0.8rem;
    border-radius: 3px;
    background: var(--wvges-navy);
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}
.pp-button:hover, .pp-button:focus-visible { background: var(--wvges-navy-dark); text-decoration: underline; }
.pp-descriptions { margin-top: 1rem; }
.pp-grid td.pp-wrap { white-space: normal; min-width: 25rem; }
