/* =====================================================
   PAGE TÀI LIỆU — page-document.css
   ===================================================== */

/* =====================================================
   SECTION WRAPPER
   ===================================================== */
.doc-section {
  background: #fff;
  padding: 48px 0 64px;
}

.doc-section__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.doc-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.doc-search-bar__input-wrap {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.doc-search-bar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.doc-search-bar__input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-sizing: border-box;
}

.doc-search-bar__input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 122, 60, 0.12);
}

.doc-search-bar__input::placeholder {
  color: #9ca3af;
}

.doc-search-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.doc-search-bar__btn:hover {
  background: #155f30;
  transform: translateY(-1px);
}

.doc-search-bar__btn:active {
  transform: translateY(0);
}

/* =====================================================
   STATS ROW
   ===================================================== */
.doc-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f3f9f5;
  border: 1px solid #c3e6cc;
  border-radius: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-stats__found {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  color: #374151;
}

.doc-stats__found strong {
  color: var(--primary-color);
  font-weight: 700;
}

.doc-stats__total {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  color: #374151;
}

.doc-stats__total strong {
  color: var(--primary-color);
  font-weight: 700;
}

/* =====================================================
   TABLE
   ===================================================== */
.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
}

/* Table Head */
.doc-table thead tr {
  background: var(--primary-color);
}

.doc-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.doc-table thead th:last-child {
  border-right: none;
}

.doc-table thead th.doc-table__col-stt {
  text-align: center;
  width: 56px;
}

.doc-table thead th.doc-table__col-download {
  text-align: center;
  width: 80px;
}

.doc-table thead th.doc-table__col-views {
  text-align: center;
  width: 90px;
}

/* Table Body */
.doc-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s ease;
}

.doc-table tbody tr:last-child {
  border-bottom: none;
}

.doc-table tbody tr:hover {
  background: #edf9ff;
}

.doc-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.doc-table tbody tr:nth-child(even):hover {
  background: #edf9ff;
}

.doc-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
  color: #1f2937;
  border-right: 1px solid #e5e7eb;
}

.doc-table tbody td:last-child {
  border-right: none;
}

/* STT Column */
.doc-table__td-stt {
  text-align: center;
  font-weight: 600;
  color: #374151;
  width: 56px;
}

/* Topic Column */
.doc-table__td-topic {
  line-height: 1.55;
  color: #1f2937;
}

/* Presenter Column */
.doc-table__td-presenter {
  min-width: 180px;
}

.doc-table__presenter-name {
  display: block;
  font-weight: 600;
  color: #013467;
  font-size: 16px;
  white-space: nowrap;
}

.doc-table__presenter-org {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  font-style: italic;
}

/* Views Column */
.doc-table__td-views {
  text-align: center;
  font-weight: 600;
  color: #374151;
  width: 90px;
}

/* Download Column */
.doc-table__td-download {
  text-align: center;
  width: 80px;
}

.doc-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #eff8ff;
  border-radius: 6px;
  color: var(--primary-color);
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    color 0.2s ease;
  border: 1px solid #53798a;
}

.doc-download-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-1px);
  border-color: var(--primary-color);
  text-decoration: none;
}

.doc-download-btn:active {
  transform: translateY(0);
}

.doc-download-btn--disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.doc-download-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.doc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.doc-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  user-select: none;
}

.doc-page-btn:hover {
  background: #f3f9f5;
  border-color: var(--primary-color);
  color: var(--primary-color);
  text-decoration: none;
}

.doc-page-btn--active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  font-weight: 700;
  cursor: default;
}

.doc-page-btn--active:hover {
  background: var(--primary-color);
  color: #fff;
}

.doc-page-btn--dots {
  border: none;
  background: transparent;
  cursor: default;
  color: #6b7280;
  pointer-events: none;
}

.doc-page-btn--dots:hover {
  background: transparent;
  border: none;
  color: #6b7280;
}

.doc-page-btn--arrow {
  color: #6b7280;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.doc-empty {
  text-align: center;
  padding: 48px 0;
  color: #6b7280;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .doc-section {
    padding: 32px 0 48px;
  }

  .doc-section__container {
    padding: 0 16px;
  }

  .doc-table thead th,
  .doc-table tbody td {
    padding: 11px 12px;
    font-size: 13px;
  }

  .doc-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  .doc-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .doc-search-bar__input-wrap {
    max-width: 100%;
  }

  .doc-search-bar__btn {
    justify-content: center;
  }

  .doc-table thead th.doc-table__col-views,
  .doc-table tbody .doc-table__td-views {
    display: none;
  }

  .doc-table__presenter-name {
    white-space: normal;
  }

  .doc-pagination {
    gap: 4px;
  }

  .doc-page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }
}
