/* ---------------------------------------------------------------------------
   /{destination}/traffic/{noticeSlug} - a road change, one page per TrafficNotices row.
   Mobile first: the reader is a driver on a phone, so one column, large type, no tables.
   ------------------------------------------------------------------------- */

.tn-page { max-width: 56rem; padding-top: 1.5rem; padding-bottom: 2.5rem; }
.tn-title { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .5rem; }
.tn-summary { font-size: 1.05rem; color: #374151; margin: 0 0 1rem; }

.tn-status {
    margin: 0 0 1.25rem; padding: .85rem 1rem;
    border: 1px solid #f59e0b; border-left-width: 4px; border-radius: .6rem;
    background: #fffbeb; color: #78350f;
}
.tn-status p { margin: 0; }
.tn-status p + p { margin-top: .35rem; }
.tn-status--ended { background: #f3f4f6; border-color: #9ca3af; color: #374151; }
.tn-overdue { font-weight: 600; }
.tn-updated { font-size: .875rem; opacity: .85; }

/* Videos: a placeholder link until tapped, then an iframe in the same box. */
.tn-video { margin: 0 0 1.25rem; }
.tn-video-frame { position: relative; width: 100%; background: #0b2540; border-radius: .6rem; overflow: hidden; }
.tn-video-frame--wide { aspect-ratio: 16 / 9; }
.tn-video-frame--tall { aspect-ratio: 9 / 16; max-width: 20rem; }
/* When both videos exist, the screen decides: a phone gets the vertical one, everything wider gets the
   widescreen one. Both are in the HTML (a crawler and a link preview see both); the other is just hidden.
   With only one video, it shows at every size. */
@media (max-width: 39.999rem) {
    .tn-videos--both .tn-video--wide { display: none; }
    .tn-video-frame--tall { margin-inline: auto; }
}

/* Map tabs: All | 1 | 2 | 3. Without script all maps are stacked and the tab row stays hidden. */
.tn-maps { margin: 0 0 1.5rem; }
.tn-tabs { display: flex; gap: .5rem; margin: 0 0 .75rem; flex-wrap: wrap; }
.tn-tabs[hidden] { display: none; }
.tn-tab {
    min-width: 3rem; min-height: 2.75rem; padding: .45rem 1.1rem;
    border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #0b2540;
    font: inherit; font-weight: 600; cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.tn-tab:hover, .tn-tab:focus-visible { background: #e3edfb; border-color: #8fb1e3; }
.tn-tab[aria-selected="true"] { background: #003366; border-color: #003366; color: #fff; }
.tn-tab:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.tn-maps .tn-figure { margin: 0 0 1rem; }
.tn-maps.is-tabbed .tn-figure { margin: 0; }
.tn-maps.is-tabbed .tn-map { display: none; }
.tn-maps.is-tabbed .tn-map.is-active { display: block; }

@media (min-width: 40rem) {
    .tn-videos--both .tn-video--short { display: none; }
}
.tn-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tn-video-load {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; color: #fff; text-decoration: none; text-align: center; padding: 1rem;
}
.tn-video-load:hover .tn-play, .tn-video-load:focus-visible .tn-play { transform: scale(1.06); }
.tn-video-load:focus-visible { outline: 3px solid #f59e0b; outline-offset: -3px; }
.tn-play {
    width: 4.25rem; height: 4.25rem; border-radius: 50%; background: #f97316; position: relative;
    transition: transform .15s ease;
}
.tn-play::after {
    content: ""; position: absolute; left: 1.7rem; top: 1.2rem;
    border-style: solid; border-width: .95rem 0 .95rem 1.5rem; border-color: transparent transparent transparent #fff;
}
.tn-video-label { font-weight: 700; font-size: 1.05rem; }
.tn-video-note { font-size: .8125rem; opacity: .8; }

.tn-figure { margin: 1rem 0 0; }
.tn-figure img { display: block; width: 100%; height: auto; border-radius: .6rem; border: 1px solid #e5e7eb; background: #f3f4f6; }
.tn-overview { margin: 0 0 1.5rem; }

.tn-section { margin: 0 0 1.75rem; }
.tn-section h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 .4rem; }
.tn-section p { margin: 0; font-size: 1.0625rem; line-height: 1.5; }

.tn-links { display: flex; flex-direction: column; gap: .6rem; margin: 2rem 0 1.25rem; }
.tn-link {
    display: block; padding: .85rem 1rem; text-align: center; font-weight: 600; text-decoration: none;
    border: 1px solid #d1d5db; border-radius: .6rem; color: inherit; background: #fff; min-height: 3rem;
}
.tn-link { transition: background-color .12s ease; }
.tn-link:hover, .tn-link:focus-visible { background: #e3edfb; text-decoration: none; }
.tn-link--primary { background: #0b4a69; border-color: #0b4a69; color: #fff; }
.tn-link--primary:hover, .tn-link--primary:focus-visible { background: #072c40; color: #fff; }

.tn-source { font-size: .875rem; color: #6b7280; margin: 0; }


/* "Stuck in a queue?" - the report entry point, directly under the status line. */
.tn-report {
    margin: 0 0 1.5rem; padding: 1rem;
    border: 1px solid #d1d5db; border-radius: .6rem; background: #fff;
}
.tn-report h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.tn-report p { margin: 0 0 .75rem; line-height: 1.45; }
.tn-report-btn {
    display: block; padding: .9rem 1rem; min-height: 3.25rem; text-align: center; font-weight: 700;
    text-decoration: none; border-radius: .6rem; color: #fff; background: #b45309; border: 1px solid #b45309;
    transition: background-color .12s ease;
}
.tn-report-btn:hover, .tn-report-btn:focus-visible { background: #78350f; border-color: #78350f; text-decoration: none; }
.tn-report .tn-report-note { margin: .75rem 0 0; font-size: .9375rem; color: #374151; }
.tn-report .tn-report-note a { font-weight: 700; white-space: nowrap; }

@media (min-width: 40rem) {
    .tn-title { font-size: 2rem; }
    .tn-links { flex-direction: row; }
    .tn-link { flex: 1; }
}

@media (prefers-color-scheme: dark) {
    .tn-summary { color: #d1d5db; }
    .tn-status { background: #2a1d07; border-color: #b45309; color: #fde68a; }
    .tn-status--ended { background: #1f2937; border-color: #4b5563; color: #d1d5db; }
    .tn-figure img { border-color: #374151; background: #111827; }
    .tn-link { background: #111827; border-color: #374151; }
    .tn-tab { background: #111827; border-color: #374151; color: #e5e7eb; }
    .tn-tab:hover, .tn-tab:focus-visible { background: #1e3a5f; border-color: #3b6aa8; }
    .tn-tab[aria-selected="true"] { background: #1d6f98; border-color: #1d6f98; color: #fff; }
    .tn-link:hover, .tn-link:focus-visible { background: #1e3a5f; }
    .tn-report { background: #111827; border-color: #374151; }
    .tn-report .tn-report-note { color: #d1d5db; }
    .tn-report-btn { background: #d97706; border-color: #d97706; color: #111827; }
    .tn-report-btn:hover, .tn-report-btn:focus-visible { background: #f59e0b; border-color: #f59e0b; }
    .tn-link--primary { background: #1d6f98; border-color: #1d6f98; color: #fff; }
    .tn-source { color: #9ca3af; }
}
