/* responsive.css
   Мобильная адаптация и доступность.
   На десктопе (> 1040px) ничего не меняет: медиазапросы ниже не активны,
   а focus-стили/скип-линк не влияют на обычный рендер. */

/* --- Доступность --------------------------------------------------------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: #fff;
    color: #1c73d6;
    padding: 8px 14px;
    border: 1px solid #1c73d6;
}
.skip-link:focus {
    left: 8px;
    top: 8px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #1c73d6;
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Планшеты и мобильные ------------------------------------------------ */
@media (max-width: 1040px) {
    #wrapper { min-width: 0 !important; }

    div.content-block,
    div.main_menu_wrap,
    body.wide div.content-block,
    body.wide div.main_menu_wrap {
        width: auto !important;
        max-width: 100% !important;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    #content,
    #content.without_sidebar { margin-left: 0 !important; }

    #sidebar { float: none !important; width: auto !important; }
    #sidebar div.general_services { padding-right: 0; }

    img { max-width: 100%; height: auto; }

    /* таблицы/панели — горизонтальный скролл вместо вылезания за экран */
    .rounded-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .rounded-panel > table { min-width: 640px; }

    /* графики — тянутся по ширине контейнера */
    .chart-723x300,
    .chart-719x330,
    .chart-719x300,
    .chart-355x170 { max-width: 100%; }

    #header .content-block { height: auto; min-height: 93px; }
    #header_top { overflow-x: auto; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }

    div.content-block,
    div.main_menu_wrap { padding-left: 6px; padding-right: 6px; }

    .rounded-common td, .rounded-common th,
    .rustat_table td, .rustat_table th,
    .table_data td, .table_data th { padding: .4em .5em !important; }

    /* вкладки переносятся и контейнер растёт */
    #content .tabs { height: auto; }
    #content .tabs ul li,
    #content .tabs ul li.active {
        float: none;
        display: inline-block;
        margin-bottom: 2px;
    }

    .rounded-panel > table { min-width: 520px; }

    .b-footer__layout,
    .b-footer__layout-column { width: auto !important; }
}
