/* benchmark 게시판 스킨 — 전용 스타일
   mb-* 클래스는 main_board/style.css 에서 로드됨 (중복 정의 금지)
*/

/* ── 탭 + 정렬 바 */
.bm-pills-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px 0;
}
.bm-pills-bar .mb-pills {
    margin: 0;
    flex: 1;
}
.bm-pill-cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 11px;
    font-weight: 700;
}
.mb-pill.is-active .bm-pill-cnt {
    background: rgba(124, 58, 237, .2);
    color: #5b21b6;
}

/* ── 정렬 선택기 */
.bm-sort-form {
    flex-shrink: 0;
}
.bm-sort-select {
    height: 34px !important;
    min-width: 120px;
    border-radius: 999px !important;
}

/* ── 리스트 테이블 */
.bm-table-wrap {
    overflow-x: auto;
    margin: 0 0 6px 0;
}
.bm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}
.bm-table thead {
    background: #f9fafb;
}
.bm-table th {
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 800;
    color: #374151;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.bm-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    vertical-align: middle;
}
.bm-table tr:last-child td {
    border-bottom: none;
}
.bm-table tbody tr:hover {
    background: #fafbff;
}

/* 컬럼 너비 */
.bm-th-rank  { width: 60px;  text-align: center; }
.bm-th-score { width: 130px; text-align: right; }
.bm-th-value { width: 90px;  text-align: right; }
.bm-th-price { width: 100px; text-align: right; }
.bm-th-src   { width: 90px;  text-align: center; }

.bm-td-rank  { text-align: center; color: #6b7280; font-size: 13px; font-weight: 700; }
.bm-td-score { text-align: right;  font-weight: 900; color: #111827; }
.bm-td-value { text-align: right;  color: #374151; }
.bm-td-price { text-align: right;  color: #374151; }
.bm-td-src   { text-align: center; font-size: 11px; color: #6b7280; }

/* ── 제품 셀 */
.bm-prod {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bm-prod-link {
    color: #111827;
    font-weight: 600;
    text-decoration: none;
}
.bm-prod-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}
.bm-ext-link {
    color: #9ca3af;
    font-size: 12px;
    text-decoration: none;
    flex-shrink: 0;
}
.bm-ext-link:hover {
    color: #7c3aed;
}
.bm-brand-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* ── 부품 타입 배지 */
.bm-type-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

/* ── 빈 상태 */
.bm-empty {
    padding: 80px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* ── 뷰 카드 */
.bm-view-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 0 16px 0;
}
.bm-view-head {
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.bm-view-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px 0;
}
.bm-view-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}
.bm-view-brand {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px 0;
}
.bm-view-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.bm-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1px;
    background: #f1f5f9;
    border-top: 1px solid #e5e7eb;
}
.bm-kv-item {
    background: #fff;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bm-kv-key {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.bm-kv-val {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
.bm-score-num {
    font-size: 24px;
    font-weight: 900;
    color: #7c3aed;
}
.bm-view-memo {
    padding: 18px 24px;
    border-top: 1px solid #f1f5f9;
}
.bm-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #374151;
    margin: 0 0 10px 0;
}
.bm-memo-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.7;
}

/* ── 등록/수정 폼 */
.bm-write-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bm-write-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
}
.bm-write-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.bm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bm-field-full {
    grid-column: 1 / -1;
}
.bm-field-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}
.bm-required::after {
    content: ' *';
    color: #ef4444;
}
.bm-memo-textarea {
    min-height: 120px;
    resize: vertical;
}
@media (max-width: 640px) {
    .bm-write-grid { grid-template-columns: 1fr; }
}

/* ── 페이지네이션 */
.pcest-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.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;
    text-decoration: none;
}
.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;
}

