@import url('./common.css');

/**
 * Board List
 */
/* Board header */
.board-header {
  margin-bottom: 1.4rem;
}
.board-header:after {
  content: "";
  clear: both;
  display: block;
}
.board-header .search-wrap {
  width: 47.5rem;
  float: left;
}
.board-header .search-wrap:after {
  content: "";
  clear: both;
  display: block;
}
.board-header .search-wrap .search-option-select {
  width: 9.75rem;
  margin-right: 20px;
  float: left;
}
.board-header .search-wrap .input-wrap {
  width: calc(100% - 9.75rem - 20px);
  position: relative;
  float: left;
}
.board-header .search-wrap .input-wrap input {
  width: 100%;
  height: 50px;
  padding-left: 20px;
  padding-right: 50px;
  border: 1px solid #D1D1D1;
  border-radius: 4px;
  font-size: 1.125rem;
  background-color: transparent;
  transition: border-color .2s, background-color .2s;
}
.board-header .search-wrap .input-wrap input::placeholder {
  color: #A7A7A7;
}
.board-header .search-wrap .input-wrap input:hover,
.board-header .search-wrap .input-wrap input:focus {
  border-color: #afafaf;
}
.board-header .search-wrap .input-wrap input:focus {
  background-color: #FFFFFF;
}
.board-header .search-wrap .input-wrap .search-btn {
  width: 48px;
  transition: background-color .2s;
  background-image: url('/resources/images/common/icon-search.svg');
  background-repeat: no-repeat;
  background-position: center center;
  position: absolute;
  top: 1px;
  bottom: 1px;
  right: 1px;
}
.board-header .search-wrap .input-wrap .search-btn:hover {
  background-color: rgba(0, 0, 0, .1);
}
.board-header .write-btn {
  float: right;
}
/* Board article list */
.board-article-list {
  margin-bottom: 4.375rem;
}
.article-list-table {
  width: 100%;
  table-layout: fixed;
}
.article-list-table col.col-no {
  width: 4.375rem;
}
.article-list-table col.col-title {
  width: calc(100% - 31.25rem);
}
.article-list-table col.col-attach {
  width: 5.625rem;
}
.article-list-table col.col-author {
  width: 6.5625rem;
}
.article-list-table col.col-view {
  width: 6.5625rem;
}
.article-list-table col.col-writedate {
  width: 8.125rem;
}
.article-list-table thead th {
  height: 5.5rem;
  padding: 0 1rem;
  border-bottom: 2px solid #D1D1D1;
  font-weight: 700;
  font-size: 1.125rem;
}
.article-list-table tbody td {
  height: 4.375rem;
  border-bottom: 1px solid #D1D1D1;
  white-space: nowrap;
  text-align: center;
  font-size: 1rem;
}
.article-list-table tbody tr.notice td {
  background-color: rgba(209, 209, 209, .2);
}
.article-list-table tbody td.align-left {
  text-align: left;
}
.article-list-table tbody td.new-post:after {
  content: "New";
  padding: 0 8px;
  border-radius: 4px;
  vertical-align: middle;
  font-weight: bold;
  font-size: 0.6875rem;
  color: #FFFFFF;
  background-color: #EF665D;
}
.article-list-table tbody td a {
  max-width: 100%;
  padding: 0.5rem 0.2rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  vertical-align: middle;
  display: inline-block;
}
.article-list-table tbody td.new-post a {
  max-width: calc(100% - 48px);
}
.article-list-table tbody td.new-post .category ~ a {
  max-width: calc(100% - 118px);
}
.article-list-table tbody td:not(.new-post) .category ~ a {
  max-width: calc(100% - 70px);
}
.article-list-table tbody td .category {
  padding: 0 8px;
  line-height: 1.6875rem;
  border-radius: 4px;
  font-size: 0.8725rem;
  background-color: #D1D1D1;
  vertical-align: middle;
  display: inline-block;
}
.article-list-table tbody td .category.white {
  background-color: #FFFFFF;
}
.article-list-table tbody td .category.pink {
  background-color: #EED8CC;
}
/* Pagination */
.pagination ul {
  list-style: none;
  text-align: center;
}
.pagination ul:after {
  content: "";
  clear: both;
  display: block;
}
.pagination ul li {
  width: 48px;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color .2s;
  line-height: 48px;
  text-align: center;
  vertical-align: middle;
  display: inline-block;
}
.pagination ul li a:hover {
  color: #333333;
}
.pagination ul li.nav-block {
  border-color: #D1D1D1;
}
.pagination ul li.nav-block.disabled {
  cursor: not-allowed;
}
.pagination ul li.nav-block:first-child {
  margin-right: 10px;
}
.pagination ul li.nav-block:last-child {
  margin-left: 10px;
}
.pagination ul li a {
  transition: color .2s;
  font-size: 1.125rem;
  color: #A7A7A7;
  display: block;
}
.pagination ul li.active a {
  font-weight: 700;
  color: #333333;
}
.pagination ul li.nav-block.disabled a {
  pointer-events: none;
  opacity: 0.4;
}


