/* Základní stylování */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

h1 {
    text-align: center;
    color: #004d00;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #004d00;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #004d00;
    color: white;
}

.valid {
    background-color: #e0f5e0;
}

.used {
    background-color: #ffdddd;
}

.container {
    width: 90%;
    margin: auto;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    color: white;
    background-color: #004d00;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 16px;
}

.button:hover {
    background-color: #003300;
}

.delete-button, .refresh-button, .mark-button {
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    background-color: #004d00;
}

.delete-button {
    background-color: #cc0000;
}

.delete-button:hover {
    background-color: #990000;
}

.refresh-button:hover,
.mark-button:hover {
    background-color: #0056b3;
}

.qr-icon {
    cursor: pointer;
    width: 20px;
    height: 20px;
    background: url('../img/qr.svg') no-repeat center center;
    background-size: contain;
    display: inline-block;
}

.popup-container {
    position: relative;
    display: inline-block;
}

.qr-code-popup {
    display: none;
    position: absolute;
    border: 1px solid #888;
    background-color: #fff;
    padding: 10px;
    z-index: 10;
    width: 300px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.qr-code-popup img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.qr-code-text {
    text-align: right;
}

.qr-code-popup .qr-text,
.qr-code-text .last-part {
    color: red;
    font-weight: bold;
    font-size: x-large;
    margin-left: 2px;
}

.ticket-link img {
    max-height: 25px;
    height: auto;
}

.popup-content,
.modal-content {
    display: none; /* Skrytý výchozí stav */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border: 1px solid #888;
    z-index: 1000;
    width: 300px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.popup-content h3 {
    margin-top: 0;
}

.popup-content button {
    margin-right: 10px;
}

.overlay {
    display: none; /* Skrytý výchozí stav */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Poloprůhledné pozadí */
    z-index: 999;
}

.close-btn,
.close {
    position: fixed;
    bottom: 90%;
    left: 90%;
    cursor: pointer;
    font-size: 10px;
    color: #aaa;
}

.close:hover,
.close:focus,
.close-btn:hover,
.close-btn:focus {
    color: #000;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    background-color: #004d00;
    color: #fff;
}

button:hover {
    background-color: #0056b3;
}

.popup-container input[type="number"] {
    width: 80px;
    text-align: center;
}

/* Styly pro zobrazení popupu */
#batchPopup.show .overlay,
#batchPopup.show .popup-content {
    display: block;
}

/* Nový kód pro hlavní kontejnery */
.main-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: sticky;
    top: 0; /* Upevní prvek na vrch */
    z-index: 100; /* Zajišťuje, že bude nad ostatními prvky */
    background-color: #f4f4f4; /* Aby byl viditelný na pozadí */
    padding: 10px 0; /* Padding pro lepší vzhled */
}

.left-container {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 50%; /* Levá polovina */
}

.right-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 50%; /* Pravá polovina */
}

/* Styly pro vyhledávací komponenty */
.search-container {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

#searchInput {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    height: 40px;
    width: 100px;
    text-transform: uppercase;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#searchButton {
    height: 38px;
    width: 38px;
    padding: 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #004d00;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    box-sizing: border-box;
}

#searchButton:hover {
    background-color: #003300;
}

/* Zajistíme, že pop-up bude nad sticky menu */
#batchPopup {
    display: none; /* Počáteční stav skrytý */
}

#batchPopup.show .overlay {
    display: block;
}

#batchPopup .popup-content {
    width: 350px;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999; /* Zajistí, že pop-up bude nad sticky menu */
}