/* ─── ai_agents 게시판 스킨 전용 스타일 ─────────────────────────── */

/* 배지 */
.agt-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  margin-right: 4px;
}

/* 프레임워크 배지 */
.agt-fw-claude    { background: #f3e8ff; color: #6b21a8; }
.agt-fw-crewai    { background: #d1fae5; color: #065f46; }
.agt-fw-autogen   { background: #dbeafe; color: #1d4ed8; }
.agt-fw-langgraph { background: #fef3c7; color: #92400e; }
.agt-fw-custom    { background: #f3f4f6; color: #6b7280; }

/* 상태 배지 */
.agt-s-active   { background: #d1fae5; color: #065f46; }
.agt-s-draft    { background: #fef3c7; color: #92400e; }
.agt-s-archived { background: #f3f4f6; color: #6b7280; }

/* 난이도 배지 */
.agt-d-beginner     { background: #dcfce7; color: #166534; }
.agt-d-intermediate { background: #dbeafe; color: #1d4ed8; }
.agt-d-advanced     { background: #fee2e2; color: #991b1b; }

/* 필터 탭 카운트 */
.agt-pill-cnt { font-size: .75rem; opacity: .7; margin-left: 2px; }

/* 카드 그리드 */
.agt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.agt-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.agt-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: #a78bfa;
}

.agt-card-badges { display: flex; gap: 4px; flex-wrap: wrap; }

.agt-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.4;
}

.agt-meta {
  display: flex;
  gap: 8px;
  font-size: .78rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.agt-category-label {
  background: #f3f4f6;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .74rem;
  color: #4b5563;
}

.agt-desc {
  font-size: .85rem;
  color: #374151;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.agt-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: auto;
}

.agt-tag {
  font-size: .72rem;
  color: #6d28d9;
  background: #ede9fe;
  border-radius: 4px;
  padding: 2px 6px;
}

/* 빈 상태 */
.agt-empty { text-align: center; padding: 60px 20px; color: #6b7280; }

/* 상세 보기 헤더 */
.agt-view-header {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}
.agt-view-badges  { margin-bottom: 10px; }
.agt-view-title   { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; color: #111; }
.agt-view-meta    { display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: #4b5563; }

/* 섹션 */
.agt-view-body  { display: flex; flex-direction: column; gap: 20px; }
.agt-section    { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; }
.agt-section h2 { font-size: 1rem; font-weight: 700; margin: 0 0 12px; color: #111; }

/* 에이전트 정의 코드 블록 */
.agt-def-block {
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
}
.agt-def-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0f172a;
}
.agt-def-lang {
  font-size: .78rem;
  color: #94a3b8;
  font-family: monospace;
}
.agt-copy-btn {
  background: #6d28d9;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: .78rem;
  cursor: pointer;
}
.agt-copy-btn:hover { background: #5b21b6; }
.agt-def-code {
  margin: 0;
  padding: 16px;
  color: #e2e8f0;
  font-family: monospace;
  font-size: .85rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* MCP 목록 */
.agt-mcp-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.agt-mcp-list li code {
  display: inline-block;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .85rem;
  color: #374151;
}

/* 링크 버튼 */
.agt-links { display: flex; gap: 10px; flex-wrap: wrap; }
.agt-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}
.agt-link-btn:hover { background: #f9fafb; border-color: #a78bfa; }

/* 이전/다음 */
.agt-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}
.agt-nav-btn {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  font-size: .85rem;
}
.agt-nav-btn:hover { background: #f9fafb; }
.agt-nav-center { font-weight: 600; }

/* 등록/수정 폼 */
.agt-write-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.agt-write-table th {
  width: 140px;
  text-align: left;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-size: .88rem;
  color: #6b7280;
  vertical-align: top;
}
.agt-write-table td { padding: 8px 10px; border: 1px solid #e5e7eb; }
.agt-req { color: #dc2626; }

.agt-input-full  { width: 100%; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .88rem; box-sizing: border-box; }
.agt-input-half  { width: 50%;  padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .88rem; }
.agt-select      { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .88rem; }
.agt-textarea-sm { width: 100%; height: 80px;  padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .85rem; box-sizing: border-box; resize: vertical; font-family: monospace; }
.agt-textarea-md { width: 100%; height: 120px; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .88rem; box-sizing: border-box; resize: vertical; }
.agt-textarea-lg { width: 100%; height: 300px; padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px; font-size: .85rem; box-sizing: border-box; resize: vertical; font-family: monospace; }
.agt-field-hint  { font-size: .78rem; color: #9ca3af; margin-top: 4px; }

.agt-write-actions { display: flex; gap: 10px; }

/* 페이지네이션 */
.pcest-pager { display:flex; align-items:center; justify-content:center; gap:6px; margin:20px 0; }
.pcest-pager .pg a, .pcest-pager .pg span, .pcest-pager .pg strong {
  min-width:30px; height:30px; padding:0 6px;
  border:1px solid #ddd; border-radius:4px; background:#fff; color:#555;
  font-size:12px; display:inline-flex; align-items:center; justify-content:center;
}
.pcest-pager .pg .pg_current, .pcest-pager .pg strong {
  background:#2b2b2b; border-color:#2b2b2b; color:#fff; font-weight:700;
}
.pcest-pg-total { font-size:12px; color:#888; margin-left:6px; }

/* 반응형 */
@media (max-width: 600px) {
  .agt-grid { grid-template-columns: 1fr; }
  .agt-view-title { font-size: 1.3rem; }
  .agt-write-table th { width: 100px; }
}
