/* mixin */ 
@import "../mixin/ui-mixin";

.board-wrap {
  width: 100%; display: table; table-layout: fixed;
  /************************************** 게시판 헤더 **************************************/
  .board-head {
    display: table-header-group; color:#000; background:#eceeef;
    > span.board-head-tit {
      display: table-cell; text-align: center; font-size: 1.3rem; font-weight: 500; border-top:1px solid var(--line-color); padding: 12px 0
    }
    > span.board-head-tit.num {
      width: 50px;
    }
    > span.board-head-tit.title {
      width: calc(100% - 540px);
      &.community {
        width: calc(100% - 500px);
      }
    }
    > span.board-head-tit.writer {
      width: 200px;
    }
    > span.board-head-tit.status {
      width: 80px;
    }
    > span.board-head-tit.date {
      width: 120px;
    }
    > span.board-head-tit.date-ing {
      width: 200px;
    }
    > span.board-head-tit.view {
      width: 80px;
    }
  }
  /************************************** 게시판 바디 **************************************/
  .board-body {
    display: table-row; width: 100%; 
    &.shortcut {
      > div.board-cell.cell-tit {
        text-align: left;
      }
      .btn {
        .btn-wrap {
          display: none;
        }
        .address {
          display: block; pointer-events: none; cursor: auto;
          &.link {
            color: #598cc1; pointer-events: all; cursor: pointer;
            &:hover {
              text-decoration: underline; text-underline-offset: 4px;
            }
          }
        }
      }
    }
    &.pin {
      background:#f8f8f8;
    }
    > div.board-cell {
      display: table-cell; vertical-align: middle; font-size: 1.3rem; text-align: center; padding: 12px 5px; border-bottom: 1px solid var(--line-color); color: #000; word-break: break-all;
      .label {
        background: #Fff;border: 1px solid var(--main-color); padding: 5px; border-radius: 3px;color: var(--main-color); font-size: 1.1rem; display:inline-block; font-weight:500;min-width: 52px; text-align: center;
        &.end {
          color:#aaa; border-color:#ccc;
        }
      }   
      &.cell-tit:hover {
        a {
          text-decoration: underline;
        }
      }
    }
    > div.board-cell.cell-tit {
      text-align: left;
        &.company {
          text-align: center;
        }
    }
    > div.board-cell.cell-tit a {
      display: block;color:#000; line-height:27px; @include ellipsis;
    }
    > div.board-cell.br-tit {
      &:hover {
        a {
          text-decoration: underline;
        }  
        a {
          display: block;
        }
      }
    } 
    span.notice-pin {
      img {width: 15px; height: 15px; position: relative; top: -1px}
    }
    .mo-notice-pin {display: none} 
  }
}

/*
.board-wrap .board-body > div.board-cell:hover.cell-tit {text-decoration: underline;} */

/* 검색 결과 없음 */
.board-empty { position: relative; text-align: center; width: 100%; padding: 50px 0; border-bottom: 1px solid var(--line-color); }

@media(max-width:  1024px) {
  .board-wrap {
    border-top:1px solid var(--line-color);
    /* 보드 헤더*/
    .board-head {
      display: none; position: absolute; top: -9999px; left: -9999px;
    }
    /* 보드 바디 */
    .board-body {
      padding: 10px 0 12px; display: block; border-bottom: 1px solid var(--line-color);
        &.shortcut {
          position: relative; padding: 10px 0 50px;
          .btn {
            position: absolute; bottom: 10px; left: 0px;
            .address {
              display: none;
            }
            .btn-wrap {
              display: block;
            }
          }
        }
      > div.board-cell {
        border-bottom: 0; text-align: left; padding: 3px 5px; position: relative;
        .notice-pin-cell {
          display: none;
        } 
      }
      > div.board-cell.cell-tit {
        display: inline-block; width: calc(100% - 65px);
        &.company {
            text-align: left; font-weight: 500;
          }
        a {
          line-height:21px;
        }
        &.community {
          width:100%; display:block;
        }
      }	
      > div.board-cell[data-label="대표자"]::after {
        content: none !important;
      }
      > div.board-cell {
        font-size: 1.4rem;
        br {
          display:none;
        }
        &.tech:not(.cell-tit):not(.no-label) {
          &::before { content: none !important; display: none; }
        }
        &:not(.cell-tit):not(.no-label) {
          font-size: 1.2rem; padding: 5px 0 0;
        }
        &:not(.cell-tit):not(.no-label):before {
          padding-right: 5px;color: #b3b3b3; content: attr(data-label); font-weight: 600;
        }
        &:after {
          content: ''; width: 1px; height: 10px; background-color:#cfcfcf; top: 7px; right: -10px; position: absolute
        }
        &:first-child{
          display:none;
          &:after {
            content:none;
          }
        }
        &.br-tit {
          a {
            font-size: 1.5rem; font-weight: 500;
          }
        }           
        &.cell-tit {
          &:after {
            content: none
          }
        }
        &:last-child {
          &:after {
            content:none;
          }
        }
        &.no-label {
          padding: 7px 5px 3px 0px;
        }
      }
      > div.board-cell.inline {
        display: inline-block; width: auto; margin-right: 15px;
                &.mg-right-5px {
          margin-right: 5px;
        }
        &:nth-child(2) {
          margin-right:0;
          &.portal-name {
            color: #598cc1; padding-bottom: 7px;
          }
          &:before {
            content:none;
          }
          &:after {
            content:none;
          }
        }
        .label {
          font-size: 1rem; min-width: auto; padding: 3px 5px; position: relative; top: -3px;
        }
      }  
      .mo-notice-pin img {width: 13px; height: 13px; position: relative; top: 3px}
      .mo-notice-pin {display: inline-block; margin-right: 5px}
    }
  }
  .br-tit::before,
  .br-tit::after {
    content: none !important;
    display: none;
  }
}

