/* Luage Compendium — Library (premium)
   Purpose: a refined, editorial catalog with enterprise UI polish.
*/

:root{
  --lib-surface: rgba(255,255,255,.92);
  --lib-surface-2: rgba(255,255,255,.85);
  --lib-shadow: 0 .6rem 1.8rem rgba(15,23,42,.06);
  --lib-shadow-hover: 0 1rem 2.2rem rgba(15,23,42,.10);
}

/* Toolbar */
.library-toolbar{
  position: sticky;
  top: 5.35rem; /* below fixed navbar */
  z-index: 60;
  padding: .35rem 0 .25rem;
}

.library-toolbar .search-wrap{
  border: 1px solid var(--luage-border);
  border-radius: 1rem;
  background: var(--lib-surface-2);
  padding: .85rem 1rem;
  box-shadow: var(--lib-shadow);
  backdrop-filter: blur(10px);
}

/* Compact switches in toolbar (editorial view, recommended-only, etc.) */
.library-toolbar .lib-switch{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}

.library-toolbar .lib-switch .form-check-input{
  margin-top: 0;
  cursor: pointer;
}

.library-toolbar .lib-switch .form-check-label{
  margin-bottom: 0;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(91,100,117,.92);
  cursor: pointer;
  user-select: none;
}

.library-toolbar .lib-switch .form-check-label:hover{
  color: rgba(27,36,51,.86);
}

.search-wrap input{
  border: none;
  outline: none;
  width: 100%;
  min-width: 220px;
  background: transparent;
  font-weight: 600;
  color: rgba(27,36,51,.92);
}

.search-wrap input::placeholder{
  color: rgba(91,100,117,.75);
  font-weight: 500;
}

.type-select,
.family-select,
.maturity-select{
  width: 240px;
  border-radius: .85rem;
  border: 1px solid var(--luage-border);
  background: rgba(255,255,255,.95);
  font-weight: 600;
}

@media (max-width: 991px){
  .type-select,
  .family-select,
  .maturity-select{ width: 100%; }
  .search-wrap input{ min-width: 160px; }
  .library-toolbar{ top: 4.95rem; }
}

/* Chips / pills */
.type-pill,
.family-pill,
.status-pill,
.time-pill{
  border: 1px solid var(--luage-border);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .78rem;
  font-weight: 800;
  color: rgba(27,36,51,.78);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.status-pill{
  border-color: rgba(91,100,117,.32);
  background: rgba(91,100,117,.08);
  color: rgba(27,36,51,.82);
}

.status-pill i,
.time-pill i{
  opacity: .78;
}

.time-pill{
  border-color: rgba(70,220,212,.28);
  background: rgba(70,220,212,.08);
  color: rgba(27,36,51,.82);
}

.maturity-pill{
  border-color: rgba(27,36,51,.22);
  background: rgba(27,36,51,.04);
  color: rgba(27,36,51,.82);
}

.maturity-pill--draft{
  border-color: rgba(245,158,11,.28);
  background: rgba(245,158,11,.08);
}

.maturity-pill--recommended{
  border-color: rgba(70,220,212,.28);
  background: rgba(70,220,212,.08);
}

.maturity-pill--mandatory{
  border-color: rgba(153,94,255,.25);
  background: rgba(153,94,255,.08);
}

/* Start here — grid links */
.collection-links--grid{
  margin-top: .95rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}

@media (min-width: 768px){
  .collection-links--grid{
    grid-template-columns: 1fr 1fr;
  }
}

.collection-links--grid a{
  border: 1px solid var(--luage-border);
  border-radius: .9rem;
  padding: .55rem .7rem;
  background: rgba(255,255,255,.72);
  box-shadow: 0 .5rem 1.2rem rgba(15,23,42,.05);
  text-decoration: none;
}

.collection-links--grid a:hover{
  border-color: rgba(70,220,212,.35);
}

.collection-links--grid .link-title{
  display: block;
  font-weight: 800;
  font-size: .93rem;
  color: rgba(27,36,51,.90);
}

.collection-links--grid .link-meta{
  display: block;
  margin-top: .15rem;
  font-size: .78rem;
  font-weight: 650;
  color: rgba(91,100,117,.90);
}

/* Start here — expand/collapse button (keeps the card compact) */
.collection-links--grid .start-here-toggle{
  grid-column: 1 / -1;
  border: 1px dashed rgba(70,220,212,.45);
  border-radius: .9rem;
  padding: .55rem .7rem;
  background: rgba(255,255,255,.55);
  box-shadow: 0 .5rem 1.2rem rgba(15,23,42,.04);
  font-weight: 850;
  font-size: .88rem;
  color: rgba(27,36,51,.82);
  text-align: center;
}

.collection-links--grid .start-here-toggle:hover{
  border-color: rgba(70,220,212,.65);
  background: rgba(255,255,255,.78);
}

.collection-links--grid .start-here-toggle:active{
  transform: translateY(1px);
}

.collection-links--grid .start-here-toggle:focus-visible{
  outline: 3px solid rgba(70,220,212,.35);
  outline-offset: 3px;
}


/* Slight emphasis for primary collection */
.collection-card--primary::before{
  height: 4px;
  opacity: .98;
}

.result-pill{
  border: 1px solid var(--luage-border);
  background: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: .28rem .65rem;
  font-size: .82rem;
  font-weight: 800;
  color: rgba(27,36,51,.78);
  white-space: nowrap;
}

.editorial-count-pill{
  border: 1px solid var(--luage-border);
  background: rgba(255,255,255,.65);
  border-radius: 999px;
  padding: .26rem .6rem;
  font-size: .78rem;
  font-weight: 800;
  color: rgba(27,36,51,.76);
  white-space: nowrap;
}

/* Cards */
.comp-card .card-soft{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.comp-card .card-soft:hover{
  transform: translateY(-2px);
  box-shadow: var(--lib-shadow-hover);
  border-color: rgba(70,220,212,.35);
}

.card-soft .meta{
  color: rgba(91,100,117,.9);
  font-size: .92rem;
}

/* Group headings */
.comp-group-head{
  margin-top: .45rem;
  padding-top: .95rem;
  border-top: 1px dashed rgba(230,232,239,.92);
}

.comp-group-head .kicker{
  margin-top: .25rem;
}

/* Collections */
.collection-card{
  border: 1px solid var(--luage-border);
  border-radius: 1rem;
  background: var(--lib-surface);
  box-shadow: var(--lib-shadow);
  padding: 1.05rem 1.1rem;
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  height: 100%;
}


.collection-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 100%;
  background: var(--luage-grad);
  opacity: .88;
}

.collection-top{
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.collection-icon{
  width: 42px;
  height: 42px;
  border-radius: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--luage-border);
  background: rgba(241,245,249,.85);
  color: rgba(27,36,51,.82);
  flex: 0 0 auto;
}

.collection-links{
  margin-top: .95rem;
  display: flex;
  flex-direction: column;
  gap: .38rem;
}

.collection-links a{
  color: rgba(27,36,51,.86);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
}

.collection-links a:hover{
  text-decoration: underline;
}

#noResults .card-soft{
  border-style: dashed;
  background: rgba(255,255,255,.8);
}


