section.doclibrary-hero{
  position: relative;
  padding: 24px 0 18px;
  padding-top: 18px;
  min-height: auto;
  height: auto;
  overflow: visible;
}

.doclibrary-hero{
  margin-top: 90px;
}

/* .doclibrary-hero__inner{
  position: relative;
  z-index: 1;
  overflow: hidden;

  max-width: 1400px;
  margin: 18px auto;
  padding: 18px;

  background: rgba(255,255,255,0);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;

  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);

  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
} */

.doclibrary-hero__header{
  margin-bottom: 16px;
  margin-top: 0;
  padding-top: 0;
}

.doclibrary-hero__header h1,
.doclibrary-hero__header .description,
.doclibrary-hero__header .breadcrumb{
  color: #fff;
}

.doclibrary-hero__grid{
  display: grid;
  grid-template-columns: 600px 1fr;
  grid-template-areas:
    "panel ."
    "folders folders";
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin-left: 0;
}

.doclibrary-hero__panel{ grid-area: panel; }

.doclibrary-hero__folders{
  grid-area: folders;
  max-width: 1400px;
  margin: 0 auto; 
  padding: 0 12px;
}

.doclibrary-hero__panel .title{
    color: #fff;
}

/* .doclibrary-surface{
  position: relative;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: clamp(16px, 2.5vw, 24px);

  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);

  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
} */

.doclibrary-surface--panel label{
  color: rgba(255, 255, 255, 0.863);
}

.doclibrary-surface--panel .selectize-control.multi{
  padding-top: 10px;
}

.doclibrary-surface--panel .selectize-input{
  /* background-color: rgb(255, 255, 255);
  border-color: rgba(255, 255, 255, 0.25); */

  width: 41.7% !important;
  backdrop-filter: blur(1px) saturate(120%);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  background-color: rgba(139, 160, 222, 0.538);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0);

  padding: 10px;
  box-shadow:
    0 8px 32px rgba(0, 66, 159, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.098);
}

.doclibrary-surface--panel .selectize-control.single .selectize-input.focus,
.doclibrary-surface--panel .selectize-control.multi .selectize-input.focus{
  background-color: rgba(139, 160, 222, 0.538) !important;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 1px rgba(88,166,255,0.3);
}

.doclibrary-surface--panel .selectize-input input {
  color: #ffffff !important;
}

.selectize-input input::placeholder {
    color: #ffffff87 !important;
    opacity: 1 !important;
}

/* Styling for the documents search box. HTML found in interactive-search-panel.html */
.doclibrary-surface--panel .button-holding input[type="text"]{
  width: 40% !important;
  /* padding: 12px 14px;
  border-radius: 5px;
  background-color: rgb(255, 255, 255);
  border: 1px solid rgba(255, 255, 255, 0.125);
  color: #000000;
  box-sizing: border-box; */

  backdrop-filter: blur(1px) saturate(120%);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  background-color: rgba(139, 160, 222, 0.538);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0);

  padding: 20px;
  box-shadow:
    0 8px 32px rgba(0, 66, 159, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.098);
}

.doclibrary-surface--panel .button-holding input[type="text"]:focus{
  background-color: rgba(139, 160, 222, 0.538);
  border-color: rgba(255, 255, 255, 0.25);
  outline: none;
  box-shadow: 0 0 0 1px rgba(88,166,255,0.3);
}

/* Placeholder colour */
.doclibrary-surface--panel .button-holding input[type="text"]::placeholder{
  color: #ffffff87;
  opacity: 1;
}

.doclibrary-hero__folders ul.directories{
  grid-template-columns: 1fr;
  gap: 24px;
  height: 35%;
  padding-right: 5%;
}

.doclibrary-hero__folders{
  position: relative;
  max-width: none;
  width: 100%;
  z-index: 2;
  min-width: 0;
  padding-left: 0;
  margin: 0;
}

/* Right panel: folder viewport */
.doclibrary-hero__folders-controls{
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 900px;
}

.doclibrary-hero__folders-controls label{
  color: white;
}

@media (max-width: 980px){
  .doclibrary-hero__grid{
    grid-template-columns: 1fr;
  }
  .doclibrary-hero__folders-viewport{
    max-height: 360px;
  }
}

.doclibrary-hero__folders ul.directories {
  padding-top: 0px;
  padding-bottom: 40px;
}

.doclibrary-hero__folders ul.directories > li {
  scroll-snap-align: center;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  will-change: transform, opacity;
}

.doclibrary-hero__folders-viewport{
  max-height: 60vh;
  max-width: none;
  overflow-y: scroll;
  overscroll-behavior-y: auto;

  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);

  padding: 12px 0;
}

