/* SaferTN uses the CopIX shell. These rules are the unscoped copies of the app layout,
   home cards, and wants card lines so a static page matches app.copix.us. */
@font-face {
    font-family: "Rye";
    src: url("/safertn/fonts/Rye-Regular.ttf") format("truetype");
    font-display: swap;
}
@font-face {
    font-family: "Old Standard TT";
    src: url("/safertn/fonts/OldStandard-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Old Standard TT";
    src: url("/safertn/fonts/OldStandard-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}
html, body { height: 100%; max-width: 100%; }
body {
    margin: 0;
    overflow: hidden;
    background: var(--copix-bg-darkest, #1a0808);
    color: var(--copix-content-text, #f5f0e6);
}
.page {
    height: 100svh;
    --safertn-chrome-bottom: calc(29px + env(safe-area-inset-bottom, 0px));
    --safertn-ticker-h: 14px;
}
.page > main {
    height: 100svh;
    max-height: 100svh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}
.page > main > header,
footer.copix-bar { flex: 0 0 auto; position: relative; z-index: 5; }
article {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
.content-body { flex: 1; min-height: 0; padding: 8px; }
header, footer.copix-bar {
    position: sticky;
    z-index: 20;
    height: 25px;
    text-align: center;
    text-transform: uppercase;
    color: var(--copix-header-text, #e8b4b4);
    border: 2px dashed var(--copix-border-accent, #cd5c5c);
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', Arial, sans-serif;
    font-weight: bold;
    font-size: x-small;
    margin: 2px;
    white-space: nowrap;
    display: flex;
    background: #550600;
    align-items: center;
}
header { top: 0; }
footer.copix-bar { bottom: 0; }
.headerMenu, .headerCatalog { width: 80px; min-width: 40px; flex-shrink: 0; }
.headerTitle { flex: 1; text-align: center; overflow: hidden; }
.headerTitle a { color: inherit; text-decoration: none; }
.safertn-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.copix-nav-hit { position: fixed; top: 4px; left: 4px; z-index: 40; background: transparent; border: 0; padding: 0; cursor: pointer; }
.copix-nav-hit img { width: 35px; height: 35px; border-radius: 35px; box-shadow: 1px 1px 2px 2px black; }
.safertn-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 34; }
.safertn-sidebar {
    display: none;
    position: fixed;
    z-index: 35;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    background: #550600;
    border-top: 1px solid var(--copix-border-accent, #cd5c5c);
    border-right: 2px dashed var(--copix-border-accent, #cd5c5c);
    border-top-right-radius: 16px;
    box-shadow: 1px 1px 2px 2px black;
    padding: 36px 0 16px;
    overflow: auto;
}
.safertn-nav-toggle:checked ~ .safertn-backdrop,
.safertn-nav-toggle:checked ~ .safertn-sidebar { display: block; }
.safertn-sidebar .catalog-dropdown-header { padding: 12px 16px; color: #fff; font-weight: 500; border-bottom: 1px solid var(--copix-border-accent, #cd5c5c); }
.safertn-sidebar .nav-item { font-size: 0.9rem; padding-bottom: 0.5rem; }
.safertn-sidebar .nav-link { color: #d7d7d7; text-decoration: none; display: flex; align-items: center; height: 3rem; border-radius: 4px; }
.safertn-sidebar .nav-link:hover { background: rgba(255,255,255,.1); color: white; }
.safertn-sidebar .nav-link .bi { margin-right: 0.75rem; }
.safertn-nav-group { padding-bottom: 0.25rem; }
.safertn-nav-label {
    height: auto;
    min-height: 2.4rem;
    color: #fff;
    font-weight: 600;
    cursor: default;
}
.safertn-submenu { padding: 0 0 0.25rem 1.15rem; }
.safertn-submenu .nav-link { height: 2.4rem; }
.page > main:has(.safertn-home) > article,
.page > main:has(.safertn-home) .content-body {
    overflow: hidden;
}
.page > main:has(.safertn-home) .content-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
}
.safertn-home {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}
.safertn-home .CopIXHomeHero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
}
.safertn-home .home-dashboard-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 100%;
    align-items: flex-start;
    padding: 8px 16px 12px;
    overflow-y: auto;
}
.home-dashboard-container { max-width: 1200px; width: 100%; padding: 0; }
.home-agency { color: white; text-align: center; margin: 0 0 12px; text-shadow: 1px 1px 3px rgba(0,0,0,.8); }
.catalogs-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.catalog-card {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    min-width: 280px;
    max-width: 360px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.catalog-card-icon { font-size: 28px; line-height: 1; color: white; }
.product-icon { font-size: 24px; line-height: 1; }
.product-name { color: white; font-size: 0.65rem; font-weight: 500; text-align: center; }
.safertn-disclaimer {
    color: #e8b4b4;
    font: 13px/1.4 'Trebuchet MS', Arial, sans-serif;
    padding: 12px 16px 28px;
}
.catalog-card .safertn-disclaimer { padding: 12px 0 0; margin: 12px 0 0; border-top: 1px solid rgba(255,255,255,.12); }
.catalog-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 12px; }
.catalog-card-name { color: white; font-size: 1.1rem; font-weight: 600; }
.products-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.product-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 72px; height: 72px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px;
    color: white; text-decoration: none; font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.copixPersonCard {
    border: 1px solid goldenrod;
    border-radius: 8px;
    margin: 5px;
    box-shadow: inset 0 0 10px #626262;
    padding: 3px 10px;
    background-color: black;
    color: antiquewhite;
    box-sizing: border-box;
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
    min-width: 0;
    overflow: hidden;
    contain: inline-size;
}
.PersonName, .ChargesBox, .CatalogID {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
}
.PersonName { font-size: 1.3rem; font-weight: bold; }
.PersonName::-webkit-scrollbar, .ChargesBox::-webkit-scrollbar, .CatalogID::-webkit-scrollbar { display: none; }
.CopIXPersonWant {
    background-color: #550600;
    color: antiquewhite;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: small;
    padding: 3px 10px;
    margin: 10px 0;
    box-shadow: inset 0 0 10px #626262;
    min-width: 0;
}
.CatalogID { color: yellowgreen; font-weight: bold; font-size: 0.8em; }
.WantDateTime, .IncarcerationDateTime { font-family: 'OCR A', ui-monospace, monospace; }
.WantID { font-size: 0.6em; color: cornsilk; font-weight: bold; }
.Charges.Inactive { text-decoration: line-through; color: rosybrown; }
.CopIXPersonIncarceration {
    background-color: #4a4a4a;
    color: antiquewhite;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: small;
    padding: 3px 10px;
    margin: 10px 0;
    box-shadow: inset 0 0 10px #626262;
    min-width: 0;
}
.IncarcerationBox {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.Incarceration { color: white; text-transform: capitalize; }
.TipsButtonsRow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.TipsButton {
    text-shadow: 1px 1px 3px black;
    font-family: Arial, sans-serif;
    font-size: small;
    padding: 2px 6px;
    color: #FEFCF2;
    text-decoration: none;
    background: #8b0e05;
    border-radius: 10px;
    border-bottom-right-radius: 2px;
    border-top-left-radius: 2px;
    border: 1px solid black;
}
.Charges { color: white; text-transform: capitalize; }
.CarouselPersonPhoto, .safertn-photo { width: 94px; height: 94px; object-fit: cover; background: #222; }
.safertn-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 12px;
}
.safertn-search-input { flex: 1 1 auto; min-width: 0; }
.safertn-search-agency { flex: 0 0 220px; width: 220px; max-width: 240px; }
.safertn-search .btn { flex: 0 0 auto; white-space: nowrap; }
.page > main:has(.wants-map-page) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}
.page > main:has(.wants-map-page) > article {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.page > main:has(.wants-map-page) .content-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.page > main:has(.wants-poster-content) {
    justify-content: center;
}
.page > main:has(.wants-poster-content) .content-body {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    width: 100%;
    box-sizing: border-box;
}
.wants-map-page {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}
.wants-map-page #map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    z-index: 0;
}
.wants-map-page .map-card {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 500;
    width: min(340px, calc(100% - 16px));
    margin: 0;
    padding: 0 12px 8px;
    background: rgba(26, 8, 8, 0.94);
    color: #f5f0e6;
    border: 1px solid rgba(205, 92, 92, 0.7);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.35;
    box-sizing: border-box;
}
.wants-map-page .map-card summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.wants-map-page .map-card summary::-webkit-details-marker { display: none; }
.wants-map-page .status-count { color: #93c5fd; font-weight: 600; }
.wants-map-page .map-about,
.wants-map-page .map-note { margin: 0 0 8px; }
.wants-map-page .map-note:empty { display: none; }
.wants-map-page .map-legend {
    position: absolute;
    left: 8px;
    bottom: 18px;
    z-index: 500;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(26, 26, 46, 0.92);
    border-radius: 999px;
    color: #e0e0e0;
    font-size: 11px;
}
.wants-map-page .legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    border-radius: 50%;
    border: 2px solid #fff;
    vertical-align: -1px;
}
.wants-map-page .legend-swatch.want { background: #e11d2e; }
.wants-map-page .legend-swatch.release { background: #f5b942; }
.wants-map-page .map-note { color: #fbbf24; }
.wants-map-page .leaflet-bottom.leaflet-right { bottom: 18px; right: 8px; }
.wants-map-page .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 18px;
}
.wants-poster-content {
    width: min(680px, 100%);
    box-sizing: border-box;
    overflow: hidden;
    font-family: "Old Standard TT", "Times New Roman", serif;
    color: #2a160c;
    background-color: #e7d3a1;
    background-image:
        radial-gradient(ellipse at 18% 12%, rgba(140, 84, 36, 0.22), transparent 42%),
        radial-gradient(ellipse at 84% 78%, rgba(110, 62, 28, 0.2), transparent 46%),
        radial-gradient(ellipse at 50% 50%, transparent 46%, rgba(70, 36, 16, 0.28) 100%);
    border: 4px solid #3a2414;
    outline: 1px solid #3a2414;
    outline-offset: -12px;
    box-shadow: inset 0 0 70px rgba(80, 40, 12, 0.28);
}
.wants-poster-content .poster-wanted-title {
    font-family: "Rye", "Times New Roman", serif;
    font-size: clamp(2.4rem, 8vw, 4.6rem);
    letter-spacing: 0.14em;
    color: #2a160c;
    text-shadow: none;
}
.wants-poster-content .poster-release-title {
    font-size: clamp(1.15rem, 4.8vw, 2.15rem);
    letter-spacing: 0.04em;
}
.wants-poster-content .poster-by,
.wants-poster-content .poster-name,
.wants-poster-content .poster-meta,
.wants-poster-content .url,
.wants-poster-content .poster-section-title {
    text-align: center;
    color: #2a160c;
}
.wants-poster-content .poster-by {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.16em;
    font-size: 0.95rem;
}
.wants-poster-content .poster-ribbon { text-align: center; margin: 0.6rem 0 0.8rem; }
.wants-poster-content .poster-ribbon span {
    display: inline-block;
    max-width: calc(100% - 1.5rem);
    background: #6b1d1d;
    color: #f6e6c8;
    font-family: "Rye", "Times New Roman", serif;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    padding: 0.45rem 1.4rem;
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
}
.wants-poster-content .poster-photo {
    filter: sepia(0.72) contrast(1.05);
    border-color: #f4e6c8;
    box-shadow: 0 0 0 8px #f4e6c8, 0 0 0 10px #3a2414;
}
.wants-poster-content .poster-copix-logo { max-height: 72px; max-width: 160px; }
.wants-poster-content .poster-meta,
.wants-poster-content .url { overflow-wrap: anywhere; }
.wants-poster-content .poster-disclaimer { color: #6b1d1d; font-weight: 700; text-align: center; }
.wants-poster-content .poster-qr { background: #fff; border: 2px solid #3a2414; }
img.CarouselPersonPhoto,
img.safertn-photo,
.leaflet-popup-content img.safertn-photo {
    width: 94px;
    height: 94px;
    max-width: 94px;
    object-fit: cover;
    background: #1a0808;
    border-radius: 16px;
    border: 1px solid rgba(255, 222, 173, 0.22);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
footer.copix-bar .version-text {
    flex: 0 0 auto;
    align-self: center;
    padding-left: 8px;
    padding-right: 6px;
    z-index: 2;
    font-size: xx-small;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: rgba(232, 180, 180, 0.7);
    white-space: nowrap;
}
.copixPersonCard form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 8px; }
.copixPersonCard form label { display: flex; flex-direction: column; gap: 4px; width: min(100%, 28rem); }
.copixPersonCard textarea,
.copixPersonCard input[name] {
    width: 100%;
    background: #1a0808;
    color: antiquewhite;
    border: 1px solid #7f1d1d;
    border-radius: 6px;
    padding: 8px;
}
.copixPersonCard textarea { min-height: 5rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
@media (min-width: 641px) {
    .wants-map-page .map-card > :not(summary) { display: block !important; }
}
@media (max-width: 640px) {
    .header-title-full { display: none; }
    .header-title-short { display: inline; }
    .headerMenu, .headerCatalog { width: 40px; }
    .content-body { padding: 8px 6px 16px; }
    .page > main:has(.safertn-home) .content-body { padding: 0; }
    .safertn-search { flex-direction: column; align-items: stretch; }
    .safertn-search-input,
    .safertn-search-agency,
    .safertn-search .btn { flex: 1 1 100%; width: 100%; max-width: none; }
    .wants-poster-content {
        width: 100%;
        min-height: 0;
        padding: 0.75rem;
    }
    .wants-poster-content .poster-release-title { font-size: 1.05rem; letter-spacing: 0.02em; }
    .wants-poster-content .poster-copix-logo { max-height: 56px; max-width: 120px; }
    .wants-poster-content .poster-photo-qr-row {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .wants-poster-content .poster-photo-wrap,
    .wants-poster-content .poster-photo {
        width: min(168px, 70vw);
        min-width: 0;
        max-width: 168px;
        height: auto;
        max-height: 220px;
    }
    .wants-poster-content .poster-qr { width: 112px; height: 112px; }
    .wants-poster-content .tools {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .wants-poster-content .tools .btn { min-height: 44px; width: 100%; }
    .wants-map-page .map-card { left: 8px; right: 8px; width: auto; }
    .wants-map-page .map-legend { bottom: 14px; }
}

/* CopIX wants ticker: gold bar, black bold text, fixed to the viewport just above the footer. */
.warning-message-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--safertn-chrome-bottom);
    height: var(--safertn-ticker-h);
    min-height: var(--safertn-ticker-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #d4a000;
    color: black;
    font-weight: bold;
    font-size: 0.7rem;
    line-height: 1;
    text-align: left;
    padding: 0 12px;
    z-index: 25;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
}
.page > main:has(.warning-message-banner) > article {
    padding-bottom: var(--safertn-ticker-h);
    box-sizing: border-box;
}
.warning-message-content {
    white-space: nowrap;
    max-height: 14px;
    display: inline-block;
    flex-shrink: 0;
    padding-left: 100%;
    animation: marquee 32s linear -10s infinite;
    scrollbar-width: none;
}
.warning-message-content::-webkit-scrollbar { display: none; }
.warning-message-content:hover,
.warning-message-content:active { animation-play-state: paused; }
@media (min-width: 769px) {
    .warning-message-banner:hover { background-color: #e5b000; }
}
@media (max-width: 640px) {
    .page:has(.warning-message-banner) { --safertn-ticker-h: 28px; }
    .warning-message-banner {
        font-size: 14px;
        line-height: 28px;
        padding: 0 10px;
    }
    .warning-message-content {
        max-height: 28px;
        font-size: 14px;
        line-height: 28px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .warning-message-banner {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        height: auto;
        min-height: 0;
        align-items: flex-start;
        padding: 8px 12px;
        line-height: 1.35;
    }
    .page > main:has(.warning-message-banner) > article { padding-bottom: 0; }
    .warning-message-content {
        animation: none;
        white-space: normal;
        max-height: none;
        display: block;
        padding-left: 0;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
    .warning-message-banner,
    .warning-message-content {
        font-size: 14px;
        line-height: 1.35;
    }
}
@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
@media print {
    @page { size: letter portrait; margin: 0.4in; }
    html, body { height: auto; overflow: visible; background: white !important; }
    .page, .page > main { height: auto; max-height: none; overflow: visible; }
    article { overflow: visible; padding-bottom: 0 !important; }
    .page > main > header,
    footer.copix-bar,
    .warning-message-banner,
    .safertn-disclaimer,
    .copix-nav-hit,
    .safertn-sidebar,
    .safertn-backdrop,
    .tools,
    form { display: none !important; visibility: hidden !important; }
    .poster-disclaimer { display: block !important; }
    .wants-poster-content, .wants-poster-content * { visibility: visible; }
    .wants-poster-content .tools,
    .wants-poster-content .tools * { display: none !important; visibility: hidden !important; }
    .wants-poster-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
}
@media (min-width: 641px) { .header-title-short { display: none; } }