/* board detail */


/* detail */
.detail {
  .d-head {
    padding:40px 20px;background: #f2f5f6; border-bottom:1px solid var(--line-color); border-top:1px solid var(--line-color);
    .d-tit {
      h4.h4 {
        font-size:1.8rem; font-weight:500; padding-bottom:15px;
      }
      .notice-pin {
        margin-right:5px;
        img {
          width:18px; height:18px;
        }
      }
      .label {
        background: #Fff;border: 1px solid var(--main-color); padding: 5px; border-radius: 3px;color: var(--main-color); font-size: 1.1rem; display:inline-block; font-weight:500;min-width: 52px; text-align: center; position: relative; top: -2px; margin-right: 5px;
        &.end {
          color:#aaa; border-color:#ccc;
        }
      }
    }
    .d-info {
      ul {
        > li {
          position: relative; display: inline-block; margin: 8px 15px 0 0; font-size:1.3rem; color:#888;
          &:after { 
            content: ''; position: absolute; top: 3px; right: -10px; width: 1px;  height: 12px; background: #d5d5d5;            
          }
          &:last-child {
            &:after {content:none;}
          }
          b {
            font-weight: 600;
          }
          &.link {
            .a-link {
              font-size: 1.2rem; font-weight: 500; border-radius: 3px; background: #808391; color: #fff; padding: 5px 15px; display: inline-block;
            }
          }
        }
      }
    }
  }
  .file-set-wrap {
    padding:15px 0; border-bottom:1px solid var(--line-color);
    .file-tit {
      float:left; vertical-align: middle; margin-right:10px; font-size:1.5rem; font-weight:600;
    }
    .add-file-wrap {
      float:left;
    }
  }
  .d-content {
    padding:20px 10px; border-bottom:1px solid var(--line-color);
    p {
      font-size:1.5rem; line-height:23px;
    }
    img {
      max-width:100%;
    }
    video {
      max-width:100%;
    }       
    .embed {
      iframe { 
        width: 80%; aspect-ratio: 16 / 9; height: auto; border: 0;
      }
    }
  }
  .d-foot {
    margin-top:10px;
    .navi-wrap {
      font-size:1.4rem;color: #666; 
      a {
        color: #666; 
        &.empty {
          color:#aaa; pointer-events: none;
          &:hover {text-decoration: none;}
        }        
        &:hover {
          text-decoration: underline
        } 
      }
      div.navi {
        width:100%;
        a { 
          width:calc(100% - 83px); margin-left:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display: inline-block; position:relative; top:4px;}border-bottom: 1px solid var(--line-color); padding-bottom:10px; margin-bottom:10px;  
        img {
          vertical-align: middle; width: 20px; height: 20px;opacity: 0.3; margin-right:3px;
        }          
      }      
    }
    .btn-wrap{
      .btn-right {
        button {
          height:40px; padding: 0 45px
        }
      }
    } 
  }   
}

/* empty */
.empty-area {
  text-align: center; padding: 120px 0;
  .img-area {
    width: 100px; height: auto; margin: 0 auto;
    img {
      width: 100%;
    }
  }
  .txt {
    font-size: 1.5rem; position: relative; display: inline-block; opacity: .6; padding-top: 30px;
  }
}

