<style>

    /* Základní styl tabulky */
    .table {
        width: 100%;
        border-collapse: collapse;
    }

#bottom-spacing {
    height: 100px; /* Nebo jakákoli výška, konec stránky */
    width: 100%;
}

    /* Hlavička tabulky */
    .table th {
        cursor: pointer;
        border: 1px solid #ddd;
        padding: 8px 5px; /* Zmenšíme horizontální padding */
        text-align: left;
        background-color: #f8f8f8;
        white-space: nowrap; /* Zabrání zalomení textu v hlavičce */
        font-size: 0.9em; /* Můžeme zmenšit písmo hlavičky */
    }

    /* Základní styl pro <td> */
    .table td {
        padding: 5px; /* Zmenšíme padding buněk */
        white-space: nowrap; /* Klíčové: zabrání zalomení textu */
        overflow: hidden; /* Skryje přetekávající obsah */
        text-overflow: ellipsis; /* Zobrazí tři tečky pro indikaci přetečení */
        font-size: 0.9em; /* Můžeme zmenšit písmo buněk */
    }

    @media (max-width: 600px) {
        /* Odstraníme transformaci, která by mohla způsobovat problémy s layoutem */
        body {
            transform: none;
            transform-origin: unset;
            width: auto;
        }
    }

    .col-name {
        width: 60%; /* Ponecháme šířku názvu */
    }

    /*velikost do prava*/
    table th:nth-child(2),
    table td:nth-child(2) {
        text-align: right;
        width: auto; /* Přizpůsobí šířku obsahu */
    }

    /* CSS pro zarovnání posledního sloupce na střed */
    table td:last-child {
        text-align: center;
        width: auto; /* Přizpůsobí šířku obsahu */
    }
    /* CSS pro zarovnání textu v hlavičce konkrétního sloupce na střed */
    table th:nth-child(3) {
        text-align: center;
        width: auto; /* Přizpůsobí šířku obsahu */
    }

    .col-modified {
        width: 20%; /* Ponecháme šířku modifikovaného */
    }

    .file-item {
        display: table-row;
    }

    /* Styly pro sticky hlavičku */
    .sticky-header,
    .fsp {
        top: 0;
        background-color: white;
        z-index: 10;
    }

    @keyframes stickyHeader {
        0% { top: -50px; }
        100% { top: 0; }
    }

    .text-right {
        text-align: right;
    }

    /* Aktivní řádek (např. při výběru) */
    .item-row.active {
        background-color: #d3d3d3;
        color: #006eff;
    }

    /* Zvýraznění při hledání */
    .highlight {
        background-color: yellow;
        font-weight: bold;
        padding: 0 3px;
        border-radius: 3px;
    }

    .containers {
        width: 300px; /* Příklad šířky kontejneru */
    }

    /* Styl pro vybraný řádek (patrně kliknutý pro kontext menu) */
    .selected-row,
    .clicked-row {
        background-color: #e3f2fd !important;
        border: 2px solid #afe8ff !important;
        border-radius: 6px !important;
        padding: 5px !important;
        color: #004085 !important;
    }


@media (min-width: 701px) and (max-width: 994px) {
    /* Toto pravidlo se aplikuje, když je navigační lišta sbalená (collapsed)
       a zobrazená (třída .show), a šířka okna je mezi 701px a 972px. */
    .navbar-collapse.show > .ms-auto,
    .navbar-collapse.collapsing > .ms-auto { /* Během animace rozbalování/sbalování */
        justify-content: flex-end; /* Zarovná obsah (Uživatel, Odhlásit atd.) doprava */
         width: 100%; /* Obvykle již Bootstrap zajistí plnou šířku, ale pokud ne, odkomentujte. */
    }
}



    /* Mobilní zobrazení navigace - ponecháme beze změn, nemělo by to ovlivnit tabulku */
    @media (max-width: 700px) {
        .navbar-collapse {
            display: flex;
            flex-direction: column;
        }

        .navbar-nav .d-flex {
            flex-wrap: wrap;
        }

        .navbar-nav .gap-2 {
            gap: 10px;
        }

        .navbar-nav .d-inline {
            width: 100%;
        }

        .navbar-nav button,
        .navbar-nav form,
        .navbar-nav .btn {
            width: 100%;
            margin-bottom: 10px;
        }

        .navbar-nav button:last-child,
        .navbar-nav form:last-child {
            margin-bottom: 0;
        }
    }

    img {
        width: 24px; /* Velikost ikon */
    }

    button.navbar-toggler {
        border: none;
        outline: none;
    }

    button.navbar-toggler:focus {
        outline: none;
        box-shadow: none;
    }
/* menu a jmeno,smaž,stahni */
#context-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 2147483647;
    flex-direction: column;

    min-width: 160px;
    box-sizing: border-box;
    border-radius: 5px;
    max-width: 90vw; /* pro mobilní zařízení */
}

#context-menu button {
    border: none;
    background: none;
    padding: 2px 10px;
    text-align: left;
    font-size: 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

#context-menu button:hover {
    background-color: #f0f0f0;
    box-shadow: inset 0 0 0 1px #ccc;
}