@media (max-width: 1280px) {
  .board-header {
    margin-bottom: 0.5rem;
  }
  .board-header .search-wrap {
    width: 100%;
    margin-bottom: 2rem;
  }

  .article-list-table thead th {
    height: 4rem;
    padding: 0;
    font-size: 1rem;
  }
  .article-list-table tbody td {
    height: 3.25rem;
    font-size: 0.875rem;
  }
  .article-list-table col.col-no {
    width: 3rem;
  }
  .article-list-table col.col-title {
    width: 17.625rem;
  }
  .article-list-table col.col-attach {
    width: 4rem;
  }
  .article-list-table col.col-author {
    width: 4.5rem;
  }
  .article-list-table col.col-view {
    width: 4.5rem;
  }
  .article-list-table col.col-writedate {
    width: 7rem;
  }
}

@media (max-width: 680px) {
  .board-header .search-wrap .search-option-select {
    width: 7rem;
    margin-right: 13px;
  }
  .search-wrap .select2-container .select2-selection--single {
    height: 40px;
  }
  .search-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 13px;
    padding-right: 20px;
    line-height: 40px;
    font-size: 1rem;
  }
  .search-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    width: 20px;
    height: 38px;
  }
  .board-header .search-wrap .input-wrap {
    width: calc(100% - 7rem - 13px);
  }
  .board-header .search-wrap .input-wrap input {
    height: 40px;
    padding-left: 13px;
    padding-right: 40px;
    font-size: 1rem;
  }
  .board-header .search-wrap .input-wrap .search-btn {
    width: 38px;
  }

  .article-list-table thead th {
    height: 3.5rem;
    font-size: 0.825rem;
  }
  /**
   * No, 조회수, 카테고리 숨김
   */
  .article-list-table thead th:nth-child(1),
  .article-list-table tbody td:nth-child(1),
  .article-list-table col.col-no,
  .article-list-table thead th:nth-child(5),
  .article-list-table tbody td:nth-child(5),
  .article-list-table col.col-view,
  .article-list-table thead th:nth-child(6),
  .article-list-table tbody td:nth-child(6),
  .article-list-table col.col-writedate,
  .article-list-table tbody td .category {
    display: none;
  }
  .article-list-table tbody td.new-post .category ~ a {
    max-width: calc(100% - 48px);
  }
  .article-list-table tbody td:not(.new-post) .category ~ a {
    max-width: 100%;
  }

  .article-list-table col.col-no {
    width: 2.5rem;
  }
  .article-list-table col.col-title {
    width: calc(100vw - 8.375rem);
  }
  .article-list-table col.col-attach {
    width: 3rem;
  }
  .article-list-table col.col-author {
    width: 3.5rem;
  }
  .article-list-table col.col-view {
    width: 3.5rem;
  }
  .article-list-table col.col-writedate {
    width: 5.5rem;
  }

  .pagination ul li {
    width: 28px;
    height: 38px;
    line-height: 38px;
  }
  .pagination ul li.nav-block {
    width: 38px;
  }
  .pagination ul li a {
    font-size: 1rem;
  }
}
