/**
 * @author [IT's Ambio AG]
 * @version 1.0
 */
.ced-file-list-container {
  background: #F7F7F7;
  padding: 20px 10px;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
}

.ced-file-list-container h2 {
  font-size: 24px;
  color: #333;
  margin: 0 0 20px 0;
}

.ced-file-list-controls {
  display: flex;
  gap: 7px;
  margin-bottom: 10px;
}

.ced-file-list-controls input[type="text"] {
  width: 70%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.2;
}

.ced-file-list-controls select {
  width: 30%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
  line-height: 1.2;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24"><path fill="%23333" d="M7 10l5 5 5-5H7z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.ced-sort-options {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.ced-sort-options label {
  font-size: 16px;
  color: #333;
  display: flex;
  align-items: center;
}

.ced-sort-options input[type="radio"] {
  margin-right: 5px;
  accent-color: #D2755A;
}

/* Tabelle */
#fileList {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed; /* Feste Spaltenbreite */
}

/* Spaltenbreiten für Desktop */
#fileList th:nth-child(1),
#fileList td:nth-child(1) {
  width: 55%; /* Titel */
}

#fileList th:nth-child(2),
#fileList td:nth-child(2) {
  width: 30%; /* Vortragende */
}

#fileList th:nth-child(3),
#fileList td:nth-child(3) {
  width: 15%; /* Datum, ganz rechts */
}

#fileList thead tr {
  background: #D2755A;
  color: #fff;
}

#fileList th {
  padding: 15px;
  text-align: left;
  font-size: 16px;
}

#fileList th.sortable {
  cursor: pointer;
}

#fileList th.sortable:hover {
  background: #B95F47;
}

#fileList th.sortable i {
  margin-left: 5px;
  font-size: 14px;
  vertical-align: middle;
  opacity: 0.7;
  font-family: 'fontello';
}

#fileList th.sortable i:before {
  content: "\f0dc";
}

#fileList th.sortable.active {
  background: #B95F47;
}

#fileList th.sortable.active i {
  opacity: 1;
}

#fileList td {
  padding: 10px 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px; /* Titel */
  line-height: 1.3;
  color: #333;
}

/* Kleinere Schriftgröße für Vortragende und Datum */
#fileList td:nth-child(2),
#fileList td:nth-child(3) {
  font-size: 13px; /* Vortragende und Datum */
}

#fileList td a {
  text-decoration: none;
  color: #4669A9;
}

#fileList td a:hover {
  text-decoration: underline;
}

/* Keine Einträge Nachricht */
.no-results {
  display: none;
  text-align: center;
  margin: 20px 0;
  font-size: 16px;
  color: #666;
}

/* Mehr laden Link */
.load-more {
  display: block;
  text-align: center;
  margin: 20px 0;
  padding: 10px;
  background: #D2755A;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 16px;
}

.load-more:hover {
  background: #B95F47;
}

/* Responsives Design */
@media (max-width: 768px) {
  .ced-file-list-container {
    overflow-x: auto;
  }

  #fileList {
    min-width: 600px;
  }

  .ced-file-list-controls {
    flex-direction: column;
  }

  .ced-file-list-controls input[type="text"],
  .ced-file-list-controls select {
    width: 100%;
  }

  .ced-sort-options {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .ced-sort-options label {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .ced-file-list-controls input[type="text"],
  .ced-file-list-controls select {
    font-size: 14px;
  }

  #fileList {
    display: block;
    min-width: 0;
    border: none;
    width: 100%; /* Volle Breite auch bei leerer Tabelle */
  }

  #fileList thead {
    display: none;
  }

  #fileList tbody, #fileList tr, #fileList td {
    display: block;
    width: 100%;
  }

  #fileList tr {
    margin-bottom: 8px;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 5px;
    background: #fff;
  }

  #fileList td {
    padding: 3px 5px;
    border: none;
    position: relative;
    font-size: 15px; /* Titel */
    line-height: 1.2;
  }

  /* Titel und Vortragende auf 100% Breite */
  #fileList td:nth-child(1),
  #fileList td:nth-child(2) {
    width: 100%;
    font-size: 15px; /* Titel */
  }

  #fileList td:nth-child(2) {
    font-size: 13px; /* Vortragende */
  }

  #fileList td[data-label="Datum"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 3px 5px;
    font-size: 12px; /* Datum */
    line-height: 1.2;
  }

  #fileList td[data-label="Datum"] .file-meta {
    font-size: 12px !important; /* File-meta */
    color: #BBB !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
    display: inline-block;
  }

  #fileList td:before {
    content: attr(data-label);
    font-weight: bold;
    display: none;
    margin-bottom: 1px;
    color: #D2755A;
    font-size: 9px;
    line-height: 1.1;
  }

  #fileList td:first-child {
    padding-top: 5px;
  }

  #fileList td:last-child {
    border-bottom: none;
  }

  .file-meta.desktop-only {
    display: none;
  }

  .file-meta.mobile-only {
    display: block;
  }
}

@media (min-width: 481px) {
  .file-meta.desktop-only {
    display: block;
  }

  .file-meta.mobile-only {
    display: none;
  }
}

#fileList .file-meta {
  font-size: 12px !important; /* Zurück auf 12px, außer in Mobile */
  color: #BBB !important;
  margin-top: 2px !important;
  line-height: 1.2 !important;
}

.file-icon {
  font-size: 12px;
  vertical-align: middle;
  margin-right: 5px;
}
