/**
 * 作図レイヤー属性テーブルのスタイル
 */

.sakuzu-attr-table-dialog {
  min-width: 400px;
}

.sakuzu-attr-table-dialog .gsi_dialog_content {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sakuzu-attr-table-container {
  overflow: auto;
  position: relative;
  flex: 1;
  min-height: 100px;
}

.sakuzu-attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.sakuzu-attr-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.sakuzu-attr-table th {
  background: #4a6fa5;
  color: #fff;
  padding: 6px 8px;
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
  border: 1px solid #3a5f95;
  cursor: pointer;
  user-select: none;
  min-width: 60px;
}

.sakuzu-attr-table th:hover {
  background: #5a7fb5;
}

.sakuzu-attr-table th .col-actions {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.7;
}

.sakuzu-attr-table th .col-actions:hover {
  opacity: 1;
}

.sakuzu-attr-table th .col-delete-btn {
  cursor: pointer;
  color: #fcc;
  font-size: 14px;
  font-weight: bold;
}

.sakuzu-attr-table th .col-delete-btn:hover {
  color: #f66;
}

.sakuzu-attr-table td {
  padding: 4px 8px;
  border: 1px solid #ddd;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sakuzu-attr-table tbody tr {
  cursor: pointer;
}

.sakuzu-attr-table tbody tr:nth-child(even) {
  background: #f8f8f8;
}

.sakuzu-attr-table tbody tr:hover {
  background: #e8f0ff;
}

.sakuzu-attr-table tbody tr.selected {
  background: #d0e0ff;
}

.sakuzu-attr-table td.editing {
  padding: 0;
}

.sakuzu-attr-table td.editing input {
  width: 100%;
  padding: 4px 8px;
  border: 2px solid #4a6fa5;
  outline: none;
  font-size: 12px;
  box-sizing: border-box;
}

.sakuzu-attr-table th.editing {
  padding: 0;
}

.sakuzu-attr-table th.editing input {
  width: 100%;
  padding: 6px 8px;
  border: 2px solid #fff;
  outline: none;
  font-size: 12px;
  box-sizing: border-box;
  background: #5a7fb5;
  color: #fff;
}

.sakuzu-attr-table-empty {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

.sakuzu-attr-table-toolbar {
  padding: 4px 8px;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sakuzu-attr-table-toolbar .feature-count {
  color: #666;
}

.sakuzu-attr-table-toolbar .toolbar-buttons {
  display: flex;
  gap: 4px;
}

.sakuzu-attr-table-toolbar .toolbar-btn {
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}

.sakuzu-attr-table-toolbar .toolbar-btn:hover {
  background: #e8e8e8;
}

/* 行削除ボタン */
.row-delete-col-header {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  padding: 2px !important;
}

.row-delete-cell {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  text-align: center;
  padding: 2px !important;
}

.row-delete-btn {
  cursor: pointer;
  color: #c66;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.row-delete-btn:hover {
  color: #e33;
}

/* 検索・置換バー */
.sakuzu-attr-search-bar {
  padding: 4px 8px;
  background: #f8f8e8;
  border-bottom: 1px solid #ddd;
  font-size: 12px;
}

.sakuzu-attr-search-bar .search-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.sakuzu-attr-search-bar .search-row:last-child {
  margin-bottom: 0;
}

.sakuzu-attr-search-bar .search-input {
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 12px;
  width: 180px;
}

.sakuzu-attr-search-bar .search-btn {
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}

.sakuzu-attr-search-bar .search-btn:hover {
  background: #e8e8e8;
}

.sakuzu-attr-search-bar .search-result {
  color: #666;
  font-size: 11px;
  margin-left: 4px;
}

/* 検索ハイライト */
.sakuzu-attr-table td.search-highlight {
  background: #ff0 !important;
  outline: 2px solid #f90;
}

/* ページネーション */
.sakuzu-attr-pagination {
  padding: 6px 8px;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.sakuzu-attr-pagination .pagination-btn {
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}

.sakuzu-attr-pagination .pagination-btn:hover:not([disabled]) {
  background: #e8e8e8;
}

.sakuzu-attr-pagination .pagination-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.sakuzu-attr-pagination .pagination-info {
  color: #555;
}
