/*編輯器------------------------------------
------------------------------------------*/
.editstyle {
  width: 100%;
  position: relative;
  /* 橫向捲動改由 .editstyle-table-scroll 包住表格，避免拉霸出現在整區最底部 */
  overflow-x: visible;
  font-size: 1.125rem;
}

.editstyle>* {
  /* 移除強制字體大小設定，保留原始大小 */
  color: hsl(0, 2%, 11%);
}

.editstyle a {
  color: hsl(0, 2%, 11%);
  text-decoration: underline;
}

.editstyle img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 20px;
  margin-bottom: 20px;
  overflow: hidden;
}

.editstyle p {
  margin: 0.5rem 0rem;

}

.responsive-iframe {
  position: relative;
  width: 100%;
  padding-top: 75%;
  /* 4:3 Aspect Ratio */
  overflow: hidden;
  border-radius: 0.5rem;
}

.responsive-iframe iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* .editstyle ul li{
	padding-left: 20px;
	background-image: url(../img/all/dot-title.svg);
	background-repeat:no-repeat ;
	background-position:left 5px;
} */

/* 表格：由 page.js 包一層 .editstyle-table-scroll，拉霸緊貼表格下方 */
.editstyle .editstyle-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

/* 表格样式 - 统一定义 */
.editstyle table {
  display: table;
  width: max-content;
  min-width: 100%;
  font-size: 0.9rem !important;
  padding: 0;
  margin: 0;
  border-collapse: collapse;
  border: 1px solid rgba(135, 125, 115, 0.2);
  table-layout: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.editstyle td {
  display: table-cell;
  padding: 5px;
  border-top-style: none;
  border-right: 1px solid rgba(135, 125, 115, 0.2);
  border-bottom: 1px solid rgba(135, 125, 115, 0.2);
  border-left-style: none;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.editstyle th {
  display: table-cell;
  padding: 5px;
  border-right: 1px solid rgba(135, 125, 115, 0.2);
  border-bottom: 1px solid rgba(135, 125, 115, 0.2);
  vertical-align: top;
  font-weight: bold;
  background-color: rgba(224, 224, 224, 0.2);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.editstyle blockquote {
  color: hsl(0, 2%, 11%);
  font-size: 1.2rem;
  font-weight: bold;
  position: relative;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  font-style: italic;
  background: #e9e2da;
  border-radius: 6px;
}

/* 前引號 */
.editstyle blockquote:before {
  content: "“";
  font-size: 50px;
  color: var(--color-secondary);
  position: absolute;
  left: 5px;
  top: -20px;
}

/* 後引號 */
.editstyle blockquote:after {
  content: "”";
  font-size: 50px;
  color: var(--color-secondary);
  position: absolute;
  right: 5px;
  bottom: -50px;
}

.editstyle hr {
  margin: 1rem 0;
}

/* 可选：表格行样式（已注释的代码可以根据需要启用）*/
/*.editstyle tr:first-child td{
    background-color:var(--third-color);
    color: #f8f1d9;
    text-decoration: none;
    font-weight: bold;
}
.editstyle tr:nth-child(even){
    background-color: #00abda;
}
.editstyle tr:nth-child(odd){
    background-color: #00bef3;
} */

/* 列表樣式 - 確保編輯器中的 ul 和 ol 正確顯示標記 */
.editstyle ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.editstyle ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.editstyle li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.editstyle ul ul,
.editstyle ol ol,
.editstyle ul ol,
.editstyle ol ul {
  margin: 0 0 0.5rem 1.5rem;
}

.editstyle h2 {
  font-weight: bold;
  font-size: 20px;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  margin-left: 1.25rem;
  position: relative;
}

.editstyle h2::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0;
  width: 10px;
  height: 26px;
  background-color: var(--color-primary);
}