#context-menu button:active {
    background-color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

    @media (max-width: 600px) {
      #context-menu button {
        font-size: 16px;
        padding: 10px 14px;
      }
    }

    .target {
      margin: 100px;
      padding: 30px;
      background: #eee;
      border: 1px dashed #aaa;
      cursor: context-menu;
    }




 /* --- Styly pro Drag-and-Drop komponenty - ponecháme beze změn --- */
    #uploadOverlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        display: none;
        transition: opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }

    #uploadOverlay.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    #dropIconArea {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.85);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        pointer-events: none;
        transition: opacity 0.3s ease;
        opacity: 0;
		flex-direction: column;
		align-items: center;
    }

    #dropIconArea.active {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }

    #dropIconArea svg {
        width: 80px;
        height: 80px;
        color: #007bff;
    }
	
	@media (max-width: 480px) {
    #context-menu {
        font-size: 15px;
        padding: 6px;
    }

    #context-menu button {
        padding: 10px;
        font-size: 15px;
    }
}


    /* KONTEJNER PRO PROGRESS BAR, TEXT A TLAČÍTKO ZRUŠIT - ponecháme beze změn */
    .upload-progress-container {
        width: 80%;
        max-width: 400px;
        padding: 15px;
        border: 1px solid #ccc;
        border-radius: 8px;
        background-color: #f9f9f9;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 10000;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: none;
    }

    .upload-progress-bar {
        width: 100%;
        height: 25px;
        background-color: #ddd;
        border-radius: 5px;
        overflow: hidden;
    }

    .upload-progress-bar-inner {
        height: 100%;
        width: 0%;
        background-color: #4CAF50;
        transition: width 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        color: white;
        font-weight: bold;
        font-size: 1em;
        padding-right: 8px;
    }

    .upload-progress-text {
        font-size: 1em;
        color: #333;
    }

    .upload-cancel-button {
        padding: 8px 15px;
        background-color: #f44336;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 1em;
        transition: background-color 0.3s ease;
    }

    .upload-cancel-button:hover:not(:disabled) {
        background-color: #d32f2f;
    }

    .upload-cancel-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background-color: #cccccc;
    }

    @media (max-width: 600px) {
        .upload-progress-container {
            width: 90%;
            padding: 10px;
        }

        .upload-progress-bar {
            height: 20px;
        }

        .upload-progress-bar-inner {
            font-size: 0.9em;
            padding-right: 5px;
        }

        .upload-progress-text,
        .upload-cancel-button {
            font-size: 0.9em;
        }
    }

    /* --- Styly pro tlačítka Zpět/Vpřed - ponecháme beze změn --- */
    button[onclick="zpet()"],
    button[onclick="vpred()"] {
        width: 36px;
        height: 36px;
        padding: 0px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    button[onclick="zpet()"] img,
    button[onclick="vpred()"] img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    #dropIconArea svg {
        width: 80px;
        height: 80px;
        color: #007bff;
        animation: subtleFloatFade 2s infinite ease-in-out;
    }

    #dropIconArea p {
        font-size: 1.2em;
        color: #333;
        margin: 0;
    }

    @keyframes subtleFloatFade {
        0%, 100% {
            transform: translateY(0);
            opacity: 1;
        }
        50% {
            transform: translateY(-10px);
            opacity: 0.6;
        }
    }

    #cancelUpload {
        color: white;
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
    }
    .red-cross {
        color: red !important;
    }

    body { padding: 20px; }
    .file-item { display: flex; align-items: center; cursor: pointer; padding: 5px; user-select: none; }
    .file-item:hover { background-color: #f8f9fa; }
    .file-item.selected { background-color: #cce5ff; }
    #context-menu { display: none; position: absolute; background: white; border: 1px solid #ccc; padding: 5px; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 1000; }
    .toolbar { margin-bottom: 10px; }
    .highlighted { background-color: yellow; font-weight: bold; }

    /* --- STYLY PRO UPLOAD OVERLAY A PROGRESS BAR - ponecháme beze změn --- */
    #uploadOverlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }

    #uploadOverlay.active {
        display: block;
    }

    #progressContainer {
        display: none;
        align-items: center;
        gap: 10px;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1001;
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0,0,0,0.3);
        max-width: 90%;
        width: auto;
    }

    #progressBar {
        width: 500px;
        height: 20px;
    }

    #cancelUpload {
        font-size: 35px;
        color: white !important;
        transform: scale(0.7);
        display: none;
        border: 0;
        background-color: #6c757d;
        border-radius: 0.25rem;
        padding: 0 0.5rem;
    }
	
	
.button-bar {
    display: flex;
    gap: 1px;
}

.button-bar button {
    display: flex;
    align-items: center;
    white-space: nowrap;
    /* Další styly pro tlačítka */
}

.button-bar button img {
    margin-right: 1px;
    /* Další styly pro obrázky v tlačítkách */
}




.table th { /* Pokud vaše tabulka má třídu "table" */
    border: 1px solid #ddd; /* Nebo jiný styl ohraničení */
}

/* Pokud nemáte třídu tabulky, můžete použít přímý selektor */
table thead th {
    border: 5px solid #ddd;
}
.table th {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd; /* Ohraničení pouze dole */
    /* Nebo pro ohraničení kolem každé buňky hlavičky: */
    /* border: 1px solid #ddd; */
}

.table thead th {
    background-color: #f8f8f8; /* Volitelné pozadí hlavičky */
}

/* Jednoduchý překryv, který jen zešedne stránku */
#simple-overlay {
    position: fixed; /* Zůstane na místě, i když se stránka scrolluje */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Jemně šedé a průhledné pozadí */
    z-index: 9999; /* Zajistí, že bude nad vším ostatním */
    display: none; /* Ve výchozím stavu je skryto */
}


/* Jednoduchý překryv, který jen zešedne stránku */
#simple-overlay {
    position: fixed; /* Zůstane na místě, i když se stránka scrolluje */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Jemně šedé a průhledné pozadí */
    z-index: 9999; /* Zajistí, že bude nad vším ostatním */
    display: none; /* Ve výchozím stavu je skryto */
}



</style>