/* =============================================================
   DATATREE Inc. — Board (게시판) Styles
   ============================================================= */

/* ---------- Notice strip ---------- */
.notice-strip-section{ background: #fff; padding-top: 34px; }
.notice-strip{
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-light);
  border: 1px solid #e6edf9;
  border-radius: var(--radius-pill);
  padding: 10px 14px 10px 10px;
  overflow: hidden;
}
.notice-badge{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.notice-strip-list{
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 24px;
}
.notice-strip-list a, .notice-strip-list span.notice-loading{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-size: .92rem;
  color: var(--text-body);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice-strip-list a:hover{ color: var(--brand-blue); }
.notice-empty{ display:flex; align-items:center; height:100%; color: var(--text-muted); font-size:.9rem; }

/* ---------- Board toolbar ---------- */
.board-section{ background: #fff; }
.board-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.board-tabs{ display: flex; gap: 8px; flex-wrap: wrap; }
.board-tab{
  border: 1.5px solid #e2e8f5;
  background: #fff;
  color: var(--text-body);
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  transition: all .25s var(--ease);
}
.board-tab:hover{ border-color: var(--brand-blue); color: var(--brand-blue); }
.board-tab.active{ background: var(--gradient-brand); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(67,135,240,.3); }

.board-actions{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-search{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-light);
  border: 1.5px solid #e2e8f5;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  min-width: 240px;
}
.board-search i{ color: var(--text-muted); }
.board-search input{
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
  color: var(--text-dark);
}
.board-write-btn{ padding: 12px 24px; font-size: .88rem; white-space: nowrap; }

/* ---------- Board table ---------- */
.board-table-wrap{ overflow-x: auto; }
.board-table{ width: 100%; border-collapse: collapse; min-width: 640px; }
.board-table thead th{
  background: var(--bg-light);
  color: var(--text-dark);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: 16px 12px;
  border-bottom: 2px solid #e2e8f5;
  text-align: center;
}
.board-table thead th.col-title{ text-align: left; }
.board-table tbody td{
  padding: 16px 12px;
  border-bottom: 1px solid #eef1f8;
  font-size: .92rem;
  color: var(--text-body);
  text-align: center;
  vertical-align: middle;
}
.board-table tbody tr{ transition: background .2s; cursor: pointer; }
.board-table tbody tr:hover{ background: var(--bg-light); }
.board-table td.col-title{ text-align: left; }
.board-table .post-title-link{
  color: var(--text-dark);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.board-table .post-title-link:hover{ color: var(--brand-blue); }
.pin-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gradient-orange);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.cat-badge{
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--brand-blue);
  white-space: nowrap;
}
.cat-badge.cat-질문공유방{ background: #fff2e2; color: #cc7a1a; }
.cat-badge.cat-자료실{ background: #e6f9f5; color: #17a68d; }
.board-loading, .board-table .board-loading{ padding: 60px 0; text-align: center; color: var(--text-muted); }

.board-empty{
  text-align: center;
  padding: 70px 0;
  color: var(--text-muted);
}
.board-empty i{ font-size: 2.6rem; margin-bottom: 16px; opacity: .5; }

.board-pagination{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}
.board-pagination button{
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f5;
  background: #fff;
  color: var(--text-body);
  font-weight: 700;
  transition: all .2s;
}
.board-pagination button:hover{ border-color: var(--brand-blue); color: var(--brand-blue); }
.board-pagination button.active{ background: var(--gradient-brand); border-color: transparent; color: #fff; }

@media (max-width: 700px){
  .board-toolbar{ flex-direction: column; align-items: stretch; }
  .board-actions{ justify-content: space-between; }
  .board-search{ flex: 1; min-width: 0; }
  .col-author, .col-views{ display: none; }
}

/* ---------- Post view (detail) ---------- */
.board-view-section{ background: #fff; }
.post-view-wrap{
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-card);
}
.post-view-head{ border-bottom: 2px solid #e2e8f5; padding-bottom: 24px; margin-bottom: 30px; }
.post-view-head .cat-badge{ margin-bottom: 14px; }
.post-view-head h2{ font-size: 1.6rem; font-weight: 800; line-height: 1.4; margin-bottom: 16px; }
.post-view-meta{ display: flex; gap: 20px; flex-wrap: wrap; font-size: .88rem; color: var(--text-muted); }
.post-view-meta span{ display: inline-flex; align-items: center; gap: 6px; }
.post-view-body{ font-size: 1rem; line-height: 1.9; color: var(--text-body); white-space: pre-wrap; word-break: break-word; min-height: 120px; }
.post-view-actions{
  max-width: 860px;
  margin: 30px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.btn-dark-outline{ border-color: #d5deef; color: var(--text-dark); }
.btn-dark-outline:hover{ background: var(--bg-light); }
.post-delete-btn{ background: transparent; border: 1.5px solid #f3b9b9; color: #c0392b; }
.post-delete-btn:hover{ background: #fdecec; }

@media (max-width: 640px){
  .post-view-wrap{ padding: 30px 22px; }
}

/* ---------- Board write ---------- */
.board-write-section{ background: #fff; }
.board-write-section .form-wrap{
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 52px;
  box-shadow: var(--shadow-card);
  border: 1px solid #e6edf9;
}
.board-write-section .form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.board-write-section .form-field{ margin-bottom: 20px; }
.board-write-section .form-field.full{ grid-column: 1 / -1; }
.board-write-section .form-field label{
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.board-write-section .form-field input,
.board-write-section .form-field textarea{
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f5;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--text-dark);
  transition: border-color .25s, box-shadow .25s;
}
.board-write-section select{
  width: 100%;
  padding: 14px 44px 14px 18px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f5;
  font-family: inherit;
  font-size: .95rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23637381' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat calc(100% - 16px) center;
  appearance: none;
  cursor: pointer;
  color: var(--text-dark);
  transition: border-color .25s, box-shadow .25s;
}
.board-write-section .form-field input:focus,
.board-write-section .form-field textarea:focus,
.board-write-section select:focus{
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(67,135,240,.12);
}
.board-write-section .form-field textarea{
  resize: vertical;
  line-height: 1.7;
}
.board-write-section .form-actions{
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}
.board-write-section .form-submit{
  flex: 1;
  width: 100%;
  justify-content: center;
  padding: 15px 24px;
  font-size: .95rem;
}
.board-write-section .form-cancel-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #d5deef;
  background: #fff;
  color: var(--text-body);
  font-weight: 700;
  font-size: .95rem;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.board-write-section .form-cancel-btn:hover{
  background: #f1f4fa;
  color: var(--text-dark);
}
.board-write-section .form-note{
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
}
.board-write-section .form-status{
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: .9rem;
  text-align: center;
  font-weight: 600;
}
.board-write-section .form-status.success{
  display: block;
  background: #eafaf1;
  color: #17864f;
  border: 1px solid #c3edd3;
}
.board-write-section .form-status.error{
  display: block;
  background: #fdecec;
  color: #c0392b;
  border: 1px solid #f6caca;
}

@media (max-width: 640px){
  .board-write-section .form-wrap{ padding: 32px 20px; }
  .board-write-section .form-grid{ grid-template-columns: 1fr; gap: 14px; }
  .board-write-section .form-actions{ flex-direction: column-reverse; }
  .board-write-section .form-cancel-btn{ width: 100%; justify-content: center; }
}
