/**
 * BoardPress 기본 스킨 CSS
 * skin/board/basic/style.css
 *
 * 테마 CSS(theme/basic/css/style.css)와 분리되어 독립적으로 작동.
 * 스킨을 교체하면 이 CSS만 바뀜. 테마 CSS는 유지.
 */

/* ===== 공통 게시판 ===== */
.bp-board { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.bp-board-header { padding: 24px 24px 16px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.bp-board-header h2 { font-size: 20px; font-weight: 700; color: #1e293b; margin: 0; }
.bp-board-desc { font-size: 14px; color: #94a3b8; }
.bp-board-total { font-size: 13px; color: #94a3b8; margin-left: auto; }

/* ===== 카테고리 ===== */
.bp-category-tabs { display: flex; gap: 4px; padding: 12px 24px; border-bottom: 1px solid #f1f5f9; flex-wrap: wrap; }
.bp-cat-tab { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; color: #64748b; background: #f8fafc; transition: all 0.2s; text-decoration: none; }
.bp-cat-tab:hover { background: #eef2ff; color: #4f46e5; }
.bp-cat-tab.active { background: #4f46e5; color: #fff; }

/* ===== 테이블 (일반 목록) ===== */
.bp-table { width: 100%; border-collapse: collapse; }
.bp-table th { padding: 12px 16px; font-size: 12px; font-weight: 600; color: #94a3b8; text-align: left; border-bottom: 1px solid #e2e8f0; letter-spacing: 0.03em; }
.bp-table td { padding: 13px 16px; font-size: 14px; border-bottom: 1px solid #f1f5f9; color: #475569; }
.bp-table tbody tr:hover { background: #fafbfc; }

.col-num { width: 70px; text-align: center; }
.col-cat { width: 80px; font-size: 13px; }
.col-name { width: 100px; }
.col-date { width: 80px; font-size: 13px; color: #94a3b8; }
.col-hit { width: 60px; text-align: center; font-size: 13px; color: #94a3b8; }
.col-like { width: 50px; text-align: center; font-size: 13px; color: #94a3b8; }
.col-subject a { color: #334155; font-weight: 500; text-decoration: none; }
.col-subject a:hover { color: #4f46e5; }

.bp-notice { background: #fffbeb; }
.badge-notice { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #fef3c7; color: #d97706; font-size: 11px; font-weight: 700; }
.badge-new { display: inline-block; padding: 1px 5px; border-radius: 3px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
.badge-hot { font-size: 12px; margin-left: 2px; }
.cnt-comment { color: #4f46e5; font-weight: 600; font-size: 12px; margin-left: 4px; }
.ico-file { font-size: 12px; margin-left: 2px; }
.ico-secret { font-size: 12px; margin-right: 2px; }
.indent { color: #94a3b8; }
.bp-empty { text-align: center; padding: 48px 16px !important; color: #94a3b8; font-size: 14px; }

/* ===== 하단 (검색+글쓰기) ===== */
.bp-board-foot { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-top: 1px solid #f1f5f9; }
.bp-search { display: flex; gap: 6px; }

/* ===== 갤러리 헤더 ===== */
.bp-gallery-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 24px 24px 16px; border-bottom: 1px solid #f1f5f9;
}
.bp-gallery-header h2 { font-size: 20px; font-weight: 700; color: #1e293b; margin: 0 0 2px; }
.bp-gallery-toolbar { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.bp-view-toggle { display: flex; gap: 2px; background: #f1f5f9; border-radius: 8px; padding: 3px; }
.bp-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 6px;
    color: #94a3b8; text-decoration: none; transition: all 0.2s;
}
.bp-toggle-btn:hover { color: #64748b; background: #e2e8f0; }
.bp-toggle-btn.active { background: #4f46e5; color: #fff; box-shadow: 0 1px 3px rgba(79,70,229,0.3); }

/* ===== 카드형 (Grid) ===== */
.bp-gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; padding: 20px 24px;
}
.bp-gcard {
    display: block; text-decoration: none; color: inherit;
    border-radius: 10px; overflow: hidden; border: 1px solid #e8ecf1;
    transition: all 0.2s; background: #fff;
}
.bp-gcard:hover {
    border-color: #c7d2fe; box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
.bp-gcard-thumb {
    position: relative; width: 100%; aspect-ratio: 4/3;
    overflow: hidden; background: #f1f5f9;
}
.bp-gcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-gcard-nothumb {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; font-size: 36px; color: #cbd5e1;
}
.bp-gcard-thumb .badge-new { position: absolute; top: 8px; right: 8px; }
.bp-gcard-body { padding: 12px 14px; }
.bp-gcard-title {
    font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-gcard-meta { display: flex; gap: 8px; font-size: 12px; color: #94a3b8; margin-bottom: 3px; }
.bp-gcard-stats { display: flex; gap: 8px; font-size: 11px; color: #b0b8c8; }

/* ===== 리스트형 (List) ===== */
.bp-gallery-list { padding: 4px 0; }
.bp-glist-item {
    display: flex; gap: 16px; padding: 12px 24px; align-items: center;
    border-bottom: 1px solid #f1f5f9; text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.bp-glist-item:hover { background: #fafbfc; }
.bp-glist-thumb {
    width: 120px; height: 80px; border-radius: 8px; overflow: hidden;
    flex-shrink: 0; background: #f1f5f9;
}
.bp-glist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-glist-body { flex: 1; min-width: 0; }
.bp-glist-title {
    font-size: 15px; font-weight: 600; color: #334155; margin-bottom: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bp-glist-title .badge-new { margin-left: 6px; }
.bp-glist-title .cnt-comment { color: #4f46e5; font-size: 13px; margin-left: 4px; font-weight: 600; }
.bp-glist-meta { display: flex; gap: 12px; font-size: 13px; color: #94a3b8; }

/* ===== FAQ 아코디언 ===== */
.bp-faq-list { padding: 0; }
.bp-faq-item { border-bottom: 1px solid #f1f5f9; }
.bp-faq-question {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px 24px;
    background: none; border: none; cursor: pointer; font-size: 15px; text-align: left;
    color: #334155; font-weight: 500; transition: background 0.2s;
}
.bp-faq-question:hover { background: #fafbfc; }
.bp-faq-q { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #4f46e5; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.bp-faq-subject { flex: 1; }
.bp-faq-arrow { color: #94a3b8; transition: transform 0.2s; }
.bp-faq-item.open .bp-faq-arrow { transform: rotate(90deg); }
.bp-faq-answer {
    display: none; padding: 0 24px 18px 64px;
    font-size: 14px; line-height: 1.8; color: #64748b;
}
.bp-faq-item.open .bp-faq-answer { display: flex; gap: 12px; }
.bp-faq-a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.bp-faq-content { flex: 1; }

/* ===== 글쓰기 폼 ===== */
.bp-write-form { padding: 24px; }
.bp-write-group { margin-bottom: 20px; }
.bp-write-label {
    display: block; font-size: 14px; font-weight: 600; color: #334155;
    margin-bottom: 8px;
}
.bp-required { color: #ef4444; }
.bp-write-input {
    width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 14px; color: #334155; background: #fff;
    transition: border-color 0.2s; font-family: inherit;
}
.bp-write-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.bp-write-select { width: 200px; cursor: pointer; }
.bp-write-textarea { min-height: 320px; resize: vertical; line-height: 1.7; }
.bp-write-file-area {
    background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 10px;
    padding: 16px;
}
.bp-write-file-hint { font-size: 12px; color: #94a3b8; margin-bottom: 10px; }
.bp-write-file {
    display: block; width: 100%; padding: 8px; margin-bottom: 8px;
    border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px;
    background: #fff; cursor: pointer;
}
.bp-write-file::-webkit-file-upload-button {
    padding: 4px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
    background: #fff; font-size: 12px; cursor: pointer; margin-right: 8px;
}
.bp-write-file-existing {
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2e8f0;
    font-size: 13px; color: #475569;
}
.bp-write-file-item { padding: 4px 0; }
.bp-write-file-item span { color: #94a3b8; }
.bp-write-options { display: flex; gap: 16px; flex-wrap: wrap; }
.bp-write-check {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; font-size: 14px; color: #475569; transition: all 0.2s;
}
.bp-write-check:hover { border-color: #c7d2fe; background: #eef2ff; }
.bp-write-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4f46e5; }
.bp-write-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 20px; border-top: 1px solid #f1f5f9;
}

/* ===== 글보기 버튼 영역 ===== */
.bp-view-actions {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 8px; padding: 16px 24px; border-top: 1px solid #f1f5f9;
}
.bp-view-actions > div { display: flex; gap: 8px; }

/* ===== 댓글 답글 폼 ===== */
.bp-comment-reply-form {
    margin-top: 10px; padding: 12px; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 8px;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .col-num, .col-hit, .col-like, .col-cat { display: none; }
    .col-name { width: 60px; font-size: 12px; }
    .bp-table th, .bp-table td { padding: 10px 12px; }
    .bp-board-foot { flex-direction: column; gap: 12px; }
    .bp-search { width: 100%; }
    .bp-gallery-header { flex-direction: column; gap: 12px; }
    .bp-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
    .bp-glist-item { gap: 12px; padding: 10px 16px; }
    .bp-glist-thumb { width: 90px; height: 64px; }
    .bp-glist-title { font-size: 14px; }
    .bp-glist-meta { flex-wrap: wrap; gap: 6px; font-size: 12px; }
    .bp-faq-question { padding: 14px 16px; font-size: 14px; }
    .bp-faq-answer { padding-left: 16px; }
}