.doclibrary-hero__folders-viewport ul.directories{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doclibrary-hero__folders-viewport {
  position: relative;
  height: auto;

  transform: none;
  perspective: 1200px;
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

.doclibrary-hero__folders-viewport ul.directories > li:first-child{
  margin-top: 0;
}

.doclibrary-hero__folders-viewport .directory.folder-item{
  background: rgba(255,255,255,0.14);
  background-color: rgba(174, 174, 174, 0.569);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;

  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

.doclibrary-hero__folders-viewport .directory.folder-item a:hover{
  cursor: pointer;
}

.doclibrary-hero__folders-viewport .directory.folder-item:hover{
  transform: translateY(-4px);
  box-shadow:
    0 18px 40px rgb(51, 105, 191),
    0 0 18px rgba(88, 166, 255, 0.35);
}

.doclibrary-hero__folders-viewport .name{
  color: rgba(255, 255, 255, 0.837);
}

.arrow-prompt-directory {
  position: absolute; 
  bottom: 20px;            
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;            
  pointer-events: none;    
}

.arrow-prompt-directory .arrow {
  width: 50px;
  height: auto;
  opacity: 0.8;
  animation: bounce 2s infinite;
}

/* bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.doc-section__inner{
  max-width: 1400px;
  margin: 15px auto;
  padding: 18px;

  background: rgba(255,255,255,0);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;

  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);

  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  /* max-width: 1400px;
  margin: 0 auto;
  padding: 18px;

  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none; */
}

/* Recent uploads section: force readable text even without a panel */
.doc-section .doc-section__inner h2,
.doc-section .doc-section__inner h3,
.doc-section .doc-section__inner p,
.doc-section .doc-section__inner a,
.doc-section .doc-section__inner .doc-card__content{
  color: rgba(255,255,255,0.92) !important;
}

.doc-section .doc-section__inner p{
  color: #fff;
  font-style: italic;
}

ul.doc-cards{
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.doc-card-item {
  flex: 1;
  display: flex;
}

.doc-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  flex: 1;
  display: flex;
  z-index: 2;
  backdrop-filter: blur(1px) saturate(120%);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  background-color: rgba(139, 160, 222, 0.538);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0);

  padding: 15px;
  box-shadow:
    0 8px 32px rgba(0, 66, 159, 0),
    inset 0 1px 0 rgba(255, 255, 255, 0.098);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.icons-column {
  float: left;
  width: 10%;
  text-align: center;
  padding-right: 5px;
}

.doc-card::before{
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg,
    transparent,
    transparent 25%,
    rgba(88, 166, 255, 0.35)
  );
  transform: rotate(-45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.4s ease;
}

.doc-card:hover{
  transform: translateY(-4px);
  box-shadow:
    0 18px 40px rgb(51, 105, 191),
    0 0 18px rgba(88, 166, 255, 0.35);
}

.doc-card:hover::before{
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

.doc-card-link {
  display: flex;
  flex: 1; 
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.doc-card__icon{
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
}

.doc-card__icon i{
  font-size: 18px;
}

.favourite-icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 1.0rem;
  color: inherit;
}

.doc-card__title{
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-card__meta{
  display: block;
  font-size: 0.85em;
  opacity: 0.8;
  margin-bottom: 4px;
}

.doc-card__description{
  font-size: 0.9em;
  line-height: 1.3;
}

.doc-actions__container{
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px;

  background: rgba(255,255,255,0);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;

  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);

  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}

.doc-actions__container summary{
  color: #fff !important;
}

.doclibrary-dropdowns h2{
    margin-left: 30px;
    color: #fff;
}

/* Dropdown boxes */
.doclibrary-dropdowns details{
  border-radius: 12px;
  border: 1px solid var(--doc-dropdown-border);
  backdrop-filter: blur(1px) saturate(120%);
  -webkit-backdrop-filter: blur(1px) saturate(120%);
  background-color: rgba(139, 160, 222, 0.538);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.098);
  overflow: hidden;
  margin-bottom: 12px;
  max-width: 800px;
  margin-left: 30px;
}

.doclibrary-dropdowns summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-weight: 600;
  color: var(--doc-dropdown-text);
  user-select: none;
}

.doclibrary-dropdowns summary::-webkit-details-marker{
  display: none;
}

.doclibrary-dropdowns summary::after{
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #d6d5e2;
  position: relative;
  transition: transform 200ms ease, background 200ms ease;
  flex-shrink: 0;
}

/* Chevron arrow inside button */
.doclibrary-dropdowns summary::before {
  content: '';
  position: absolute;
  right: 26px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #000000;
  width: 0;
  height: 0;
  transition: transform 200ms ease;
  z-index: 1;
}

/* Hover state */
.doclibrary-dropdowns summary:hover::after {
  background: #a3a3a3;
}

/* Active state */
.doclibrary-dropdowns summary:active::after {
  background: #a3a3a3;
}

/* Open state - rotate button and chevron */
.doclibrary-dropdowns details[open] summary::after{
  transform: rotate(180deg);
  background: #a3a3a3;
}

.doclibrary-dropdowns details[open] summary::before {
  transform: rotate(180deg);
}

/* content spacing */
.doclibrary-dropdowns details > .directory-action{
  padding: 0 18px 18px;
}

.doclibrary-dropdowns .directory-action{
  background: transparent;
  border: 0;
  box-shadow: none;
}

.doclibrary-dropdowns input[type="text"],
.doclibrary-dropdowns input[type="date"],
.doclibrary-dropdowns input[type="file"],
.doclibrary-dropdowns textarea,
.doclibrary-dropdowns select{
  background-color: rgb(255, 255, 255);
  border: 1px solid rgba(255,255,255,0.25);
  color: #000000;
  border-radius: 5px;
}

.doclibrary-dropdowns input[type="text"]::placeholder{
  color: #888;
}

.doclibrary-dropdowns .selectize-input{
  background-color: rgb(255, 255, 255);
  border-color: rgba(255,255,255,0.25);
  color: #888;
}

.toggle:disabled{
  background-color: rgba(0,0,0,0.55);
}
.delete-action{
  padding-left: 35px;
}

.no-folders-message{
  color: white;
  font-style: italic;
}