﻿/* Základní nastavení a fonty */
body {
    font-family: verdana, "Arial CE", sans-serif;
    font-size: 0.9em;
    margin: 0;
    background: #ffffff url('../grafika/plocha_background.jpg') no-repeat;
    background-position: 100% 100%;
    background-attachment: fixed;
}

/* Ujistěte se, že v hlavičce HTML máte nastaven viewport:
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
*/

/* Hlavička a navigace */
header {
    background: #eee;
    padding: 1em;
    text-align: center;
    /* Flexbox pro lepší uspořádání při menších šířkách */
    display: flex;
    flex-direction: column;
    align-items: center;
}
header h1 {
    margin: 0;
}
nav {
    margin: 1em 0;
}
nav a {
    text-decoration: none;
    margin-right: 10px;
    font-weight: bold;
    color: #0073aa;
}

/* Hlavní obsah */
main {
    padding: 1em 2em;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tabulky */
table {
    border-collapse: collapse;
    margin-bottom: 1em;
    width: 100%;
}
td, th {
    padding: 0.5em 1em;
    border: 1px solid #ddd;
}

/* Centrovaná tabulka s menším písmem */
.registration-table {
    margin: auto;
    font-size: 0.8em;
    border-collapse: collapse;
}
.registration-table th,
.registration-table td {
    padding: 0.5em 1em;
}

/* Centrumování obsahu */
.center {
    margin: auto;
    text-align: center;
}

/* Přihlašovací formulář v hlavičce */
.login-form {
    align-self: flex-end;
    font-size: 0.8em;
    margin-top: 10px;
}
.login-form input[type="text"],
.login-form input[type="number"] {
    width: 60px;
    margin-right: 5px;
}

/* Responzivní nastavení pro střední a menší obrazovky */
@media (max-width: 768px) {
    main {
        padding: 1em;
    }
    
    /* Upravíme navigaci – odkazy se mohou zarovnat do sloupce */
    nav a {
        display: inline-block;
        margin: 0 5px 5px 5px;
    }
    
    /* Formuláře a tabulky se přizpůsobí šířce */
    form, table {
        width: 100%;
    }
}

/* Rozšířená responzivita pro mobilní zařízení */
@media (max-width: 600px) {

        /* Skryjeme sloupce: 1, 4, 6, 7 */
        .registration-table th:nth-child(1),
        .registration-table th:nth-child(4),
        .registration-table th:nth-child(7),
        .registration-table td:nth-child(1),
        .registration-table td:nth-child(4),
        .registration-table td:nth-child(7) {
            display: none;
        }

    /* Převod tabulek do blokového zobrazení */
    table, thead, tbody, th, td, tr {
        /*display: block;*/
        width: 95%;
    }
    tr {
        margin-bottom: 1em;
        border-bottom: 2px solid #ddd;
    }
    td, th {
        padding: 0.5em;
        text-align: right;
        position: relative;
    }
    /* Můžeme přidat pseudo-element pro label, pokud je třeba */
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 0.5em;
        font-weight: bold;
        text-align: left;
    }
    
    /* Upravíme také přihlašovací formulář */
    .login-form {
        width: 100%;
        text-align: center;
        margin-bottom: 1em;
    }
}
