body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column; /* zodat logo bovenaan kan */
  height: 100vh;
  background-color: #F8EBDA;
}

header {
  text-align: left;
  background-color: #F8EBDA;
  padding: 10px 0;
  border-bottom: 2px solid #E2C6A6;
}

#logo {
  max-height: 80px;       /* grootte logo */
  height: auto;
  width: auto;
}

main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar kleuren en layout */
#sidebar {
  width: 280px;
  background: #F6DCC4;
  border-right: 1px solid #E2C6A6;
  overflow-y: auto;
  padding: 10px;
}

#sidebar ul {
  list-style-type: none;
  margin: 0;
  padding-left: 15px;
}

#content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #F8EBDA;
}

.folder {
  cursor: pointer;
  font-weight: bold;
  color: #3A2B17;
  margin-top: 5px;
  display: flex;
  align-items: center;   /* icoon en tekst mooi verticaal uitlijnen */
  gap: 6px;              /* ruimte tussen icoon en tekst */
  white-space: nowrap;   /* nooit afbreken naar tweede regel */
  overflow: hidden;      /* teveel tekst verbergen */
  text-overflow: ellipsis; /* ... tonen bij te lange namen */
}

.folder:focus,
.folder:active {
  outline: none;
  box-shadow: none;
  background: inherit;
}

.folder:hover {
    background: #FFEBC8;
    white-space: normal;
}

.subfolder {
  margin-left: 20px;
  display: none;
}

.back-button {
  background-color: #d9534f; /* rood */
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 10px;
  cursor: pointer;
}
.back-button:hover {
  background-color: #c9302c; /* donkerder rood bij hover */
}

/* Zoekveld */
#mp3Search {
    padding: 10px;
    width: 80%;
    max-width: 400px;
    font-size: 16px;
}
/* Scrollbare zoekresultaten */
#searchResults {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
    width: 90%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
}

#searchResults li {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}
#searchResults li:last-child {
    border-bottom: none;
}

#searchResults li a {
    font-weight: bold;
    color: #269CE9;
    text-decoration: none;
}
#searchResults li a:hover {
    text-decoration: underline;
}

#searchResults li div {
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

.open { display: block; }

.filelist { border-collapse: collapse; width: 100%; }
.filelist th, .filelist td { border: 1px solid #ccc; padding: 6px; }

/* ✅ Voorkomt verschuiving van de layout bij verschijnen van scrollbars */
html {
  overflow-y: auto;
}

.folder:focus {
  outline: none;
}


/* =========================
   Bestandenlijst (files.php)
   ========================= */

.filelist-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}
.file-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    width: 70%;
    max-width: 700px;
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.15s ease, background 0.15s ease;
}
.file-card:not(.folder):hover {
    transform: translateY(-3px);
    background: #f1f1f1;
}
.file-card .icon {
    font-size: 1.8em;
    margin-right: 12px;
}
.file-card .info {
    text-align: left;
    flex: 1;
}
.file-card .name {
    font-size: 1.1em;
    color: #1d1d1d;
    text-decoration: none;
}
.file-card .name:hover {
    text-decoration: underline;
}
.file-card .meta {
    font-size: 0.9em;
    color: #666;
}
.file-card.folder {
    background: #F6DCC4;
    cursor: pointer;
}

.file-card.folder:hover {
    background: #FFDFA7;
    transform: translateY(-3px);
}

button.download {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #269CE9;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}
button.download:hover {
    background-color: #70B9E8;
}
.download-container {
    text-align: center;
    margin-top: 15px;
}