/* gallery */
.board-gallery-wrap {
  position: relative; width: 100%;
  .gallery-group {
    display: flex; gap: 40px 20px; flex-wrap: wrap;
    .item {
      width: calc(25% - 15px); display: block;
      &:hover {
        .thumbnail-area {
          > img {
            transform: translate(-50%,-50%) scale(1.03);
          }
        }
        .title-area {
          .tit {
            text-decoration: underline;
          }
        }
      }
      .thumbnail-area {
        width: 100%; padding-bottom: 55%; position: relative; overflow: hidden; border-radius: 5px; margin-bottom: 15px; border: 1px solid var(--line-color);
        > img {
          @include alignCenter; width: 100%; height: 100%; object-fit: cover; transition: transform .2s;
        }
        .label {
          position: absolute; right: 0; display: inline-block; padding: 5px 8px; background: #4b5f6d; z-index: 999;
          .label-text {
            font-size: 1.3rem; color: #fff; font-weight: 600;
          }
        }
      }
      .title-area {
        .tit {
          @include ellipsis; display: block; font-size: 1.6rem; font-weight: 600; padding-bottom: 10px;
          .pin {
            width: 16px; height: 14px; margin-right: 5px; position: relative; top: 4px;
          }
          .notice-pin {
            margin-right:5px;
            img {
              width:18px; height:18px;
            }
          }
        }
        .info {
          > span {
            font-size: 1.3rem; color: #757575; position: relative; display: inline-block;
            &:not(:first-child) {
              padding-left: 14px;
              &:after {
                content: ''; width: 1px; height: 10px; background: #aaa; position: absolute; top: 2px; left: 5px;
              }
            }
          }
        }
      }
      &.no-image {
        &:hover {
          .thumbnail-area {
            > img {
              transform: translate(-50%,-50%) scale(1);
            }
          }  
        }
        .thumbnail-area {
          background-color: #F9F9F9;
          > img {
            width: 140px; opacity: .5; height: auto; max-width: 90%;
          }
        }
      }
    }
  }
}

@media (max-width: 1200px) {
    .callout-notice {
        padding: 10px 15px 15px 0;
    }
}


@media (max-width: 1024px) {
  .board-gallery-wrap {
    .gallery-group {
      .item {
        .title-area {
          .tit {
            font-size: 1.5rem;
          }
          .info {
            > span {
              font-size: 1.2rem;
            }
          }
        }
      }
    }
  }
}

@media(max-width:768px) {
  .detail {
    .d-head {
      padding:30px 20px;
      .d-tit {
          p.h2 {
            font-size:1.7rem;
          }
        }
      }    
      .d-content {
        p {
          font-size:1.4rem; line-height:20px;
        }  
      .embed {
        iframe { 
          width: 100%;
        }
      }
    }    
  }    
  .board-gallery-wrap {
    .gallery-group {
      .item {
        width: calc(33% - 12px) !important;
        &.no-image {
          .thumbnail-area {
            > img {
              width: 90px;
            }
          }
        }
      }
    }
  }
}

@media(max-width:500px) {
  .detail {
    .d-head {
      .d-tit {
          p.h2 {
            font-size:1.6rem;
          }
          .notice-pin {
            img  {
              width:14px; height:14px;
          }
        }
      }
      .d-info {
        ul {
          > li {
              &.link {
              width: 100%; padding-top: 10px;
              .a-link {
                display: block; width: 100%; text-align: center; padding: 10px 0;
              }
            }
          }
        }
      }
    }
    .d-content {
      padding:15px 0;
      p {
        font-size:1.3rem;
      }
    }
    .d-foot {
      .btn-wrap {
        text-align: center;
        .btn-right {
          float:none;
          button {
            float:none; font-size:1.3rem; height:30px;
          }
        }
      }
    }
  }
  .board-gallery-wrap {
    .gallery-group {
      gap: 25px 10px;
      .item {
        width: calc(50% - 5px) !important;
        .thumbnail-area {
          border-radius: 5px; margin-bottom: 7px;
        }
        .title-area {
          .tit {
            font-size: 1.3rem; padding-bottom: 3px;
            .notice-pin {
              margin-right: 0;
              img {
                width: 15px; height: 15px;
              }
            }
            .pin {
              width: 14px; height: 12px; top: 3px;
            }
          }
          .info {
            > span {
              &:not(:first-child) {
                padding-left: 10px;
                &:after {
                  left: 3px; top: 1px;
                }
              }
            }
          }
        }
      }
    }
  }
}