/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* 설계기준 HTML 표 스타일 (AI 파싱 결과) */
.codedocs-content table.codedocs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.codedocs-content table.codedocs-table th,
.codedocs-content table.codedocs-table td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.codedocs-content table.codedocs-table thead th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.codedocs-content table.codedocs-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.codedocs-content table.codedocs-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* 미리보기 패널의 HTML 표 (에디터) */
table.codedocs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.5;
}

table.codedocs-table th,
table.codedocs-table td {
  border: 1px solid #e2e8f0;
  padding: 0.375rem 0.625rem;
  text-align: left;
  vertical-align: top;
}

table.codedocs-table thead th {
  background-color: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

/* 테이블 그리드 에디터 — 셀 선택 */
td.selected, th.selected {
  outline: 2px solid #0d9488 !important;
  outline-offset: -2px;
  background-color: #ccfbf1 !important;
}

/* ═══ 비주얼 편집 모드 ═══ */
.codedocs-visual-editor .visual-article {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e40af;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid #dbeafe;
  outline: none;
  cursor: text;
}

.codedocs-visual-editor .visual-paragraph {
  padding-left: 0.75rem;
  border-left: 2px solid #7dd3fc;
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #374151;
  outline: none;
  cursor: text;
}

.codedocs-visual-editor .visual-item {
  padding-left: 2rem;
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0.125rem 0;
  outline: none;
  cursor: text;
}

.codedocs-visual-editor .visual-subitem {
  padding-left: 3.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0.125rem 0;
  outline: none;
  cursor: text;
}

.codedocs-visual-editor .visual-text {
  font-size: 0.875rem;
  color: #4b5563;
  margin: 0.125rem 0;
  outline: none;
  cursor: text;
}

.codedocs-visual-editor .visual-blank {
  height: 0.5rem;
}

.codedocs-visual-editor [contenteditable]:focus {
  background-color: #eff6ff;
  border-radius: 0.25rem;
}

.codedocs-visual-editor .visual-table-wrapper {
  margin: 0.75rem 0;
  overflow-x: auto;
}

.codedocs-visual-editor .visual-editable-table td:focus,
.codedocs-visual-editor .visual-editable-table th:focus {
  background-color: #f0fdfa;
  outline: 2px solid #14b8a6;
  outline-offset: -2px;
}
