/* BS2/3 to BS5 jQuery Blueimp upload migration*/

/* originally in inc.header.upload.php */
       body {
         padding-top: 60px;
         padding-bottom: 40px;
       } 
       .hero-unit {
         padding: 60px;
         line-height: 30px;
       }
       .accordion-heading .accordion-toggle {
          padding: 0px 15px;
       }
       .lowpad {
          padding: 0px 15px;
       }
       .dropdown-item {
           padding: 0 var(--bs-dropdown-item-padding-x)
       }
       .dropdown-menu {
           --bs-dropdown-link-hover-bg: var(--bs-light);
       }
       
       a {
           text-decoration: none;
       }
       
   .modal-body {
     line-height: 22px;
    }
    .navbar-nav a.active {
        background-color: #000
    }
    .navbar-nav .nav-link.active {
        color: #fff;
    }
    .navbar {
        --bs-navbar-padding-y: 0;
        --bs-navbar-hover-color: rgb(255 0 0 / 80%);
        background-image: linear-gradient(to bottom, #ffffff, #eeeeee);
    background-color: #f8f8f8;
    background-repeat: repeat-x;
}
/*.navbar-inverse .brand, .navbar-inverse .nav > li > a {
    color: #111111;
    text-shadow: none;
}*/
.navbar .brand {
    font-weight: 500;
}

   .table-header-rotated th.rotate-45 > div{
 left: 90px; /* 80 * tan(45) / 2 = 40 where 80 is the height on the cell and 45 is the transform angle*/  
 }
     table tr { height: 30px }
     .modal-body { max-height: 300px }
/* error container */
   errors {
     background-color:#163356;
     color:#fff;
     width:400px;
     padding:20px;
     margin:5px auto;
     display:none;
	-moz-border-radius:5px;
	-webkit-border-radius:5px;
     }
 
/* title */
errors h2 {
  margin:-5px 0;
  color:yellow;
}


/* BS3 → BS5 compatibility shim */
  .fade.in { opacity: 1; }            /* rows become visible, otherwise they'll be invisible'*/
  .collapse.in { display: block; }    /* if any collapses rely on 'in' */
  /* Optional: disable transitions for upload rows if you like */
  .files .fade { transition: none; }
  
    /* Font size adjustments */
  #upload {
    font-size: 0.9rem;              /* ~14.4px vs BS5 16px */
  }
  #upload .table td,
  #upload .table th {
    padding: .4rem .6rem;           /* a touch tighter than default */
  }
  /* Keep long filenames from blowing up apparent width without touching layout yet */
  #upload .files td.name {
    white-space: normal;
    word-break: break-word;
  }
  
  table.table.table-striped { font-size: 14px; } 
  
  table.table.table-striped th,
table.table.table-striped td {
  white-space: normal; /* Ensure normal wrapping behavior (already default) */
  overflow-wrap: break-word; /* Allow breaking within words to prevent overflow */
}

table.table.table-striped th:first-child,
table.table.table-striped td:first-child {
  min-width: 130px; /* Example: Set a minimum width (adjust as needed) */
  /* You can keep white-space: normal; and overflow-wrap: break-word; from the previous step */
}

form#fileupload input.form-control {
  max-height: 22px;
  /* Or max-width: 80px; if you want it to be responsive but not exceed this size */
}

  /* Progress container: BS2-like light gray w/ inset and rounded corners */
  .progress {
    background-color: #eef1f4;        /* tweak to match your screenshot’s shade */
    border: 1px solid #d9dee3;        /* soft edge so the gray “reads” */
    border-radius: .4rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
    overflow: hidden;                 /* keep bar corners clipped */
    height: 1.5rem;                    /* container height; bar is slightly shorter */
    margin: 0;
  }

  /* BS2→BS5 progress shim */
  .progress .bar {
    display: block;
    width: 0%;
    background-color: var(--bs-success); /* green */
    height: 1.5rem;                       /* 2) slightly shorter */
    /* barber pole stripes */
    background-image:
      linear-gradient(45deg,
        rgba(255,255,255,.25) 25%, transparent 25%,
        transparent 50%, rgba(255,255,255,.25) 50%,
        rgba(255,255,255,.25) 75%, transparent 75%, transparent),
      linear-gradient(to bottom, #66c46a, #3ea851);
    /* 2) BS2‑style vertical green gradient (bottom layer) */
    background-size: 1rem 1rem, 100%, 100%;
    transition: width .3s linear;      
    animation: progress-bar-stripes 1s linear infinite;
  }
  @keyframes progress-bar-stripes {
    from { background-position: 1rem 0, 0 0; }
    to   { background-position: 0 0,       0 0; }
  }
  
  /* Optional parity for success/error states if BlueImp sets them */
  .progress .bar.success { background-color: var(--bs-success); }
  .progress .bar.danger  { background-color: var(--bs-danger); }

  
  /* 3) Keep the top progress bar on same line, pushed to the right */
  form#fileupload .fileupload-buttons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
  }
  form#fileupload .fileupload-progress {
    margin-left: auto;            /* shove to the right */
    display: flex;
    align-items: center;
  }
  form#fileupload .fileupload-progress .progress {
    width: 220px;                 /* adjust to taste */
    margin: 0;                    /* no linebreak-causing margins */
  }

  /* Quota bar: plain green gradient, no stripes, no animation */
