/*!
 * DX CKEditor Toolkit — 표 스타일 프리셋
 * Copyright (C) 2026 designonex [디자인원엑스]
 * DXCMS(LGPL-3.0)와 독립된 저작물입니다. LICENSE 참조.
 *
 * 에디터 안(contents.css 경유)과 프론트 본문 양쪽에서 동일하게 적용됩니다.
 */

/* ── 공통 ─────────────────────────────────────────────── */
table.dxtb {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
  font-size: .92rem;
  line-height: 1.6;
}
table.dxtb td,
table.dxtb th {
  padding: 9px 12px;
  vertical-align: middle;
  word-break: break-word;
}
table.dxtb th { font-weight: 600; text-align: left; }

/* ── 기본: 전체 테두리 ────────────────────────────────── */
table.dxtb-basic td,
table.dxtb-basic th { border: 1px solid #cbd5e1; }
table.dxtb-basic th { background: #f8fafc; }

/* ── 스펙표: 좌측 라벨열 (쇼핑몰 상품 상세용) ──────────── */
table.dxtb-spec td,
table.dxtb-spec th { border: 1px solid #e2e8f0; }
table.dxtb-spec th,
table.dxtb-spec td:first-child {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  width: 28%;
}
table.dxtb-spec td:first-child { text-align: left; }

/* ── 줄무늬 ───────────────────────────────────────────── */
table.dxtb-zebra td,
table.dxtb-zebra th { border: 1px solid #e2e8f0; }
table.dxtb-zebra th { background: #eef2ff; }
table.dxtb-zebra tr:nth-child(even) td { background: #f8fafc; }

/* ── 미니멀: 가로줄만 ─────────────────────────────────── */
table.dxtb-minimal td,
table.dxtb-minimal th {
  border: 0;
  border-bottom: 1px solid #e2e8f0;
}
table.dxtb-minimal th {
  border-bottom: 2px solid #94a3b8;
  color: #334155;
}

/* ── 강조 헤더 ────────────────────────────────────────── */
table.dxtb-bold td,
table.dxtb-bold th { border: 1px solid #cbd5e1; }
table.dxtb-bold th {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

/* ── 선 없음 ──────────────────────────────────────────── */
table.dxtb-none td,
table.dxtb-none th { border: 0; }

/* ── 셀 인라인 배경색은 프리셋보다 우선 ───────────────── */
table.dxtb td[style*="background"],
table.dxtb th[style*="background"] { background-image: none; }

/* ── 모바일: 가로 스크롤 ──────────────────────────────── */
@media (max-width: 640px) {
  table.dxtb { display: block; overflow-x: auto; white-space: nowrap; }
  table.dxtb.dxtb-spec { white-space: normal; }
}
