/* Apache-autoindex-Styling passend zum Hauptsite-Design (dark + brass).
 * Aktiviert via /usr/webs/.htaccess → IndexStyleSheet /autoindex.css + IndexOptions HTMLTable.
 * Gilt fuer alle autoindex-Listings im Webroot, z.B. /hobby-fotografie-josef-sejrek/, /android/.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --ink-900: #0e0d0b;
    --ink-800: #15130f;
    --ink-700: #1c1a16;
    --ink-500: #3b352d;
    --ink-100: #d9d4c8;
    --ink-50:  #f3efe5;
    --brass-200: #e3cfae;
    --brass-300: #cdb084;
    --brass-400: #b8975f;
    --brass-500: #ab9374;
}

html, body {
    margin: 0;
    padding: 0;
    background:
        radial-gradient(ellipse at top, rgba(171,147,116,0.08), transparent 55%),
        var(--ink-900);
    color: var(--ink-100);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

body {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--ink-50);
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
    word-break: break-all;
}

h1::before {
    content: "▸ ";
    color: var(--brass-400);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(171,147,116,0.4), transparent);
    margin: 1rem 0 1.5rem;
}

a {
    color: var(--brass-300);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { color: var(--brass-200); }

#indexlist {
    width: 100%;
    border-collapse: collapse;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
}

tr.indexhead th {
    text-align: left;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brass-400);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--ink-500);
}

tr.indexhead th a {
    color: var(--brass-400);
}

/* Apaches <hr> Zwischenzeilen unsichtbar machen */
tr.indexbreakrow, tr.indexbreakrow th {
    padding: 0;
    border: 0;
}
tr.indexbreakrow hr {
    display: none;
}

#indexlist td {
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid rgba(59,53,45,0.3);
    vertical-align: middle;
    white-space: nowrap;
}

#indexlist tr.even td,
#indexlist tr.odd td {
    transition: background 0.1s;
}
#indexlist tr.even:hover td,
#indexlist tr.odd:hover td {
    background: rgba(28,26,22,0.65);
}

/* Spaltenbreiten: Name flexibel, Datum/Groesse kompakt */
td.indexcolname  { width: 100%; }
td.indexcollastmod { color: rgba(217,212,200,0.55); font-size: 12px; }
td.indexcolsize    { color: var(--brass-300); text-align: right; font-size: 12px; }
td.indexcolicon  { width: 24px; text-align: center; }

/* Apache-Icons dezent — das Default-Set ist ziemlich 90er */
td.indexcolicon img {
    opacity: 0.4;
    filter: hue-rotate(170deg) saturate(0.3) brightness(1.5);
    width: 14px;
    height: 14px;
}

/* Parent-Directory-Pfeil groesser + brass */
td.indexcolicon img[alt="[PARENTDIR]"] {
    opacity: 0.75;
}

/* Address-Footer von Apache */
address {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ink-500);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-style: normal;
    letter-spacing: 0.1em;
    color: rgba(217,212,200,0.5);
}

/* Pre-Tag (falls ohne HTMLTable fallback) */
pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-100);
}

/* Scrollbars wie auf der Hauptsite */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-500); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brass-500); }
