/* ==========================================================================
   Content Styles - 文章/页面内容区样式
   ========================================================================== */

/* 限制文章摘要的显示行数 */
.wp-block-greenshift-blocks-container .ct-dynamic-data {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 只针对单篇文章内容里的图片 */
article.post .entry-content img {
    display: block;
    margin: 0 auto;
    max-width: 100%;   /* 移动端自适应 */
    height: auto;
    border-radius: 5px; /* 可选圆角 */
}

/* PC端限制最大宽度 */
@media(min-width: 768px) {
    article.post .entry-content img {
        max-width: 800px;  /* 文章内容最大800px */
    }
}

.entry-content li {
    line-height: 1.8;
}

/* 仅针对文章和页面的正文区域内图片最大宽度 */
.single-post .entry-content img,
.single-page .single-tool_block img {
    max-width: 100%; /* 关键：强制图片不超过屏幕宽度 */
    height: auto;    /* 关键：让高度自动适应，防止图片变形 */
    display: block;  /* 可选：消除图片下方的细微空隙 */
}

/* 内容区列表样式重置 */
.entry-content ul {
    padding-left:0;
}

.entry-content ul li {
    list-style: none;
}

/* Websager 文章推荐标题 */
.entry-content .pdp-section-title {
    font-weight: 500;
}

/* 正文普通外链样式，区别于普通文本和 Interlinks Manager 链接 */
.entry-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button),
.post-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button),
.auras-extra-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button) {
  color: #52717a;
  font-weight: 400;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(82, 113, 122, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease-in-out, text-decoration-color 0.2s ease-in-out;
}

.entry-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button):hover,
.post-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button):hover,
.auras-extra-content > :where(p, ul, ol, table, blockquote) a[href^="http"]:not([data-interlink]):not(.auras-interlink-external):not(.ws-post-rec-link):not(.wp-block-button__link):not(.button):hover {
  color: #315d6a;
  text-decoration-color: rgba(49, 93, 106, 0.75);
}

.entry-content figure.auras-lightbox-figure,
.post-content figure.auras-lightbox-figure {
  max-width: 100%;
  margin: 1.5em auto;
  text-align: center;
}

.entry-content figure.auras-lightbox-figure a,
.post-content figure.auras-lightbox-figure a {
  display: inline-block;
  cursor: zoom-in;
}

.entry-content figure.auras-lightbox-figure img,
.post-content figure.auras-lightbox-figure img {
  margin-right: auto;
  margin-left: auto;
}

.entry-content figure.auras-generated-image,
.post-content figure.auras-generated-image {
  max-width: 100%;
  margin: 1.75em auto;
  text-align: center;
}

.entry-content figure.auras-generated-image img,
.post-content figure.auras-generated-image img {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.entry-content figure.auras-generated-image figcaption,
.post-content figure.auras-generated-image figcaption {
  max-width: 760px;
  margin: 0.7em auto 0;
  color: #4f5961;
  font-size: 0.95em;
  line-height: 1.5;
  text-align: center;
}

.auras-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 15, 18, 0.86);
}

.auras-lightbox.is-open {
  display: flex;
}

