/* The News Access Mobile Directory v1.0.2 */

.tna-drawer-toggle,
.tna-drawer-backdrop,
.tna-all-search,
.tna-city-jump {
    display: none;
}

@media (max-width: 900px) {
    html.tna-lock-scroll,
    html.tna-lock-scroll body {
        overflow: hidden !important;
    }

    body.tna-mobile-plugin {
        overflow-x: hidden !important;
    }

    /* JS marks the actual content column, avoiding theme-specific guesses. */
    body.tna-mobile-plugin .tna-main-content {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        float: none !important;
        clear: both !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.tna-mobile-plugin .tna-layout-parent {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Existing site sidebar becomes the retractable Browse drawer. */
    body.tna-mobile-plugin .tna-mobile-sidebar {
        position: fixed !important;
        z-index: 2147482500 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(86vw, 390px) !important;
        max-width: 390px !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        background: #fff !important;
        box-shadow: -18px 0 44px rgba(0,0,0,.22) !important;
        transform: translateX(104%) !important;
        transition: transform .28s ease !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-sizing: border-box !important;
    }

    body.tna-mobile-plugin.tna-drawer-open .tna-mobile-sidebar {
        transform: translateX(0) !important;
    }

    .tna-drawer-toggle {
        display: flex;
        position: fixed;
        z-index: 2147482600;
        right: 0;
        top: 42%;
        transform: translateY(-50%);
        width: 42px;
        min-height: 104px;
        border: 0;
        border-radius: 14px 0 0 14px;
        background: #111;
        color: #fff;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 12px 6px;
        box-shadow: 0 4px 18px rgba(0,0,0,.28);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .tna-drawer-toggle .tna-toggle-icon {
        font-size: 18px;
        line-height: 1;
    }

    .tna-drawer-toggle .tna-toggle-label {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font: 700 11px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        letter-spacing: .12em;
    }

    body.tna-mobile-plugin.tna-drawer-open .tna-drawer-toggle {
        right: min(86vw, 390px);
        min-height: 54px;
        width: 42px;
        border-radius: 14px 0 0 14px;
        transition: right .28s ease;
    }

    body.tna-mobile-plugin.tna-drawer-open .tna-drawer-toggle .tna-toggle-label {
        display: none;
    }

    .tna-drawer-backdrop {
        display: block;
        position: fixed;
        z-index: 2147482400;
        inset: 0;
        background: rgba(0,0,0,.42);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

    body.tna-mobile-plugin.tna-drawer-open .tna-drawer-backdrop {
        opacity: 1;
        visibility: visible;
    }

    /* General directory readability. */
    body.tna-directory-page .tna-main-content {
        font-size: 17px !important;
        line-height: 1.55 !important;
    }

    body.tna-directory-page .tna-main-content h1 {
        font-size: clamp(27px, 7vw, 38px) !important;
        line-height: 1.12 !important;
    }

    body.tna-directory-page .tna-main-content h2 {
        font-size: clamp(22px, 5.5vw, 30px) !important;
        line-height: 1.2 !important;
    }

    body.tna-directory-page .tna-main-content h3 {
        font-size: 20px !important;
        line-height: 1.25 !important;
        margin-top: 28px !important;
        scroll-margin-top: 84px;
    }

    body.tna-directory-page .tna-channel-item,
    body.tna-directory-page .tna-channel-block {
        margin: 5px 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(0,0,0,.11);
        border-radius: 8px;
        background: rgba(255,255,255,.96);
        list-style: none !important;
        box-sizing: border-box;
    }

    body.tna-directory-page .tna-channel-item > a,
    body.tna-directory-page .tna-channel-block > a {
        display: flex !important;
        align-items: center;
        min-height: 46px;
        width: 100%;
        padding: 10px 38px 10px 12px !important;
        box-sizing: border-box;
        position: relative;
        font-size: 16.5px !important;
        line-height: 1.35 !important;
        text-decoration: none;
    }

    body.tna-directory-page .tna-channel-item > a::after,
    body.tna-directory-page .tna-channel-block > a::after {
        content: "›";
        position: absolute;
        right: 13px;
        top: 50%;
        transform: translateY(-52%);
        font-size: 27px;
        line-height: 1;
        opacity: .45;
    }

    /* All Channels: one useful column on phones, large tappable rows. */
    body.tna-page-all .tna-all-table {
        width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    body.tna-page-all .tna-all-table tr {
        cursor: pointer;
    }

    body.tna-page-all .tna-all-table td:first-child,
    body.tna-page-all .tna-all-table th:first-child {
        display: table-cell !important;
        width: 100% !important;
        padding: 0 !important;
    }

    body.tna-page-all .tna-all-table td:not(:first-child),
    body.tna-page-all .tna-all-table th:not(:first-child) {
        display: none !important;
    }

    body.tna-page-all .tna-all-table td:first-child > a {
        display: flex !important;
        align-items: center;
        min-height: 48px;
        padding: 10px 42px 10px 12px !important;
        position: relative;
        box-sizing: border-box;
        font-size: 16.5px !important;
        line-height: 1.3 !important;
        text-decoration: none;
    }

    body.tna-page-all .tna-all-table td:first-child > a::after {
        content: "›";
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-52%);
        font-size: 27px;
        opacity: .45;
    }

    .tna-all-search,
    .tna-city-jump {
        display: block;
        width: 100%;
        margin: 14px 0 18px;
        padding: 12px;
        background: rgba(255,255,255,.97);
        border: 1px solid rgba(0,0,0,.14);
        border-radius: 12px;
        box-shadow: 0 4px 18px rgba(0,0,0,.08);
        box-sizing: border-box;
    }

    .tna-all-search {
        position: sticky;
        top: max(8px, env(safe-area-inset-top));
        z-index: 50;
    }

    .tna-all-search label,
    .tna-city-jump label {
        display: block;
        margin: 0 0 7px;
        font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        letter-spacing: .03em;
        color: #222;
    }

    .tna-all-search input,
    .tna-city-jump select {
        display: block;
        width: 100%;
        min-height: 46px;
        margin: 0;
        padding: 9px 12px;
        border: 1px solid #bdbdbd;
        border-radius: 8px;
        background: #fff;
        color: #111;
        font: 16px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        box-sizing: border-box;
    }

    .tna-search-meta {
        margin-top: 7px;
        font: 12px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: #666;
    }

    .tna-city-anchor {
        scroll-margin-top: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tna-mobile-sidebar,
    .tna-drawer-toggle,
    .tna-drawer-backdrop {
        transition: none !important;
    }
}

/* US Cities: keep the automatically generated city jump available on desktop too. */
@media (min-width: 901px) {
    body.tna-page-us-cities .tna-city-jump {
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 14px 0 22px;
        padding: 12px;
        background: #fff;
        border: 1px solid rgba(0,0,0,.14);
        border-radius: 8px;
        box-sizing: border-box;
    }

    body.tna-page-us-cities .tna-city-jump label {
        display: block;
        margin: 0 0 7px;
        font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        letter-spacing: .03em;
        color: #222;
    }

    body.tna-page-us-cities .tna-city-jump select {
        display: block;
        width: 100%;
        min-height: 40px;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid #bdbdbd;
        border-radius: 6px;
        background: #fff;
        color: #111;
        font: 14px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        box-sizing: border-box;
    }

    body.tna-page-us-cities .tna-city-anchor {
        scroll-margin-top: 24px;
    }
}


/* All Channels: keep Find a Channel available on desktop too. */
@media (min-width: 901px) {
    body.tna-page-all .tna-all-search {
        display: block;
        width: 100%;
        max-width: 520px;
        margin: 14px 0 22px;
        padding: 12px;
        background: #fff;
        border: 1px solid rgba(0,0,0,.14);
        border-radius: 8px;
        box-sizing: border-box;
        position: static;
        box-shadow: none;
    }

    body.tna-page-all .tna-all-search label {
        display: block;
        margin: 0 0 7px;
        font: 700 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        letter-spacing: .03em;
        color: #222;
    }

    body.tna-page-all .tna-all-search input {
        display: block;
        width: 100%;
        min-height: 40px;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid #bdbdbd;
        border-radius: 6px;
        background: #fff;
        color: #111;
        font: 14px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        box-sizing: border-box;
    }

    body.tna-page-all .tna-search-meta {
        margin-top: 7px;
        font: 12px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        color: #666;
    }
}


/* v1.0.5: Live + Weather keep their existing internal layout.
   The sidebar becomes the Browse drawer; the content is only magnified
   slightly on phones for easier viewing. */
@media (max-width: 900px) {
    body.tna-liveweather-page .tna-liveweather-content {
        zoom: 1.10;
    }
}
