/*
 * Wersja mobilna (#181). Widok na komputerze zostaje w minified.css (źródło: style.css);
 * tu poza @media wolno tylko ukrywać elementy, które istnieją wyłącznie dla telefonu.
 */
.menu-toggle, .menu-button {
    display: none;
}

@media (max-width: 999px) {
    .wrapper {
        box-sizing: border-box;
        width: auto;
        padding: 0 12px;
    }
    #content {
        overflow-wrap: break-word;
    }
    img {
        max-width: 100%;
        height: auto;
    }
    input[type="text"], input:not([type]), select, textarea {
        box-sizing: border-box;
        max-width: 100%;
        font-size: 16px; /* mniejsza czcionka powoduje powiększanie strony po dotknięciu pola na iOS */
    }

    /* Nagłówek: pasek logowania na górze, pod nim logo i zwijane menu */
    #header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding-bottom: 12px;
    }
    #user-links {
        position: static;
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    #user-links li {
        color: #ffffff;
        padding: 6px 10px;
    }
    #logo {
        margin: 16px auto 0 0;
    }
    /* Wyszukiwarka w osobnym wierszu pod logo; rozwinięte menu pod nią */
    #header-search {
        order: 1;
        float: none;
        width: 100%;
        margin: 12px 0 0;
    }
    #header-search .inp {
        flex: 1;
        min-width: 0;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        opacity: 0;
        width: 1px;
        height: 1px;
    }
    .menu-button {
        display: block;
        position: relative;
        z-index: 10;
        margin-top: 12px;
        padding: 8px 12px;
        font-size: 22px;
        color: #252525;
        cursor: pointer;
    }
    .menu-toggle:focus-visible + .menu-button {
        outline: 2px solid #B21D04;
    }
    #main-menu {
        order: 2;
        display: none;
        float: none;
        width: 100%;
        margin: 12px 0 0;
    }
    .menu-toggle:checked ~ #main-menu {
        display: block;
    }
    #main-menu li {
        float: none;
    }
    #main-menu li a {
        padding: 10px 0;
        border-top: 1px dotted #8E8C8C;
    }

    /* Dwie kolumny jedna pod drugą */
    #left, #right {
        float: none;
        width: auto;
        border-right: none;
    }
    .left-padd, .right-padd {
        padding-left: 0;
        padding-right: 0;
    }

    /* Strona główna */
    #home-foto {
        display: none;
    }
    #home-top .box-txt {
        margin: 20px 0;
    }
    #home-search .big-title {
        float: none;
        margin: 0 0 12px;
    }
    #search-game {
        float: none;
        width: auto;
    }
    #search-game .inp-sh {
        box-sizing: border-box;
        float: none;
        width: 100%;
        margin: 0 0 10px;
    }
    #search-game .inp-sh select {
        width: 100%;
    }
    .home-news-left, .home-news-right {
        float: none;
        width: auto;
        border-right: none;
    }
    .home-news-left .box, .home-news-right .box {
        padding: 0 0 20px;
    }
    #home-news .txt {
        float: none;
        width: auto;
        overflow: hidden;
    }
    #home-news .thumb {
        width: 32px;
    }

    /* Karta gry */
    #stars {
        float: none;
        margin-top: 10px;
    }
    .screens iframe {
        display: block;
        width: 100%;
        max-width: 680px;
        height: auto;
        aspect-ratio: 4 / 3;
        margin-bottom: 10px;
    }
    .line form .button {
        margin: 0 0 8px;
    }

    /* Listy gier i plików */
    .lista-gier {
        width: 100%;
    }
    .lista-gier.games thead {
        display: none;
    }
    .lista-gier.games, .lista-gier.games tbody, .lista-gier.games tr {
        display: block;
    }
    .lista-gier.games tr {
        padding: 8px 0;
        border-bottom: 1px dotted #BFBBBB;
    }
    .lista-gier.games tbody td {
        display: inline-block;
        padding: 2px 10px 2px 0;
        font-size: 12px;
    }
    .lista-gier.games tbody td:first-child {
        display: block;
        font-size: 15px;
    }
    .lista-gier.files td {
        padding-right: 10px;
        vertical-align: top;
        overflow-wrap: anywhere;
    }
    .lista-gier.files td:first-child {
        white-space: nowrap;
    }
    .table-scroll {
        overflow-x: auto;
    }
    .page a {
        display: inline-block;
        padding: 6px 4px;
    }

    /* Stare układy tabelkowe */
    .screens-table, .screens-table tbody, .screens-table tr, .screens-table td {
        display: block;
    }
    .screens-table td {
        text-align: center;
    }

    /* Formularze */
    .formcomment label {
        float: none;
        width: auto;
    }
    .formcomment input[type=text], .formcomment textarea {
        float: none;
        width: 100%;
    }
    textarea {
        width: 100%;
    }

    /* Stopka */
    .footer-box {
        box-sizing: border-box;
        width: 50%;
        margin-right: 0;
        padding-right: 10px;
    }
    .footer-box:nth-child(3) {
        clear: left;
    }
    .footer-box li {
        padding: 3px 0;
    }
}