.progress.quotabar .bar-success {
  background: linear-gradient(to bottom, #66c46a, #3ea851); /* overwrite completely */
  background-color: #3ea851;
  animation: none;         /* kill the barber pole */
}

  /* Quota bar: yellow gradient, no stripes, no animation */
.progress.quotabar .bar-warning {
--bs-gradient: linear-gradient(to bottom, #fbb450, #f89406);    
  background-image: var(--bs-grdient);
  background-color: #f89406; /* BS2 warning-ish */
  animation: none;         /* kill the barber pole */
}


  /* Quota bar: red gradient, no stripes, no animation */
.progress.quotabar .bar-danger {
  --bs-gradient: linear-gradient(180deg, #ee5f5b, #bd362f);
  background-image: var(--bs-grdient);
  background-color: #ee5f5b; /* BS2 danger-ish */
  animation: none;         /* kill the barber pole */
}

/* Give each item a clean, single border and keep corners tidy */
.accordion .accordion-item {
  border-radius: .5rem;
  overflow: hidden; /* ensures the header highlight aligns perfectly */
  margin-bottom: .5rem; /* nice spacing between items */
  border: 1px solid var(--bs-border-color, #dee2e6);
}

/* Header button: bigger text, taller row, no weird focus ring */
.accordion .accordion-button {
  font-size: 1.25rem;      /* ~h3 in BS */
  line-height: 1.2;
  padding: .85rem 1rem;    /* closed height ≈ 42–48px depending on font */
  background-color: #eaf3ff;  /* your highlight color; tweak as desired */
  border: 0;               /* remove internal borders that cause misalignments */
  box-shadow: none;
}

/* When collapsed, keep the taller height and a slightly subtler shade */
.accordion .accordion-button.collapsed {
  background-color: #f6f9ff; /* subtler, still visibly “bar” */
}

/* Add a clean divider between header and body when opened */
.accordion .accordion-collapse .accordion-body {
  border-top: 1px solid var(--bs-border-color, #dee2e6);
  background: #fff; /* ensures the body isn’t picking up header tint */
}

/* Make sure the chevron aligns after we change sizes */
.accordion .accordion-button::after {
  transform: scale(1.05); /* tiny nudge so it feels balanced with bigger text */
}

/* Fix any stray margins that can create 1–2px misalignment */
.accordion .accordion-header {
  margin: 0;
  padding: 0;           /* ensures no extra space above */
}

.accordion.accordion-flush .accordion-item {
  border-radius: 0; /* flush style expects squared corners */
}

.accordion .accordion-body {
  padding: 1rem 1.25rem;  /* more breathing room */
  border-top: 1px solid var(--bs-border-color, #dee2e6); /* keeps separation clean */
}

  /* Make columns obey widths */
   #uploadTable { 
       table-layout: fixed;
       width: 100%; 
       max-width: 100%;
   }
  #uploadTable td, #uploadTable th { white-space: normal; word-break: break-word; } 
  
  /* Column-specific widths (adjust as needed) */
  /* Use DT col classes via columnDefs below */
/* UNSPLIT mode (Title + File Type combined) */
/*.col-titleGroup { width: 15%; }  *//* 15 + 12 combined */
.col-title { width: 10%; }
.col-filetype { width: 10%; }
.col-filename   { width: 40%; }
.col-size       { width: 10%; }
.col-date       { width: 16%; }
.col-actions    { width: 14%; }   /* add this so total = 100% */

  /* Remove any phantom gap BlueImp might leave above the table */
/*  .files:empty { margin: 0 !important; padding: 0 !important; } */
  /* If your BlueImp progress bar sits above, hide when idle */
/*  .fileupload-progress:empty, .fileupload-progress:has(.progress[aria-valuenow="0"]) { display: none; } */

/* Container (optional but nice if the table sits in a flex/grid area) */
#uploadTableWrap { width: 100%; overflow: auto; }

/* Table shouldn’t shrink below your designed width */
#uploadTable { 
  width: 100%;
  min-width: 1140px;      /* your target layout width */
  table-layout: fixed;    /* makes your % column widths behave */
}

/* Make the empty state not look “squashed” */
/*#uploadTable tbody { min-height: 220px; display: block; }
#uploadTable thead, 
#uploadTable tbody tr { display: table; width: 100%; table-layout: fixed; } */

/* Your column widths (header + body) */
#uploadTable thead th:nth-child(1),
#uploadTable tbody td:nth-child(1) { width: 10%; }
#uploadTable thead th:nth-child(2),
#uploadTable tbody td:nth-child(2) { width: 10%; }
#uploadTable thead th:nth-child(3),
#uploadTable tbody td:nth-child(3) { width: 40%; }
#uploadTable thead th:nth-child(4),
#uploadTable tbody td:nth-child(4) { width: 10%; }
#uploadTable thead th:nth-child(5),
#uploadTable tbody td:nth-child(5) { width: 16%; }
#uploadTable thead th:nth-child(6),
#uploadTable tbody td:nth-child(6) { width: 14%; }
