/* Plik: /var/www/paczki.netbsd.pl/style.css */

/* --- Podstawowe ustawienia i tryb ciemny/jasny --- */
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --link-color: #005fcc;
    --border-color: #dddddd;
    --header-bg: #f7f7f7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1e1e1e;
        --text-color: #cccccc;
        --link-color: #58a6ff;
        --border-color: #444444;
        --header-bg: #2d2d2d;
    }
}

/* --- Styl ogólny strony --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
}

h1 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 0;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Tabela z plikami --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

thead {
    background-color: var(--header-bg);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
}

/* Ukrycie domyślnych i brzydkich ikon Apache */
td img {
   display: none;
}

/* Dodanie "ikon" za pomocą pseudoelementów */
td a[href$="/"]::before {
    content: '📁'; /* Ikona folderu */
    margin-right: 10px;
    font-size: 1.2em;
}

td a:not([href$="/"])::before {
    content: '📄'; /* Ikona pliku */
    margin-right: 10px;
    font-size: 1.2em;
}

td a[href="?C=N;O=D"]::before,
td a[href="?C=M;O=A"]::before,
td a[href="?C=S;O=A"]::before,
td a[href="?C=D;O=A"]::before {
    content: ''; /* Usuń ikonę dla linków sortowania */
    margin: 0;
}


/* --- Stopka --- */
address {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    font-style: normal;
    font-size: 0.9em;
    color: #888;
}
