/* ── sub-archive.css ── */

/* ── 툴바 ── */
.ar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ar-count {
  font-size: 0.92rem;
  color: #556677;
  flex-shrink: 0;
}

.ar-count strong {
  color: var(--color-primary, #3A7BD5);
  font-weight: 700;
}

/* ── 검색 폼 ── */
.ar-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1.5px solid #d0daf0;
  border-radius: 50px;
  padding: 0 6px 0 0;
  box-shadow: 0 2px 10px rgba(58, 123, 213, 0.08);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ar-search:focus-within {
  border-color: var(--color-primary, #3A7BD5);
  box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.13);
}

.ar-search-select {
  border: none;
  background: transparent;
  padding: 10px 4px 10px 16px;
  font-size: 0.88rem;
  color: #445;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.ar-search-divider {
  display: block;
  width: 1px;
  height: 18px;
  background: #dde;
  flex-shrink: 0;
  margin: 0 2px;
}

.ar-search-input {
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #1a2a4a;
  min-width: 160px;
  outline: none;
}

.ar-search-input::placeholder {
  color: #6b7280;
}

.ar-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-primary, #3A7BD5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.ar-search-btn:hover,
.ar-search-btn:focus-visible {
  background: #2a6bbf;
  outline: 2px solid #2a6bbf;
  outline-offset: 2px;
}

/* ── 게시판 테이블 ── */
.ar-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(15, 30, 80, 0.07);
  margin-bottom: 24px;
}

.ar-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.92rem;
}

.ar-table thead tr {
  background: #f5f8ff;
  border-bottom: 2px solid #d0daf0;
}

.ar-table thead th {
  padding: 14px 16px;
  font-weight: 600;
  color: #2c3e6b;
  text-align: center;
  white-space: nowrap;
  font-size: 0.88rem;
}

.ar-table thead th.ar-th-title {
  text-align: left;
}

.ar-table tbody tr {
  border-bottom: 1px solid #eef2f8;
  transition: background 0.15s;
}

.ar-table tbody tr:hover {
  background: #f7faff;
}

.ar-table tbody tr.ar-row-notice {
  background: #fffcf0;
}

.ar-table tbody tr.ar-row-notice:hover {
  background: #fff8e0;
}

.ar-table tbody td {
  padding: 13px 16px;
  text-align: center;
  color: #445566;
  font-size: 0.9rem;
}

.ar-table tbody td.ar-td-title {
  text-align: left;
}

/* ── 제목 링크 ── */
.ar-title-link {
  color: #1a2a4a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
  line-height: 1.55;
}

.ar-title-link:hover {
  color: var(--color-primary, #3A7BD5);
  text-decoration: underline;
}

/* ── 공지 배지 ── */
.ar-badge-notice {
  display: inline-flex;
  align-items: center;
  background: #f59e0b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── 파일 아이콘 ── */
.ar-file-icon {
  color: var(--color-primary, #3A7BD5);
  font-size: 16px;
}

.ar-no-file {
  color: #ccd;
  font-size: 14px;
}

/* ── 작성자 ── */
.ar-author-cell {
  font-size: 0.84rem;
  color: #778899;
}

/* ── 페이지네이션 ── */
.ar-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
}

.ar-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid #d0daf0;
  background: #fff;
  border-radius: 9px;
  font-size: 0.9rem;
  color: #445;
  cursor: pointer;
  transition: all 0.15s;
}

.ar-page-btn:hover {
  border-color: var(--color-primary, #3A7BD5);
  color: var(--color-primary, #3A7BD5);
  background: #eff6ff;
}

.ar-page-btn.is-active {
  background: var(--color-primary, #3A7BD5);
  border-color: var(--color-primary, #3A7BD5);
  color: #fff;
  font-weight: 700;
}

/* ── 반응형 ── */
@media (max-width: 640px) {
  .ar-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ar-search {
    width: 100%;
  }

  .ar-search-input {
    min-width: 80px;
    flex: 1;
  }

  /* 모바일에서 번호·작성자·작성일·조회수 숨김 */
  .ar-col-num,
  .ar-col-author,
  .ar-col-date,
  .ar-col-views {
    display: none;
  }
}
