/* Plupart enhancements: preserve original Apple layout, add behavior */
#apple-logo { cursor: pointer; filter: drop-shadow(0 2px 3px rgba(100,100,100,.85)); }
#apple-logo-text {
  color: #00377a;
  text-shadow: rgb(100, 100, 100) 0px 2px 3px;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

body.folder-listing-theme {
  padding-bottom: 58px;
}

#container #header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 980px;
  max-width: 100%;
  min-height: 38px;
  margin: 7px auto;
}
#container #header > div { float: none; }
.plupart-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 0 auto;
}

#listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  flex-wrap: nowrap;
}
#listing-toolbar .toolbar-left,
#listing-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}
#listing-toolbar .toolbar-left {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #000;
  font-size: 12px;
  white-space: nowrap;
  min-width: 168px;
  width: 168px;
  justify-content: center;
  text-align: center;
}
#listing-toolbar .toolbar-title {
  color: #000;
  font-size: 12px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  line-height: 16px;
}
#listing-toolbar .toolbar-meta {
  color: #000;
  font-size: 11px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 16px;
  line-height: 16px;
}
#listing-toolbar .toolbar-search {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}
#listing-toolbar .toolbar-search span { color: #fff; font-weight: bold; text-shadow: 0 1px 2px rgba(120,120,120,.95); }
#listing-toolbar .toolbar-search input {
  width: 162px;
  height: 24px;
  box-sizing: border-box;
  padding: 3px 6px;
  border: 1px solid #b9b9b9;
  border-radius: 2px;
  background: #fff;
}
#listing-toolbar .toolbar-button {
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid #bcbcbc;
  border-radius: 2px;
  background: linear-gradient(#fff, #e8e8e8);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}
#listing-toolbar .toolbar-button:hover { background: linear-gradient(#fff, #dedede); }

.table-hidden-row { display: none; }
.listing-empty {
  display: none;
  padding: 16px;
  color: #666;
  font-style: italic;
}
.folder-listing-theme td img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.file-modified-cell,
.file-size-cell,
.file-description-cell,
.file-select-cell {
  white-space: nowrap;
  text-align: right;
}
.file-description-cell {
  color: #555;
  font-size: 12px;
}
.file-select-cell {
  width: 24px;
}
.file-selection-input { cursor: pointer; }
tr.is-selected { background-color: #dbe8f7 !important; }

.folder-listing-theme table tr:first-child th,
.folder-listing-theme table tr:first-child th a {
  font-size: 12px !important;
}
.folder-listing-theme table tr:first-child th:nth-child(n+3),
.folder-listing-theme table tr:first-child th:nth-child(n+3) a {
  text-align: right !important;
}
.folder-listing-theme table tr:first-child th:last-child {
  width: 24px;
  padding-right: 10px;
}
.folder-listing-theme table tr td:nth-child(3),
.folder-listing-theme table tr td:nth-child(4),
.folder-listing-theme table tr td:nth-child(5),
.folder-listing-theme table tr td:nth-child(6) {
  text-align: right;
}
.folder-listing-theme table tr td:nth-child(2) { text-align: left; }

#plupart-ad-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.68);
  align-items: center;
  justify-content: center;
}
#plupart-ad-overlay img {
  max-width: 88vw;
  max-height: 88vh;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
#plupart-preview-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0; top: 0; right: 0; bottom: 0;
}
#plupart-preview-modal .preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
}
#plupart-preview-modal .preview-dialog {
  position: relative;
  width: 960px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  margin: 20px auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  overflow: hidden;
}
#plupart-preview-modal .preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #d7d7d7;
  background: linear-gradient(#f8f8f8, #ececec);
}
#plupart-preview-modal #preview-close {
  border: 1px solid #bdbdbd;
  border-radius: 3px;
  background: linear-gradient(#fff, #e8e8e8);
  width: 30px;
  height: 28px;
  cursor: pointer;
  font-size: 20px;
  line-height: 20px;
}
#plupart-preview-modal .preview-body {
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #fff;
}
#plupart-preview-modal .preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
#plupart-preview-modal img,
#plupart-preview-modal video,
#plupart-preview-modal iframe,
#plupart-preview-modal embed {
  max-width: 100%;
  max-height: calc(100vh - 240px);
}
#plupart-preview-modal .zip-list,
#plupart-preview-modal .meta-table {
  width: 100%;
  border-collapse: collapse;
}
#plupart-preview-modal .zip-list th,
#plupart-preview-modal .zip-list td,
#plupart-preview-modal .meta-table th,
#plupart-preview-modal .meta-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e2e2;
  text-align: left;
  vertical-align: top;
}
#plupart-preview-modal .preview-placeholder,
#plupart-preview-modal .preview-note { color: #666; }

#footer.plupart-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 32px;
  background: transparent;
  box-shadow: none;
  border: 0;
}
#footer.plupart-footer .plupart-footer-inner {
  width: 980px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 10px;
  color: #555;
  font-size: 11px;
  line-height: 14px;
  font-family: Arial, Helvetica, sans-serif;
  background: #d7d7d7 url('../pict/upper_bgnd.jpg') repeat-x 0 0;
  border-radius: 3px 3px 0 0;
  border-top: 0;
}
#footer.plupart-footer a {
  color: #0066cc;
  text-decoration: none;
}
#footer.plupart-footer a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  #container #header {
    width: auto;
    min-height: 38px;
    flex-wrap: wrap;
    padding-bottom: 8px;
  }
  #listing-toolbar {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  #listing-toolbar .toolbar-left { margin-left: 0; }
  #footer.plupart-footer .plupart-footer-inner {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
}
@media (max-width: 640px) {
  #listing-toolbar .toolbar-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  #listing-toolbar .toolbar-search input { width: 150px; }
  #footer.plupart-footer .plupart-footer-inner { flex-direction: column; align-items: flex-start; }
}

#footer.plupart-footer:before { display:none !important; }
#footer.plupart-footer .plupart-footer-inner:before { display:none !important; }

#footer.plupart-footer{border-top:0 !important;}
#footer.plupart-footer:before,#footer.plupart-footer:after{display:none !important;}

.cap.boxtop{height:5px;width:100%;display:block;}

#container #header{
  min-height:42px;
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
}
#listing-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
}

@import url('/FolderListing/javas/apache-autoindex-rebuild.css');
