/* 1.3.7: Kho Bản Nhạc layout. Scoped to .gk-slib on /dinh-dang/pdf/ only. */

.gk-slib {
  --slib-bg: #170f23;
  --slib-card: #231b2e;
  --slib-accent: #9b4de0;
  --slib-gold: #f1d899;
  --slib-text: #f4eef8;
  --slib-muted: rgba(255, 255, 255, 0.62);
  --slib-line: rgba(255, 255, 255, 0.1);
  color: var(--slib-text);
  padding-top: 4px;
}

.gk-slib .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gk-slib__head {
  text-align: center;
  margin: 0 0 18px;
  padding: 2px 8px 0;
}

.gk-slib__title {
  margin: 0;
  font-family: "Cormorant Acutis", "Cormorant Garamond", Merriweather, Georgia, "Times New Roman", serif;
  font-weight: 650;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slib-gold);
}

.gk-slib__sub {
  margin: 8px 0 0;
  font-family: Inter, Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--slib-muted);
}

.gk-slib__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 12px;
}

.gk-slib__drops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.gk-slib__dd {
  position: relative;
}

.gk-slib__btn,
.gk-slib__rail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  background: var(--slib-card);
  border: 1px solid var(--slib-line);
  color: var(--slib-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.gk-slib__btn::-webkit-details-marker,
.gk-slib__rail-btn::-webkit-details-marker,
.gk-slib__dd > summary::-webkit-details-marker,
.gk-slib__rail-fold > summary::-webkit-details-marker {
  display: none;
}

.gk-slib__btn::marker,
.gk-slib__rail-btn::marker {
  content: "";
  font-size: 0;
}

.gk-slib__btn i,
.gk-slib__rail-btn i {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}

.gk-slib__dd.is-set > .gk-slib__btn,
.gk-slib__dd[open] > .gk-slib__btn {
  border-color: var(--slib-accent);
  color: #fff;
}

.gk-slib__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  background: #2a2234;
  border: 1px solid var(--slib-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.gk-slib__opt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #eadff3;
  font-size: 13px;
  text-decoration: none;
}

.gk-slib__opt em {
  color: var(--slib-muted);
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gk-slib__opt:hover,
.gk-slib__opt.is-on {
  background: rgba(155, 77, 224, 0.22);
  color: #fff;
}

.gk-slib__sort {
  flex: 0 0 auto;
  margin-left: auto;
}

.gk-slib__sort .gk-sort {
  margin: 0;
}

.gk-slib__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.gk-slib__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 12px;
  border-radius: 99px;
  background: rgba(155, 77, 224, 0.22);
  border: 1px solid rgba(155, 77, 224, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.gk-slib__tag b {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  font-weight: 700;
  line-height: 1;
}

.gk-slib__tag--all {
  background: transparent;
  border-color: var(--slib-line);
  color: var(--slib-muted);
  padding-right: 12px;
}

.gk-slib__layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 22px;
  align-items: start;
}

.gk-slib__main {
  min-width: 0;
}

.gk-slib .gk-sheets {
  gap: 10px;
  margin-top: 0;
}

.gk-slib .gk-sheet {
  padding: 10px 12px;
  gap: 12px;
  background: var(--slib-card);
}

.gk-slib__rail {
  position: sticky;
  top: 86px;
  bottom: var(--gk-bar-h, 0px);
}

.gk-slib__rail-h {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slib-muted);
}

.gk-slib__rail-btn {
  display: none;
}

.gk-slib__q input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  margin: 0 0 10px;
  padding: 0 12px;
  border: 1px solid var(--slib-line);
  border-radius: 10px;
  background: #1b1424;
  color: #fff;
  font: inherit;
  font-size: 13px;
}

.gk-slib__q input:focus {
  outline: 2px solid var(--slib-accent);
  outline-offset: 1px;
}

.gk-slib__composers {
  max-height: calc(100vh - 260px - var(--gk-bar-h, 0px));
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #4a4153 transparent;
}

.gk-slib__c {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #eadff3;
  font-size: 13px;
  text-decoration: none;
}

.gk-slib__c em {
  font-style: normal;
  color: var(--slib-muted);
  font-variant-numeric: tabular-nums;
}

.gk-slib__c:hover,
.gk-slib__c.is-on {
  background: rgba(155, 77, 224, 0.2);
  color: #fff;
}

.gk-slib__c.is-hidden {
  display: none;
}

.gk-slib__empty,
.gk-slib__none {
  margin: 8px 0;
  color: var(--slib-muted);
  font-size: 13px;
}

.gk-slib__pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}

.gk-slib__pager a {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--slib-line);
  background: var(--slib-card);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.gk-slib__pager a.is-on {
  background: var(--slib-accent);
  border-color: transparent;
}

.gk-slib__gap {
  padding: 0 4px;
  color: var(--slib-muted);
}

@media (max-width: 1024px) {
  .gk-slib__layout {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 0.9fr);
  }
}

@media (max-width: 900px) {
  .gk-slib__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .gk-slib__drops {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .gk-slib__sort {
    margin-left: 0;
  }

  .gk-slib__layout {
    grid-template-columns: 1fr;
  }

  .gk-slib__rail {
    position: relative;
    top: auto;
    order: -1;
  }

  .gk-slib__rail-btn {
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .gk-slib__rail-h {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .gk-slib__rail-body {
    display: none;
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--slib-card);
    border: 1px solid var(--slib-line);
  }

  .gk-slib__rail.is-open .gk-slib__rail-body {
    display: block;
  }

  .gk-slib__rail.is-open .gk-slib__rail-btn {
    border-color: var(--slib-accent);
  }

  .gk-slib__composers {
    max-height: 240px;
  }
}

@media (min-width: 901px) {
  .gk-slib__rail-btn {
    display: none !important;
  }

  .gk-slib__rail-body {
    display: block;
  }
}
