﻿@media (max-width: 700px) {

    /* Odsazení kontejneru */
    .container > .row > .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Flex kontejnery pro tlačítka ve 2 řádcích */
    .row.align-items-center.mb-2.gx-2 {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    /* Sloupce vždy 50% šířky */
    .col-12.col-md-4,
    .col-12.col-md-4.d-flex.justify-content-end,
    .col-12.col-md-4.d-flex.justify-content-center {
        width: 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 0.7em !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important; /* zarovnání k levému okraji ve sloupci */
        gap: 0.7em !important; /* mezera mezi tlačítky */
    }

        /* Vyjímka pro druhý sloupec druhého řádku, aby tlačítka nebyla nalepena */
        .col-12.col-md-4.d-flex.justify-content-end {
            justify-content: flex-start !important; /* posunout z pravého kraje vlevo, začne těsně za "Filtrovat" */
        }

        /* Vstupní pole hledání naplno */
        .col-12.col-md-4:first-child input.form-control {
            width: 95% !important;
            margin-bottom: 0.7em !important;
            height: 48px !important;
        }

        /* Select "Seřadit podle" naplno */
        .col-12.col-md-4.d-flex.justify-content-center select.form-select {
            width: 95% !important;
            min-width: 120px !important;
            max-width: 95% !important;
            height: 48px !important;
            margin: 0 !important;
        }

    /* Tlačítko "Filtrovat" v levé části druhého řádku */
    button.btn-outline-primary {
        width: auto !important;
        min-width: 90px !important;
        padding: 0 12px !important;
        height: 48px !important;
        white-space: nowrap !important;
    }

    /* Tlačítko "Přidat novou položku" široké dle obsahu, posunuté dle mezer */
    a.btn-success {
        width: auto !important;
        min-width: 180px !important; /* zvětšit šířku, aby se celý text vešel */
        padding: 0 15px !important;
        height: 48px !important;
        white-space: nowrap !important;
        margin-left: 10px !important; /* mezera od tlačítka filtrovat */
    }

    /* Zarovnání textu tlačítek na střed vertikálně a horizontálně */
    .btn, button, a.btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.05em !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    /* Skrytí tlačítek Přidat novou položku, Editovat, Smazat, Přesunout do Historie, Vrátit do Aktualit*/
    a.btn.btn-sm.btn-primary.me-2,
    a.btn.btn-success.ms-2,
    button.btn.btn-sm.btn-danger,
    button.btn.btn-sm.btn-warning.ms-2,
    button.btn.btn-sm.btn-success.me-2 {
        display: none !important;
    }
    
}
