/* ==========================================================================
   KISA Basic Board Skin (kisa_basic) Style
   ========================================================================== */

.kisa-board-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  color: var(--foreground);
}

/* Category Filter Bar */
.kisa-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}
.kisa-cat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: rgba(28, 20, 16, 0.6);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}
.kisa-cat-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.kisa-cat-tab.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Board Top Control Bar */
.kisa-board-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.kisa-board-total {
  font-size: 0.75rem;
  color: rgba(28, 20, 16, 0.45);
}
.kisa-board-total strong {
  color: var(--primary);
  font-weight: 600;
}
.kisa-board-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Search Form */
.kisa-search-form {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 320px;
}
.kisa-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.kisa-search-input {
  width: 100%;
  min-width: 180px;
  height: 34px;
  padding: 0 32px 0 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
}
.kisa-search-input:focus {
  border-color: var(--primary);
}
.kisa-search-icon-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(28, 20, 16, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}
.kisa-search-icon-btn:hover {
  color: var(--primary);
}
.kisa-search-submit-btn {
  height: 34px;
  padding: 0 0.875rem;
  margin-left: 0.375rem;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.kisa-search-submit-btn:hover {
  opacity: 0.9;
}

/* Write Button */
.kisa-btn-write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 1rem;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.kisa-btn-write:hover {
  opacity: 0.9;
  color: #ffffff;
}

/* Admin Button */
.kisa-btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 34px;
  padding: 0 0.875rem;
  background-color: #374151;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  white-space: nowrap;
  transition: background-color 0.2s, opacity 0.2s;
}
.kisa-btn-admin:hover {
  background-color: #1f2937;
  color: #ffffff;
  opacity: 0.95;
}

/* Board Table / List */
.kisa-board-list {
  border-top: 2px solid var(--primary);
}
.kisa-board-header {
  display: none;
}
@media (min-width: 640px) {
  .kisa-board-header {
    display: grid;
    grid-template-columns: 60px 1fr 90px 95px 60px;
    background-color: rgba(28, 20, 16, 0.02);
    border-bottom: 1px solid var(--border);
  }
  .kisa-board-header.has-archive {
    grid-template-columns: 60px 80px 1fr 90px 95px 60px;
  }
}
.kisa-board-header > div {
  padding: 0.625rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(28, 20, 16, 0.5);
}

/* Board Row Items */
.kisa-board-item {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
  cursor: pointer;
}
.kisa-board-item:hover {
  background-color: rgba(28, 20, 16, 0.025);
}
.kisa-board-item.is-notice-row {
  background-color: rgba(122, 34, 44, 0.02);
}
.kisa-board-item.is-notice-row:hover {
  background-color: rgba(122, 34, 44, 0.04);
}

@media (min-width: 640px) {
  .kisa-board-item {
    display: grid;
    grid-template-columns: 60px 1fr 90px 95px 60px;
    align-items: center;
  }
  .kisa-board-item.has-archive {
    grid-template-columns: 60px 80px 1fr 90px 95px 60px;
  }
}
.kisa-board-item > div {
  padding: 0.875rem 0.625rem;
}
.kisa-board-num {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(28, 20, 16, 0.35);
}
.kisa-board-subject {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  overflow: hidden;
  min-width: 0;
}
.kisa-board-subject a {
  font-size: 0.875rem;
  color: rgba(28, 20, 16, 0.85);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  font-weight: 400;
}
.kisa-board-item.is-notice-row .kisa-board-subject a {
  font-weight: 500;
  color: var(--foreground);
}
.kisa-board-item:hover .kisa-board-subject a {
  color: var(--primary);
}
.kisa-board-author,
.kisa-board-date,
.kisa-board-hit {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(28, 20, 16, 0.5);
}

/* Badges */
.badge-notice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.375rem;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 500;
  border-radius: 2px;
  flex-shrink: 0;
  line-height: 1.2;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.25rem;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.5625rem;
  font-weight: 700;
  border-radius: 2px;
  margin-left: 0.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.badge-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #4b5563;
  flex-shrink: 0;
  line-height: 1.2;
}
.badge-category.cat-activity { background-color: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-category.cat-seminar  { background-color: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.badge-category.cat-coop     { background-color: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.badge-category.cat-exam     { background-color: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-category.cat-edu      { background-color: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-category.cat-contest  { background-color: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-category.cat-general  { background-color: #f9fafb; color: #4b5563; border-color: #e5e7eb; }
.badge-category.cat-rules    { background-color: #f8fafc; color: #334155; border-color: #cbd5e1; }
.badge-category.cat-form     { background-color: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-category.cat-archive  { background-color: #ecfeff; color: #0e7490; border-color: #a5f3fc; }

/* Comment count badge */
.comment-count {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.6875rem;
  color: var(--primary);
  opacity: 0.85;
  font-weight: 500;
  flex-shrink: 0;
}

/* Icons */
.icon-file, .icon-image, .icon-secret, .icon-lock {
  color: rgba(28, 20, 16, 0.35);
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-download {
  color: var(--accent);
  opacity: 0.75;
  flex-shrink: 0;
  margin-left: auto;
}

/* Mobile View for Board Rows */
@media (max-width: 639px) {
  .kisa-board-item {
    display: flex;
    flex-direction: column;
    padding: 0.875rem 0.5rem;
  }
  .kisa-board-item > div {
    padding: 0;
  }
  .kisa-board-num,
  .kisa-board-author,
  .kisa-board-hit {
    display: none;
  }
  .kisa-board-subject {
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
  }
  .kisa-board-subject a {
    white-space: normal;
    font-size: 0.875rem;
    line-height: 1.4;
  }
  .kisa-board-meta-mobile {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: rgba(28, 20, 16, 0.4);
    margin-top: 0.25rem;
  }
}

/* Pagination matching Figma */
.kisa-pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  font-family: inherit;
}
.pg_wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  font-family: inherit;
}
.pg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.pg_page,
.pg_current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: rgba(28, 20, 16, 0.55);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
}
.pg_page:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pg_current {
  border-color: var(--primary);
  background-color: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
}
.pg_start, .pg_prev, .pg_next, .pg_end {
  font-size: 0;
  color: transparent !important;
  position: relative;
}
.pg_start::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url('img/icon-chevrons-left.svg') no-repeat center center / contain;
  opacity: 0.45;
}
.pg_prev::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url('img/icon-chevron-left.svg') no-repeat center center / contain;
  opacity: 0.45;
}
.pg_next::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url('img/icon-chevron-right.svg') no-repeat center center / contain;
  opacity: 0.45;
}
.pg_end::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url('img/icon-chevrons-right.svg') no-repeat center center / contain;
  opacity: 0.45;
}
.pg_start:hover::before, .pg_prev:hover::before, .pg_next:hover::before, .pg_end:hover::before {
  opacity: 0.9;
}
.sound_only {
  display: none !important;
}

/* Empty State */
.kisa-board-empty {
  padding: 4rem 0;
  text-align: center;
  color: rgba(28, 20, 16, 0.4);
  font-size: 0.875rem;
}
