/* Document List — component-scoped, does not touch legacy .news-block-* selectors */
.doc-list-page {
  max-width: 860px;
  margin: 0 auto;
}

.doc-search {
  margin-bottom: 24px;
}

.doc-search__group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-search__input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.4;
}

.doc-search__input:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
  border-color: #0d6efd;
}

.doc-search__button {
  padding: 10px 18px;
  border: 1px solid #0d6efd;
  background: #0d6efd;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.doc-search__button:focus-visible {
  outline: 2px solid #0b5ed7;
  outline-offset: 2px;
}

.doc-search__clear {
  font-size: 14px;
  color: #6c757d;
  text-decoration: underline;
}

.doc-search__clear:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.doc-search-heading {
  font-size: 18px;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* List */
.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.doc-item__indicator {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.doc-item__content {
  flex: 1 1 auto;
  min-width: 0;
}

.doc-item__title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-item__link {
  color: #1a1a1a;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-item__link:hover {
  color: #0d6efd;
  text-decoration: underline;
}

.doc-item__link:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
  border-radius: 2px;
}

.doc-item__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6c757d;
  min-width: 0;
}

.doc-item__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.doc-item__action {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
}

.doc-item__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #0d6efd;
  color: #0d6efd;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.doc-item__download:hover {
  background: #0d6efd;
  color: #fff;
}

.doc-item__download:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Empty state */
.doc-empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
}

.doc-empty__icon {
  font-size: 32px;
  color: #adb5bd;
  margin-bottom: 12px;
}

.doc-empty__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-empty__message {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-empty__message a:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Pagination */
.doc-pagination {
  margin-top: 20px;
}

.doc-pagination .pagination {
  flex-wrap: wrap;
  gap: 4px;
}

/* Narrow viewport reflow */
@media (max-width: 576px) {
  .doc-item {
    flex-wrap: wrap;
  }

  .doc-item__action {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .doc-item__download {
    width: 100%;
    justify-content: center;
  }
}

/* Utility for a11y */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