.auras-lightbox img {
  max-width: min(100%, 1536px);
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  cursor: zoom-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auras-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.auras-lightbox-open {
  overflow: hidden;
}

/* Interlinks Manager 内链样式 */
.entry-content > :where(p, ul, ol, table, blockquote) a[data-interlink],
.post-content > :where(p, ul, ol, table, blockquote) a[data-interlink],
.auras-extra-content > :where(p, ul, ol, table, blockquote) a[data-interlink] {
  color: #555;
  text-decoration: none;
  border-bottom: 1px dashed rgba(85, 85, 85, 0.45);
  font-weight: normal;
  transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.entry-content > :where(p, ul, ol, table, blockquote) a[data-interlink]:hover,
.post-content > :where(p, ul, ol, table, blockquote) a[data-interlink]:hover,
.auras-extra-content > :where(p, ul, ol, table, blockquote) a[data-interlink]:hover {
  color: #0056b3;
  border-bottom-color: #0056b3;
  border-bottom-style: solid;
}

.entry-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external,
.post-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external,
.auras-extra-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external {
  color: #5f6f78;
  text-decoration: none;
  border-bottom: 1px dotted rgba(95, 111, 120, 0.75);
}

.entry-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external:hover,
.post-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external:hover,
.auras-extra-content > :where(p, ul, ol, table, blockquote) a.auras-interlink-external:hover {
  color: #3f7286;
  border-bottom-color: #3f7286;
  border-bottom-style: dotted;
}

/* [websager短代码] 推荐链接专属样式 (文本模式) */
.ws-post-rec-link {
    color: #0056b3;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px dotted #0056b3;
    margin:1.5em 0.5em;
}

.ws-post-rec-link:hover {
    color: #007bff;
    border-bottom-style: solid;
}

.entry-content > .ws-post-rec-link {
    display: block;
    max-width: 720px;
    width: fit-content;
}

/* [websager短代码] 推荐链接专属样式 (卡片模式) */
.entry-content > .ws-post-rec-card,
.entry-content > .ws-post-rec-image-card {
    max-width: 720px;
    margin: 1.5em auto;
}

/* [websager短代码] 文章页面推荐商品样式 */
.ws-product-default {
  display: block;
  margin: 15px 0;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.ws-product-default a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.ws-product-image {
  flex: 0 0 auto;
  margin-right: 15px;
}
.ws-product-default .ws-product-image img {
  width: auto;
  max-width: 120px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  border-radius: 6px;
}
.ws-product-info {
  flex: 1 1 auto;
}
.ws-product-default .ws-title {
  font-weight: bold;
  font-size: 1.1em;
  display: block;
  transition: color 0.2s ease-in-out;
}
.ws-product-default .ws-title:hover {
  color: #ce5a45;
}
.ws-product-price {
  flex: 0 0 auto;
  margin-left: 15px;
  display: flex;
  align-items: center;
}
.ws-product-default .ws-price {
  font-weight: bold;
  color: #e63946;
  white-space: nowrap;
}

/* 内容区表格样式 */
.type-post .entry-content table,
.type-post .post-content table,
.type-post .wp-block-table table,
.ba-table {
    border-collapse: collapse;
    margin: 2em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
}

.type-post .entry-content table thead th,
.type-post .post-content table thead th,
.type-post .wp-block-table table thead th,.ba-table thead th {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    text-align: left;
    border: 1px solid #0f1a25;
}

.type-post .entry-content table td,
.type-post .post-content table td,
.type-post .wp-block-table table td,.ba-table td {
    padding: 12px 16px;
    border: 1px solid #ddd;
    color: #333;
    transition: background-color 0.2s ease;
}

.type-post .entry-content table tbody tr:nth-child(even),
.type-post .post-content table tbody tr:nth-child(even),
.type-post .wp-block-table table tbody tr:nth-child(even),
.ba-table tbody tr:nth-child(even) {
    background-color: #f0f2f5;
}

.type-post .entry-content table tbody tr:hover,
.type-post .post-content table tbody tr:hover,
.type-post .wp-block-table table tbody tr:hover,
.ba-table tbody tr:hover {
    background-color: #e6f0ff;
}

/* 自定义YouTube短代码的响应式样式 */
.custom-youtube-container {
    margin:0 auto;
    text-align: center;
}

/* 表格响应式处理 */
@media screen and (max-width: 999.98px) {
    .type-post .entry-content table,
    .type-post .post-content table,
    .type-post .wp-block-table table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    .type-post .entry-content table thead th,
    .type-post .post-content table thead th,
    .type-post .wp-block-table table thead th {
        padding: 12px;
        font-size: 13px;
        border: 1px solid #0f1a25;
    }
    .type-post .entry-content table td,
    .type-post .post-content table td,
    .type-post .wp-block-table table td {
        padding: 10px 12px;
        font-size: 13px;
        border: 1px solid #ddd;
    }
}

/* 响应式调整 */
@media (max-width: 999.98px) {
  .ws-product-default a {
    flex-direction: column;
    align-items: stretch;
  }
  .ws-product-image {
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
  .ws-product-default .ws-product-image img {
    max-width: 100%; 
    max-height:500px;
    height: auto;
  }
  .ws-product-info {
    width: 100%;
    text-align: center;
  }
  .ws-product-price {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }
}
