/* Font Hanken Grotesk */
@font-face {
    font-family: 'Hanken Grotesk';
    src: url('../fonts/Hanken_Grotesk/HankenGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Hanken Grotesk';
    src: url('../fonts/Hanken_Grotesk/HankenGrotesk-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #193BE5;
    color: #fff;
    overflow-x: hidden;
}

/* Utility třídy */
.skryty {
    display: none !important;
}

.aktivni {
    display: flex !important;
}

/* Stránky */
.stranka {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Hlavička */
.hlavicka {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: transparent;
    padding-bottom: 0px;
}

.logo {
    height: 48px;
    width: auto;
}

.hlavicka-prava {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lekar-jmeno {
    font-size: 13px;
    opacity: 0.9;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-odhlasit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-odhlasit:hover {
    background: rgba(255,255,255,0.3);
}

.btn-historie {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 25px;
    padding: 0px 10px ;
    height: 44px;
    padding-right: 14px;;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    background-color: #19BCE7;
    transition: background 0.2s;
    border: 0;
    margin-left: 0;
}
.historie-otevrena {
    position: fixed;
    white-space: nowrap;
    bottom: 34px;
    z-index: 111;
    vertical-align: middle;
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0px;
    left: calc(50% - 70px);
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0px 0px 20px 0px #1b7ca39e;
}

.ikona-historie {
    width: 28px;
    height: 28px;
}

/* Obsah */
.obsah {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
}
.obsah_druha_polovina {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #197CE7;
    padding: 24px;
    width: 100%;
    border-radius: 20px 20px 0px 0px;
}
header h2 {
    font-size: 24px;
    font-weight: 500;
    text-align: left;
    line-height: 1.2;
    /* margin-bottom: 8px; */
    width: 100%;
}

.podnadpis {
    font-size: 16px;
    letter-spacing: 1px;
    opacity: 1;
    text-align: left;
    margin-bottom: 2px;
    font-weight: 500;
    width: 100%;
    padding-left: 16px;
    color: #18A8E4;
    text-transform: uppercase;
}

.nadpis {
    margin-top: 20px;
    font-size: 38px;
    font-weight: 500;
    text-align: left;
    line-height: 1.2;
    margin-bottom: 8px;
    width: 100%;
    padding-left: 16px;
}

.zvyrazneni {
    color: #f5e050;
}

/* Kontejner kamery */
.kamera-kontejner {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* Portrait orientace - šířka 100% */
@media (orientation: portrait) {
    .kamera-kontejner {
        width: 100%;
        height: auto;
    }
}

/* Landscape orientace - výška 100% */
@media (orientation: landscape) {
    .kamera-kontejner {
        width: auto;
        height: 100%;
        max-height: 50vh;
    }
}

#video-kamera {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kamera-ramecek {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    pointer-events: none;
    display: none;
}

/* Stavové zprávy */
.stav-zprava {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 400;
    margin-top: 24px;
    margin-bottom: 20px;
    max-width: 100%;
    width: 100%;
}

.stav-zprava.aktivni {
    display: flex;
}

.stav-info {
    background: #197CE7;
    color: white;
    border: 1px #18A8E4 solid;
}

.stav-uspech {
    background: white !important;
    color: #40B730;
    font-weight: 600;
}

.stav-chyba {
    background: white;
    font-weight: 600;
    color: #cf3b29;
}

.ikona-stav {
    width: 18px;
    height: 18px;
}

/* Primární tlačítko */
.btn-primarni {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100%);
    padding: 18px 30px;
    background: #FFEF5C;
    border: none;
    border-radius: 30px;
    color: #1a5276;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 16px;
}
/*
.btn-primarni:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}
*/
.btn-primarni img {
    width: 18px;
    position: relative;
    top: -1px;
}

/* Patička */
.paticka {
    padding: 20px;
    text-align: center;
    color: black;
    font-size: 14px;
    background-color: #197CE7;
}

/* ==================== */
/* Stránka historie */
/* ==================== */
#stranka-historie {
    border-radius: 20px 20px 0px 0px;
    top: 84px;
    position: fixed;
    height: calc(100dvh - 84px);
    min-height: calc(100dvh - 84px);
    overflow: hidden;
}
#stranka-historie .paticka {
    background-color: white;
    border-top: 1px #EEEEEE solid;;
}
.obsah-historie {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    align-items: flex-start;
}

.nadpis-historie {
    color: #21262A;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Seznam poukazů */
.seznam-poukazu {
    list-style: none;
    width: 100%;
}

.polozka-poukazu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 16px;
    padding-right: 8px;
    color: black;
    background-color: #E6F2FF;
    border-radius: 4px;
    margin-bottom: 12px;
} 

.polozka-poukazu:first-child {
    margin-top: 0;
}

.poukaz-info {
    display: flex;
    align-items: center;
    gap: 2px;
}

.poukaz-poradi {
    font-weight: 600;
    font-size: 16px;
    min-width: 30px;
}

.poukaz-cislo {
    font-size: 17px;
    color: #21262A;
}
.polozka-poukazu.prazdny .poukaz-cislo {
    padding: 12px;
    background-color: #E6F2FF;
}

.btn-smazat-poukaz {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    opacity: 1
}


.btn-smazat-poukaz img {
    width: 24px;
    height: 24px;
}

/* ==================== */
/* Modální okno */
/* ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 114, 114, 0.71)
}

.modal-obsah {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 26px;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.modal-nadpis {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-poukaz {
    color: #666;
    font-size: 16px;
    margin-top: 24px;
    margin-bottom: 46px;;
}

.btn-smazat {
    width: 100%;
    padding: 18px;
    color: white;
    border: none;
    border-radius: 30px;
    background: #CA332A;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background 0.2s;
    padding-top: 19px;
    padding-bottom: 17px;
    border-color: #CA332A;
    border: 1px #CA332A solid;
}
.btn-zrusit {
    width: 100%;
    padding: 18px;
    padding-top: 19px;
    padding-bottom: 17px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 30px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    
}

/* Modal pro ruční zadání */
.modal-rucni .modal-nadpis {
    margin-bottom: 24px;
}

.input-identifikator {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 2px;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.input-identifikator:focus {
    border-color: #19BCE7;
}

.input-identifikator::placeholder {
    letter-spacing: normal;
    text-transform: none;
}

.btn-vlozit {
    background: #19BCE7;
    color: white;
    margin-top: 0;
    margin-bottom: 12px;
}


/* ==================== */
/* Responzivní úpravy */
/* ==================== */

@media (max-width: 300px) {
    .nadpis {
        font-size: 26px;
    }
    
    .btn-historie span {
        display: none;
    }
    
    .btn-historie {
        padding: 10px 12px;
    }
}

@media (min-height: 800px) {
    .kamera-kontejner {
        max-width: 450px;
    }
}


.chyba-div { 
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 16px;
}