﻿
:root {
    --BARVA-svetla: #BFE7F6;
    --BARVA-normal: #029BD2;
    --BARVA-tmava: #0078A4;
    --BARVA-blokovano: black;
    --BARVA-test: red;
    --gap: 5px;
}

html {
    box-sizing: border-box;
}

*, *::before, *::after{
    box-sizing: inherit;
}

body {
    font-family: "Roboto", Arial, sans-serif;
    background-color: #f9fafb;
    color: #111;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

main {
    max-width: 520px;
    width: 95%;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
}

h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--BARVA-normal);
    font-weight: 900;
}

header {
    background-color: #e30613;
    color: white;
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: flex;
}


.legend {
    display: flex;
    gap: 12px;
    margin-bottom: 1em;
    flex-wrap: wrap;
    align-items: center;
    flex-direction: row;
    
}

    .legend .item {
        display: flex;
        gap: 8px;
        align-items: center;
        font-size: 14px;
        font-weight: normal;
        border-radius: 4px;        
        flex-direction: row;
    }

.swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.swatchA {
    background: var(--BARVA-blokovano);
}

.swatchB {
    background: var(--BARVA-svetla);
}

.swatchDefault {
    background: white;
}

.input-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.5rem;
    flex-wrap: wrap;    
}


    .input-section input {
        padding: 0.5rem;
        font-size: 1rem;
        width: 100px;
        border: 1px solid #ccc;
        border-radius: 6px;
        text-align: center;
        font-weight: bold;
    }


    .input-section button {
        background-color: var(--BARVA-normal);
        color: white;
        border: none;
        padding: 0.6rem 1rem;
        border-radius: 6px;
        font-size: 1rem;
        cursor: pointer;
        transition: background-color 0.2s;
        margin-left: 0.4em;
    }

    .input-section button:hover {
        background-color: var(--BARVA-tmava);
    }

.jersey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px,auto));
    gap: 4px;
    
}

.jersey-cell {
    min-width: 30px;
    max-width: 40px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: default;
    background-color: white;
    border: 1px solid #ccc;
    user-select: none;
}

.cell-style-A {
    background-color: var(--BARVA-blokovano);
    color: white;
}

.cell-style-B {
    background-color: var(--BARVA-svetla);
    color: #222;
}

.cell-style-TEST {
    background-color: var(--BARVA-test);
    color: #222;
}

.status-section {
    margin-top: 1rem;
    font-weight: normal;
    font-style: italic;
    color: #555;
}


/* Responzivní úpravy */
@media (min-width: 520px) {
    .jersey-grid {
        grid-template-columns: repeat(10, 1fr);
    }}


@media (max-width: 520px) {
    
    .input-section > div:first-child{
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .input-section input, .input-section button {
        width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-top: 2px;
        margin-bottom: 2px;
    }

    .jersey-cell {
        min-width: 20px;
        aspect-ratio: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }
    .jersey-grid {
        grid-template-columns: repeat(auto-fit, minmax(40px,auto));
    }

     
}
