/* Base Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}
header {
  background: #4CAF50;
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 2em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  cursor: pointer;
}
/* Wishlist Container (top right, positioned to left of user menu) */
#wishlistContainer {
  position: fixed;
  top: 10px;
  right: 120px;  /* moved further left */
  z-index: 1100;
}
#wishlistContainer button.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1em;
  color: #000;
}
#wishlistContainer svg {
  width: 24px;
  height: 24px;
  fill: #f39c12;
}
/* Wishlist Dropdown */
#wishlistDropdown {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f1f1f1;
  min-width: 200px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}
#wishlistDropdown.show { display: block; }
#wishlistDropdown ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 10px;
}
#wishlistDropdown li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #ddd;
  font-size: 0.9em;
}
#wishlistDropdown li button {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 0.8em;
}
#wishlistDropdown button.download-btn {
  background: #28a745;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
}
/* User Menu Dropdown (top right) */
#userMenu {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1100;
}
#userMenu button.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1em;
  color: #000;
}
#userMenu svg {
  width: 24px;
  height: 24px;
  fill: #000;
}
#userDropdown {
  display: none;
  position: absolute;
  right: 0;
  background-color: #f1f1f1;
  min-width: 180px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}
#userDropdown.show { display: block; }
#userDropdown input {
  width: calc(100% - 20px);
  margin: 5px 0;
  padding: 5px;
  box-sizing: border-box;
}
#userDropdown button {
  margin: 5px 0;
  padding: 5px 10px;
  cursor: pointer;
}
/* Help Icon and Panel */
/* The help icon now reverts to its original square, rounded style */
.help-icon {
  cursor: pointer;
  font-size: 16px;
  background: #007BFF;
  color: white;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  border-radius: 50%;
}
/* The help panel is fixed at bottom center */
/* Help Panel Fixed and styled but without hardcoded position */
#help-content {
  position: fixed;
  background: #f2f2f2;
  border: 1px solid #ddd;
  padding: 10px;
  width: 300px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1500;
  border-radius: 10px;
  display: none;
}
.help-close {
  position: absolute;
  top: 5px;
  right: 8px;
  cursor: pointer;
  font-weight: bold;
}
/* Side Menu (left sliding menu) */
.sidemenu {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}
.sidemenu a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 20px;
  color: #818181;
  display: block;
  transition: 0.3s;
}
.sidemenu a:hover { color: #f1f1f1; }
.sidemenu .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}
#menuIcon {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2100;
  cursor: pointer;
}
/* Page Layout */
#page-description {
  margin: 20px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}
#container {
  display: flex;
  padding: 20px;
}
#fileTreeContainer {
  width: 30%;
  background: white;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 5px;
  margin-right: 20px;
  max-height: 80vh;
  overflow-y: auto;
}
#fileTreeContainer ul {
  list-style-type: none;
  padding-left: 20px;
}
#fileTreeContainer ul ul {
  border-left: 2px dashed #ccc;
  margin-left: 10px;
  padding-left: 10px;
}
/* File Content Panel */
#fileContentPanel {
  width: 70%;
  background: white;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 5px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
#closeBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
  display: none;
}
#dataRangeMessage {
  text-align: center;
  margin-top: 50px;
  font-style: italic;
  font-size: 1.1em;
  color: #333;
  background: transparent;
  border: none;
}
.mark-checkbox { margin-right: 5px; }
li { margin: 5px 0; }
.folder { font-weight: bold; cursor: pointer; color: #333; }
.file { color: #555; }
.toggle-button, .view-button, .download-button {
  margin-right: 5px;
  cursor: pointer;
  border: none;
  padding: 3px 8px;
  border-radius: 3px;
  color: white;
}
.toggle-button, .view-button { background: #4CAF50; }
.download-button { background: #2196F3; text-decoration: none; }
.hidden { display: none; }
.cancel-btn {
  background-color: #dc3545; /* red */
  color: white;
  padding: 8px 16px;
  margin-top: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
}
th, td { border: 1px solid #ddd; padding: 8px; }
tr:nth-child(even) { background-color: #f2f2f2; }
tr:hover { background-color: #ddd; }
th { padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #4CAF50; color: white; }
.filter-input { width: 95%; box-sizing: border-box; }
#fileContentPanel pre { white-space: pre-wrap; word-wrap: break-word; }
/* Admin Controls */
#adminControls {
  margin: 20px;
  padding: 10px;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 5px;
  display: none;
}
    /* Download Query Bar */
    .download-query-bar {
      background: #ffffff;
      padding: 15px;
      margin: 15px 20px;
      border: 1px solid #ddd;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      font-family: Arial, sans-serif;
    }
.download-top-row {
  display: flex;         /* Already in your code */
  align-items: center;   /* Vertically center the items */
  gap: 1rem;             /* Spacing between each group */
  flex-wrap: nowrap;     /* Prevent them from wrapping (optional) */
}

.source-block {
  display: block;    /* Ensures each block is on a new line */
  width: 100%;       /* Stretch across the container if desired */
  margin-top: 0.5rem;
  border: 2px solid #ccc; /* or your existing dynamic color */
  padding: 10px;
  border-radius: 4px;
}
.source-subform-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* This allows the items to wrap on smaller screens */
  margin-top: 0.5rem;
}


.dropdown-group {
  display: inline-flex;  /* Put label + button on one line */
  align-items: center;
  gap: 0.5rem;           /* Small gap between label and button */
}

.dropdown-group label {
  /* Remove or override the display:block from your code */
  display: inline-block; 
  margin-bottom: 0;      
  margin-right: 0;       /* Or a small margin if desired */
}

    .dropbtn {
      background-color: #007BFF;
      color: white;
      padding: 6px 12px;
      font-size: 14px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .dropdown { position: relative; display: inline-block; }
    .dropdown-content {
      display: none;
      position: absolute;
      background-color: #f1f1f1;
      min-width: 180px;
      max-height: 200px;
      overflow-y: auto;
      box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
      z-index: 10;
      border: 1px solid #ddd;
      border-radius: 4px;
      margin-top: 5px;
      padding: 5px;
    }
    .dropdown-content label {
      display: block;
      padding: 6px 10px;
      cursor: pointer;
      color: #555;
    }
    .dropdown-content label:hover { background-color: #ddd; }
    .dropdown-content button.select-all-btn {
      background: #007BFF;
      color: white;
      border: none;
      width: 100%;
      padding: 4px;
      margin-bottom: 5px;
      cursor: pointer;
      border-radius: 4px;
    }
    .show { display: block !important; }
    .download-btn {
      background-color: #28a745;
      color: white;
      padding: 8px 16px;
      margin-top: 10px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    .download-btn:hover { background-color: #218838; }
    .selected-items-display {
      margin-top: 15px;
      background: #f9f9f9;
      padding: 10px;
      border-radius: 4px;
      border: 1px solid #ccc;
      font-size: 14px;
      color: #333;
    }
/* Make the <select> look just like your other .dropbtn buttons */
select.dropbtn {
  -webkit-appearance: none;  /* remove default arrow */
  -moz-appearance: none;
  appearance: none;
  background-color: #007BFF;
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  /* optional: add a little padding on the right for your own arrow */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20…%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

/* And adjust the label to match inline styling */
.download-method label {
  font-size: 14px;
  color: #333;
}
#hiddenContainer {
  position: fixed;
  top: 10px;
  z-index: 1100;
}

#hiddenContainer .dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#hiddenDropdown {
  display: none;
  position: absolute;
  right: 0;
  background: #f1f1f1;
  min-width: 200px;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
#hiddenDropdown.show { display: block; }

#hiddenDropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#hiddenDropdown li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #ddd;
}
#hiddenDropdown li button {
  background: none;
  border: none;
  cursor: pointer;
  color: #007BFF;
  font-size: 0.9em;
}
.hidden-node {
  display: none !important;
}
#hiddenCount {
  display: inline-block;
  background: #c0392b;
  color: white;
  font-size: 0.8em;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 12px;
  vertical-align: middle;
}

.eye-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

/* 2) Add spacing between the label text and the eye icon */
li[data-path] > .eye-btn {
  margin-left: 12px;   /* tweak this value to taste */
}

/* 3) If you ever need to target the header hidden‐list button */
#hiddenContainer .dropbtn {
  background: none !important;
  border: none !important;
}

/* 4) And if you want extra space there, too */
#hiddenContainer .dropbtn > svg {
  margin-left: 12x;
}


/* Style the "Clear" button similarly to the "Select" buttons or however you prefer */
.clear-btn {
  background-color: red; /* or #007BFF if you want it the same as "Select" */
  color: white;
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

    .download-info-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #e8f5e9;
      padding: 10px 20px;
      border: 1px solid #ccc;
      border-radius: 4px;
      margin: 15px 20px 5px;
    }

.info-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 0;
}
.info-title {
  font-size: 1.2em;
  font-weight: bold;
  margin: 0;
}
.content-wrapper {
  max-width: 10000px;   /* Optional: Constrain overall width */
  margin: 0 auto;     /* Optional: Center the content on the page */
  padding: 20px;
  background-color: #fff;
}

/* Floats the image to the right so text flows around it */
.float-right-image {
  float: right;
  margin: 0 0 10px 10px;  /* Space between the text and the image: top=0, right=0, bottom=10px, left=10px */
  max-width: 500px;       /* Adjust the max width of the image as needed */
  height: auto;           /* Maintain aspect ratio */
  display: block;         /* Ensures the image is displayed as a block element */
}

.pnrr-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 300px;        /* adjust to taste */
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.75em;       /* shrink text so it fits */
  line-height: 1.3;        /* improve readability */
  word-wrap: break-word;   /* force long lines to break */
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  pointer-events: none;    /* don’t intercept clicks */
}



/* Slideshow images can be constrained in size here or inline */
#slideshow img {
  max-width: 100%;
  height: auto;
  display: block;
}


footer {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-style: italic;
  font-size: 0.9em;
  color: #555;
}
