/* directory.css — Styles for the inline directory panel on index.html */

/* ── Section ── */
.section {
  margin-bottom: 1.5rem;
  border: 1px solid #4a4744;
  border-radius: 8px;
  padding: 0.75rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-heavy);
}


/* ── Alphabetical Grid ── */
.link-grid-alpha {
  column-count: 5;
  column-gap: 1rem;
}

/* ── Letter Groups ── */
.dir-letter-group {
  break-inside: avoid;
  margin-bottom: 0.4rem;
}

.dir-letter-header {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: #e8736e;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-bottom: 1px solid rgba(232, 115, 110, 0.3);
  margin-bottom: 0.1rem;
}

.link-item {
  display: block;
  width: fit-content;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  color: #cdc8c2;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.link-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.link-item.selected {
  color: #fff;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
}


/* Action bar above directory grid */
.dir-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 1rem;
  padding-right: 2rem;
  padding-left: 2rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.dir-action-btns {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.dir-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  position: absolute;
  right: 0;
  line-height: 1;
  transition: color 0.2s;
}

.dir-close-btn:hover {
  color: var(--text);
}


.dir-action-btns button {
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cdc8c2;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dir-action-btns button:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}


#dirApplyBtn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

#dirApplyBtn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

#dirApplyBtn.has-selection {
  background: #c12a39;
  color: #fff;
  border-color: #c12a39;
}

#dirApplyBtn.has-selection:hover {
  background: #a82433;
  border-color: #a82433;
}

#dirClearBtn {
  border-style: dashed;
}


.dir-action-btns button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.link-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}


/* ── Responsive ── */
@media (max-width: 1200px) {
  .link-grid-alpha {
    column-count: 4;
  }
}

@media (max-width: 900px) {
  .link-grid-alpha {
    column-count: 2;
  }
}

@media (max-width: 400px) {
  .link-grid-alpha {
    column-count: 1;
  }
}

/* 1080p desktops — reduce text */
@media (max-height: 1100px) and (min-width: 1200px) {
  .link-item {
    font-size: 0.85rem;
  }
}