/* Start here toggle (inline, compact) */
.start-here-toggle-inline{
  border-color: rgba(70,220,212,.35) !important;
  background: rgba(255,255,255,.72) !important;
  box-shadow: 0 .45rem 1rem rgba(15,23,42,.04);
  font-weight: 850;
  color: rgba(27,36,51,.82) !important;
}

.start-here-toggle-inline:hover{
  border-color: rgba(70,220,212,.55) !important;
  background: rgba(255,255,255,.9) !important;
}



/* Start here: slightly tighter tiles to keep the row compact */
#startHereLinks a{
  padding: .48rem .6rem;
}

#startHereLinks .link-title{
  font-size: .88rem;
}

#startHereLinks .link-meta{
  font-size: .74rem;
}


#startHereLinks{
  margin-top: .75rem;
}


/* Start here — full path panel */
.start-here-offcanvas{
  width: min(560px, 94vw);
  border-left: 1px solid var(--luage-border);
  background: rgba(248,250,252,.96);
  backdrop-filter: blur(12px);
}

.start-here-offcanvas .offcanvas-header{
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid rgba(230,232,239,.92);
  background: linear-gradient(120deg, rgba(153,94,255,.08), rgba(70,220,212,.06));
}

.start-here-offcanvas .offcanvas-body{
  padding: 1.05rem 1.2rem 1.2rem;
}

.start-here-steps{
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: luageStep;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.start-here-step{
  counter-increment: luageStep;
  position: relative;
  padding: .75rem .85rem .75rem 3.15rem;
  border: 1px solid var(--luage-border);
  border-radius: 1rem;
  background: rgba(255,255,255,.85);
  box-shadow: 0 .5rem 1.1rem rgba(15,23,42,.05);
}

.start-here-step::before{
  content: counter(luageStep);
  position: absolute;
  left: .75rem;
  top: .75rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
  color: rgba(27,36,51,.78);
  border: 1px solid var(--luage-border);
  background: rgba(241,245,249,.92);
}

.start-here-step-link{
  text-decoration: none;
  color: rgba(27,36,51,.92);
  display: block;
}

.start-here-step-link:hover .step-title{
  text-decoration: underline;
}

.step-title{
  font-weight: 900;
  font-size: .98rem;
  letter-spacing: -.01em;
}

.step-meta{
  margin-top: .2rem;
  font-size: .82rem;
  color: rgba(91,100,117,.92);
}

.step-sub{
  margin-top: .35rem;
  font-size: .82rem;
  color: rgba(91,100,117,.82);
}

.start-here-step.is-planned{
  opacity: .72;
}

.start-here-step-link.is-disabled{
  pointer-events: none;
  cursor: default;
}


/* Quick collections: clamp link lists in the “Szybkie wejścia” tiles (keeps the row compact) */
.collection-links--clamped a:nth-child(n+5){
  display: none;
}

.quick-open{
  white-space: nowrap;
}

/* Offcanvas list for quick collections */
#quickLinksOffcanvas .start-here-list a{
  text-decoration: none;
}
#quickLinksOffcanvas .start-here-list a:hover{
  text-decoration: underline;
}


.collection-card > .d-flex{ margin-top: auto !important; }
