﻿/* Moderné tlačidlá */
.btn-primary {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px; /* Tlačidlá vedľa seba */
    display: inline-block;
}

.btn-secondary {
    background-color: #008CBA;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
}

.btn-primary:hover, .btn-secondary:hover {
    background-color: #45a049;
}

/* Skupina tlačidiel vedľa seba */
.button-group {
    margin: 20px 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Ohraničené okno pre stav IP, stav a dátum */
.status-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-box {
    border: 2px solid #4CAF50;
    padding: 8px;
    font-size: 14px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #333;
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
}

/* Jemne zvýraznený rám vyhľadávacieho poľa */
#search-input {
    padding: 8px 15px;
    font-size: 16px;
    margin-right: 10px;
    border: 1px solid #4CAF50; /* Zvýraznený rám */
    border-radius: 5px;
    min-width: 200px;
    outline: none;
}

#search-input:focus {
    border-color: #3e8e41; /* Zvýraznenie rámu pri zaostrení */
}

/* Autocomplete bublinka (návrhy) */
.autocomplete-suggestions {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: auto; /* Nastav šírku ako automatickú */
    white-space: nowrap; /* Zabráň zalamovaniu textu */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.autocomplete-suggestions div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-suggestions div:last-child {
    border-bottom: none;
}

.autocomplete-suggestions div:hover {
    background-color: #f0f0f0;
}

/* Tabuľka */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0; /* Menšia medzera medzi vyhľadávačom a tabuľkou */
}

.responsive-table th, .responsive-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

/* Fixná hlavička tabuľky */
.responsive-table th {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: #4CAF50;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1; /* Zabezpečenie, že hlavička tabuľky zostane fixovaná pri skrolovaní */
}

/* Špeciálna šírka stĺpca Obsadenosť */
.responsive-table th:nth-child(8), .responsive-table td:nth-child(8) {
    width: 50px; /* Polovičná šírka pre stĺpec Obsadenosť */
}

.responsive-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Jemné zvýraznenie riadkov pri prechode myškou */
.responsive-table tr:hover {
    background-color: #e0e0e0 !important;
}

/* Scrollovanie na mobilných zariadeniach */
@media screen and (max-width: 600px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Farebné označenie pre stĺpec PS */
.ps-green {
    background-color: green;
    color: white;
}

.ps-red {
    background-color: red;
    color: white;
}

.ps-orange {
    background-color: orange;
    color: white;
}

/* Štýly stránkovania */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
}

.pagination a.active {
    background-color: #4CAF50;
    color: white;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* Skrytie stĺpcov STCB a STP */
.hidden-column {
    display: none;
}

/* Loading spinner */
#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

/* Dark overlay */
#dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}