/* Star Document Links */
.star-documents-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 0;
}
h2 > .star-documents-container {
  margin-top: 2rem;
}

.star-document-item {
  border: 1px solid color-mix(in lab, var(--global-palette7, #edf2f7) 90%, #000);
  border-radius: 10px;
  background: var(--global-palette9, #fff);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--global-palette1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.star-document-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0px;
  height: 100%;
  background: var(--global-palette8);
  transition: width ease-in-out 0.3s;
  z-index: -1;
  opacity: 1;
}
.star-document-item:hover::before {
  width: 100%;
}
.star-document-item:hover,
.star-document-item:hover a {
  color: color-mix(in lab, var(--global-palette1) 60%, #000); /* Replace with your brand color */
}

.star-doc-link-wrapper {
  display: flex;
  align-items: center;
  padding: 15px;
  text-decoration: none;
  color: inherit;
  gap: 15px;
}

/* Icon Styling */
.star-doc-icon {
  flex: 0 0 40px; /* Fixed width for icon area */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-doc-icon svg,
.star-doc-icon img {
  width: 100%;
  height: auto;
  max-height: 40px;
  fill: var(--global-palette1); /* Default icon color if SVG */
}

/* Change icon color on hover */
.star-document-item:hover .star-doc-icon svg {
  fill: color-mix(in lab, var(--global-palette1) 60%, #000); /* Replace with your brand color */
}

/* Content Styling */
.star-doc-content {
  flex: 1; /* Takes up remaining space */
}

.star-doc-title {
  margin: 0 0 5px 0 !important;
  font-size: 1rem;
  font-weight: 700;
}
.star-doc-content p.star-doc-caption,
.star-doc-content p.star-doc-description,
.star-doc-content p.star-doc-filename {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.star-doc-content p.star-doc-caption {
  font-style: italic;
}
.star-doc-content p.star-doc-filename {
  font-family: monospace;
}
.star-doc-meta {
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  font-weight: bold;
  background: var(--global-palette7);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

/* Arrow Styling */
.star-doc-arrow {
  font-weight: bold;
  color: var(--global-palette1);
  transition: transform 0.2s ease, color 0.2s ease;
}

.star-document-item:hover .star-doc-arrow {
  transform: translateX(5px);
}

/* --- Pagination Styling --- */
.star-documents-pagination {
  margin-top: 20px;
  text-align: center;
}

/* Target the list container generated by paginate_links() */
.star-documents-pagination .page-numbers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.star-documents-pagination .page-numbers li {
  display: inline-block;
}

.star-documents-pagination a.page-numbers,
.star-documents-pagination span.page-numbers {
  display: block;
  padding: 8px 14px;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: var(--global-palette1);
  transition: background-color 0.2s, border-color 0.2s;
}

.star-documents-pagination a.page-numbers:hover {
  background-color: #f0f0f0;
  border-color: #aaa;
}

/* Current page style */
.star-documents-pagination span.current {
  background-color: color-mix(in lab, var(--global-palette1) 20%, #fff);
  border-color: color-mix(in lab, var(--global-palette1) 20%, #fff);
  color: var(--global-palette1);
  font-weight: bold;
}
