* {
	padding:0;
	margin:0;
}

body {
	color: #333;
	font: 15px Sans-Serif;
	padding: 50px;
	background: #eee;
}

h1 {
	text-align: center;
	padding: 20px 0 12px 0;
	margin: 0;
}
h1 a {
	text-decoration: underline;
	color: #e06419;
}
h2 {
	font-size: 16px;
	text-align: center;
	padding: 0 0 12px 0; 
}
h3 {
	text-align: center;
	padding: 15px 0 12px 0;
	margin: 0;
}

#container {
	box-shadow: 0 5px 10px -5px rgba(0,0,0,0.5);
	position: relative;
	background: white; 
	/* Rajoitetaan sisältö kohtuulliseen leveyteen ja keskitetään */
	max-width: 1150px;
	width: 100%;
	margin: 0 auto;
}

/*
	RESPONSIIVISUUS
	- Pienillä näytöillä typistetään tiedostonimi (…)
	- Varmistetaan, että muut sarakkeet pysyvät luettavina
*/

@media (max-width: 700px) {
	body {
		padding: 12px;
	}
	h1{
		font-size: 22px;
	}
 /* Piilotetaan Tyyppi- ja Koko-sarakkeet */
    table th:nth-child(2),
    table td:nth-child(2),
    table th:nth-child(3),
    table td:nth-child(3) {
        display: none;
    }

   /* Kiinteä layout, jotta ellipsis toimii */
    table {
        table-layout: fixed;
        width: 100%;
    }
	th:nth-child(4), td:nth-child(4) { width: 120px; }
	/* Kapennetaan muita sarakkeita, jotta "Tiedostonimi" saa tilaa */
	/*
	th:nth-child(2), td:nth-child(2) { width: 70px; }
	th:nth-child(3), td:nth-child(3) { width: 85px; }
	th:nth-child(4), td:nth-child(4) { width: 110px; }
	*/
	  /* Tiedostonimi: katkaisu ellipsillä */
    table td:nth-child(1) a {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

	/* Katkaistaan pitkät tiedostonimet */
	/*
	td:first-of-type a {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	*/
}

table {
	background-color: #F3F3F3;
	border-collapse: collapse;
	width: 100%;
	margin: 15px 0;
}

th {
	background-color: #FE4902;
	color: #FFF;
	cursor: pointer;
	padding: 8px 12px;

	/* selkeämpi "painike" */
	border-bottom: 3px solid rgba(0,0,0,0.15);
	box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset;
	user-select: none;
	position: relative;
}

th:hover {
	filter: brightness(1.08);
	text-decoration: underline;
}

th:active {
	transform: translateY(1px);
}

/* Pieni yleisvihje "voi lajitella" */
th::after {
	content: " ⇅";
	font-size: 0.9em;
	opacity: 0.85;
}

/* Kun sarake on lajiteltu, näytetään suunta */
th.sorttable_sorted::after {
	content: " ▲";
}

th.sorttable_sorted_reverse::after {
	content: " ▼";
}

th small {
	font-size: 9px; 
}

td, th {
	text-align: left;
}

a {
	text-decoration: none;
}

td a {
	/* color: #663300; */
	color: #000;
	display: block;
	padding: 5px 10px;
}
th a {
	padding-left: 0
}

td:first-of-type a {
	background: url(./.images/file.png) no-repeat 10px 50%;
	padding-left: 35px;
}
th:first-of-type {
	padding-left: 35px;
}

td:not(:first-of-type) a {
	background-image: none !important;
} 

tr:nth-of-type(odd) {
	/* background-color: #E6E6E6; */
	background-color: #fff;
}

tr:hover td {
	background-color: #cfd4dc;
}

tr:hover td a {
	color: #000;
}

/* icons for file types (icons by famfamfam) */

/* images */
table tr td:first-of-type a[href$=".jpg"], 
table tr td:first-of-type a[href$=".png"], 
table tr td:first-of-type a[href$=".gif"], 
table tr td:first-of-type a[href$=".svg"], 
table tr td:first-of-type a[href$=".jpeg"]
{background-image: url(./.images/image.png);}

/* zips */
table tr td:first-of-type a[href$=".zip"] 
{background-image: url(./.images/zip.png);}

/* css */
table tr td:first-of-type a[href$=".css"] 
{background-image: url(./.images/css.png);}

/* docs */
table tr td:first-of-type a[href$=".doc"],
table tr td:first-of-type a[href$=".docx"],
table tr td:first-of-type a[href$=".ppt"],
table tr td:first-of-type a[href$=".pptx"],
table tr td:first-of-type a[href$=".pps"],
table tr td:first-of-type a[href$=".ppsx"],
table tr td:first-of-type a[href$=".xls"],
table tr td:first-of-type a[href$=".xlsx"]
{background-image: url(./.images/office.png)}

/* videos */
table tr td:first-of-type a[href$=".avi"], 
table tr td:first-of-type a[href$=".wmv"], 
table tr td:first-of-type a[href$=".mp4"], 
table tr td:first-of-type a[href$=".mov"], 
table tr td:first-of-type a[href$=".m4a"]
{background-image: url(./.images/video.png);}

/* audio */
table tr td:first-of-type a[href$=".mp3"], 
table tr td:first-of-type a[href$=".ogg"], 
table tr td:first-of-type a[href$=".aac"], 
table tr td:first-of-type a[href$=".wma"] 
{background-image: url(./.images/audio.png);}

/* web pages */
table tr td:first-of-type a[href$=".html"],
table tr td:first-of-type a[href$=".htm"],
table tr td:first-of-type a[href$=".xml"]
{background-image: url(./.images/xml.png);}

table tr td:first-of-type a[href$=".php"] 
{background-image: url(./.images/php.png);}

table tr td:first-of-type a[href$=".js"] 
{background-image: url(./.images/script.png);}

/* directories */
table tr.dir td:first-of-type a
{background-image: url(./.images/folder.png);}

/* Filter / search bar */
.filter-bar{
	max-width: 820px;
	margin: 10px auto 14px auto;
	padding: 10px 12px;
	background: rgba(0,0,0,0.04);
	border-radius: 10px;
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

.filter-bar label{
	font-weight: 700;
}

#fileFilter{
	min-width: 260px;
	max-width: 520px;
	width: 60%;
	padding: 8px 10px;
	border: 1px solid rgba(0,0,0,0.25);
	border-radius: 8px;
	font-size: 16px;
}

#fileFilter:focus{
	outline: 3px solid rgba(254,73,2,0.35);
	border-color: rgba(254,73,2,0.55);
}

#clearFilter{
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid rgba(0,0,0,0.25);
	background: #fff;
	cursor: pointer;
	font-size: 14px;
}

#clearFilter:hover{
	filter: brightness(0.97);
}

.filter-status{
	width: 100%;
	font-size: 13px;
	opacity: 0.85;
	padding-top: 2px;
}