/* ══════════════════════════════════════════════════════
   성능 비교 패널
══════════════════════════════════════════════════════ */
.bm-compare-panel {
    background: linear-gradient(135deg, #fafbff 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(124, 58, 237, .07);
}

/* ── 헤더 */
.bm-compare-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 22px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(90deg, rgba(124,58,237,.04) 0%, transparent 60%);
}
.bm-compare-hd-left  { display: flex; align-items: center; gap: 8px; }
.bm-compare-hd-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bm-cmp-icon { font-size: 18px; line-height: 1; }
.bm-cmp-ttl  { font-weight: 800; font-size: 15px; color: #111827; }

/* ── 부품군 선택 pills */
.bm-cmp-part-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-cmp-pp {
    height: 28px; padding: 0 13px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff; color: #374151;
    font-size: 12px; font-weight: 700;
    cursor: pointer; transition: all .15s;
    line-height: 1;
}
.bm-cmp-pp:hover { border-color: #7c3aed; color: #7c3aed; }
.bm-cmp-pp.is-active { background: #7c3aed; border-color: #7c3aed; color: #fff; }

/* ── 접기 버튼 */
.bm-cmp-collapse {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff; color: #6b7280;
    font-size: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
}
.bm-cmp-collapse:hover { border-color: #7c3aed; color: #7c3aed; }

/* ── 바디 */
.bm-compare-bd { padding: 22px; }

/* ── A/B 선택기 행 */
.bm-cmp-selectors {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 0;
}
.bm-cmp-side {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.bm-cmp-side-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    font-size: 11px; font-weight: 900; color: #fff;
    flex-shrink: 0;
}
.bm-cmp-lbl-a { background: #7c3aed; }
.bm-cmp-lbl-b { background: #2563eb; }

.bm-cmp-search {
    width: 100%; height: 36px;
    padding: 0 12px; box-sizing: border-box;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; outline: none; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.bm-cmp-search:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}
.bm-cmp-search:disabled { background: #f9fafb; color: #9ca3af; }

.bm-cmp-select {
    width: 100%; height: 42px;
    padding: 0 12px; box-sizing: border-box;
    border: 1px solid #e5e7eb; border-radius: 10px;
    font-size: 13px; background: #fff; outline: none;
    cursor: pointer; transition: border-color .15s;
}
.bm-cmp-select:focus   { border-color: #7c3aed; }
.bm-cmp-select:disabled { background: #f9fafb; color: #9ca3af; cursor: default; }

.bm-cmp-vs-badge {
    flex-shrink: 0;
    font-weight: 900; font-size: 15px; color: #d1d5db;
    letter-spacing: .05em;
    padding-bottom: 12px;   /* select 기준 수직 정렬 */
}

/* ── 비교 결과 영역 */
.bm-cmp-result {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
    animation: bm-fadein .28s ease;
}
@keyframes bm-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── 카드 2개 나란히 */
.bm-cmp-cards {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.bm-cmp-card {
    flex: 1; min-width: 0;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 20px;
    transition: border-color .2s, box-shadow .2s;
}
.bm-cmp-card-a.bm-cmp-winner {
    border-color: #7c3aed;
    box-shadow: 0 4px 24px rgba(124,58,237,.13);
}
.bm-cmp-card-b.bm-cmp-winner {
    border-color: #2563eb;
    box-shadow: 0 4px 24px rgba(37,99,235,.11);
}

/* 카드 헤더 */
.bm-cmp-card-hd {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
}
.bm-cmp-card-lbl {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    font-size: 10px; font-weight: 900; color: #fff; flex-shrink: 0;
}

/* 승리 배지 */
.bm-win-badge {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 9px;
    border-radius: 999px;
    font-size: 10px; font-weight: 800; color: #fff;
}
.bm-cmp-card-a .bm-win-badge { background: linear-gradient(90deg, #7c3aed, #4f46e5); }
.bm-cmp-card-b .bm-win-badge { background: linear-gradient(90deg, #2563eb, #1d4ed8); }

/* 제품명 / 브랜드 */
.bm-cmp-prod-nm {
    font-size: 14px; font-weight: 800; color: #111827;
    margin-bottom: 2px; word-break: break-word; line-height: 1.35;
}
.bm-cmp-prod-br { font-size: 12px; color: #6b7280; margin-bottom: 14px; }

/* 지표 */
.bm-cmp-metrics  { display: flex; flex-direction: column; gap: 13px; }
.bm-cmp-mk {
    font-size: 10px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px;
}
.bm-cmp-mv  { font-size: 18px; font-weight: 900; color: #374151; }
.bm-cmp-win { color: #059669; }      /* 이 지표 승리 → 초록 */
.bm-trophy  { font-size: 13px; }

/* 점수 막대 */
.bm-cmp-bar-wrap {
    height: 6px; border-radius: 999px;
    background: #f3f4f6; overflow: hidden;
    margin-top: 7px;
}
.bm-cmp-bar {
    height: 100%; border-radius: 999px;
    transition: width .55s cubic-bezier(.22,1,.36,1);
    min-width: 4px;
}
.bm-cmp-card-a .bm-cmp-bar { background: linear-gradient(90deg, #7c3aed, #6d28d9); }
.bm-cmp-card-b .bm-cmp-bar { background: linear-gradient(90deg, #2563eb, #1d4ed8); }

/* VS 구분선 */
.bm-cmp-vs-sep {
    flex-shrink: 0; width: 36px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 13px; color: #d1d5db;
}

/* ══════════════════════════════════════════════════════
   반응형
══════════════════════════════════════════════════════ */
/* ── 반응형 */
@media (max-width: 860px) {
    .bm-table .bm-th-value,
    .bm-table .bm-td-value,
    .bm-table .bm-th-src,
    .bm-table .bm-td-src {
        display: none;
    }
    .bm-kv-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 540px) {
    .bm-table .bm-th-price,
    .bm-table .bm-td-price {
        display: none;
    }
    .bm-pills-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .bm-cmp-selectors   { flex-direction: column; gap: 12px; }
    .bm-cmp-vs-badge    { padding-bottom: 0; align-self: center; }
    .bm-cmp-cards       { flex-direction: column; }
    .bm-cmp-vs-sep      { width: 100%; padding: 6px 0; }
    .bm-compare-hd      { flex-direction: column; align-items: flex-start; }
    .bm-compare-bd      { padding: 16px; }
}
