
/* Source: well_forum/views/css/thread_detail.css */
/**
 * WellCMS Forum Thread Detail Page Styles
 * Extracted from forum_thread_detail.htm
 * Generated: 2026-04-03
 */

/* ============================================
   CSS Variables & Theme Configuration
   ============================================ */

:root {
    --well-primary: #2562eb;
    --well-primary-glow: rgba(37, 98, 235, 0.15);
    --well-secondary: #00e5ff;
    --well-surface: rgba(255, 255, 255, 0.8);
    --well-border: rgba(0, 0, 0, 0.05);
    --dark-bg: #0b0e14;
    --dark-card: #161b22;
    --dark-border: #30363d;
}

.dark {
    --well-surface: rgba(22, 27, 34, 0.8);
    --well-border: rgba(48, 54, 61, 0.5);
}

/* 与文章楼中楼一致，仅设置左侧细边条。 */
#replies-section .forum-sub-replies {
    border-width: 0;
    border-left: 1px solid #dbeafe;
}

.dark #replies-section .forum-sub-replies {
    border-left-color: rgba(255, 255, 255, 0.45);
}

/* ============================================
   Glass Morphism Effects
   ============================================ */

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.dark .glass {
    background: rgba(11, 14, 20, 0.8);
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

/* ============================================
   RTE Editor Styles
   ============================================ */

.well-rte-container:focus-within {
    box-shadow: 0 0 0 4px var(--well-primary-glow);
    border-color: var(--well-primary);
}

/* ============================================
   Animations
   ============================================ */

@keyframes topic-in {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-in {
    animation: topic-in 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fade-out-right {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.fade-out-right {
    animation: fade-out-right 0.5s ease forwards;
    pointer-events: none;
}

@keyframes highlight-flash {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(37, 98, 235, 0.1);
    }
}

.highlight-flash {
    animation: highlight-flash 2s ease;
}

/* ============================================
   Custom Scrollbar
   ============================================ */

.custom-scrollbar::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   Thread Content Styling
   ============================================ */

.thread-content img {
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    margin: 1.5rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    overflow-wrap: break-word;
    min-height: 2.5rem;
    background: var(--well-bg-muted, #f3f4f6);
    border: 1px solid var(--well-border);
}

.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.post-content img {
    border-radius: 1rem;
    margin: 1.5rem auto;
    display: block;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    overflow-wrap: break-word;
    min-height: 2.5rem;
    background: var(--well-bg-muted, #f3f4f6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Keep inline-block behavior for images inside editor-generated center-aligned paragraphs */
.thread-content p[style*="text-align:center"] img,
.post-content p[style*="text-align:center"] img {
    display: inline-block;
    margin-left: 0;
    margin-right: 0;
    vertical-align: middle;
}

/* ============================================
   Mobile Action Bar
   ============================================ */

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-action-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--well-border);
}

.dark .mobile-action-bar {
    background: rgba(15, 23, 42, 0.85);
}

/* ============================================
   Analytics Dashboard (Sidebar)
   ============================================ */

.gauge-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.05);
    stroke-width: 12;
    stroke-linecap: round;
}

.dark .gauge-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.gauge-fill {
    fill: none;
    stroke: url(#gauge-gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.metric-tick-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.dark .metric-tick-bar {
    background: rgba(255, 255, 255, 0.03);
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #2562eb, #00e5ff);
    border-radius: 3px;
}

.metric-ticks {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, transparent 19%, rgba(0, 0, 0, 0.05) 20%);
    background-size: 25% 100%;
}

.dark .metric-ticks {
    background-image: linear-gradient(90deg, transparent 19%, rgba(255, 255, 255, 0.05) 20%);
}

/* ============================================
   Floor-in-Floor (Sub-replies)
   ============================================ */

.sub-reply-box {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--well-primary);
}

.dark .sub-reply-box {
    background: rgba(255, 255, 255, 0.03);
}

.sub-reply-item {
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.75rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.highlight-new {
    background-color: rgba(37, 98, 235, 0.15) !important;
}

.dark .highlight-new {
    background-color: rgba(37, 98, 235, 0.25) !important;
}

/* ============================================
   Interactive Elements
   ============================================ */

.thread-interact-container button,
.reply-interact-container button {
    cursor: pointer;
}

.thread-interact-container button:disabled,
.reply-interact-container button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Like button active state */
.thread-interact-container button.active-state svg,
.reply-interact-container button.active-state svg {
    transform: scale(1.1);
}

/* ============================================
   Utility Classes
   ============================================ */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── 图片点击放大提示 ───────────────────────────── */
.thread-content img,
.post-content img,
.sub-reply-content img,
.message-content img,
img[data-well-img="1"],
img[data-lightbox] {
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}
.thread-content img:hover,
.post-content img:hover,
.sub-reply-content img:hover,
.message-content img:hover,
img[data-well-img="1"]:hover,
img[data-lightbox]:hover {
    opacity: 0.92;
}

/* ── 内容区域溢出安全防护 ────────────────────── */
.post-content,
.thread-content,
.sub-reply-content,
.message-content {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ── 约束用户内容中 inline width 元素，防止溢出屏幕 ────────────────────── */
.post-content [style*="width"],
.thread-content [style*="width"],
.sub-reply-content [style*="width"],
.message-content [style*="width"],
.post-content [width],
.thread-content [width],
.sub-reply-content [width],
.message-content [width] {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ── 兜底：内容区所有后代元素最大宽度不超过容器 ────────────────────── */
.post-content *,
.thread-content *,
.sub-reply-content *,
.message-content * {
    max-width: 100%;
}

/* ── 表格、代码块等宽内容单独可滚动，避免撑开页面 ────────────────────── */
.post-content table,
.thread-content table,
.sub-reply-content table,
.message-content table {
    display: block;
    width: max-content;
    max-width: 100% !important;
    overflow-x: auto;
}

/* ── 兜底：若 JS/服务端未包裹，带 inline width 的表格强制自适应容器 ─────────── */
.post-content table[style*="width"],
.thread-content table[style*="width"],
.sub-reply-content table[style*="width"],
.message-content table[style*="width"] {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}
.post-content table[style*="width"] td,
.thread-content table[style*="width"] td,
.sub-reply-content table[style*="width"] td,
.message-content table[style*="width"] td,
.post-content table[style*="width"] th,
.thread-content table[style*="width"] th,
.sub-reply-content table[style*="width"] th,
.message-content table[style*="width"] th {
    word-break: break-word !important;
}

.post-content pre,
.thread-content pre,
.sub-reply-content pre,
.message-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

/* ── JS 包裹表格后的滚动容器 ────────────────────── */
.wellcms-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}
.wellcms-table-wrap table {
    width: auto;
    max-width: none;
}

/* ── 主帖内层内容包装容器 ────────────────────── */
.thread-content-inner {
    overflow: hidden;
    overflow-wrap: break-word;
    min-width: 0;
}

/* ── 破裂图片占位符 ──────────────────────────── */
.img-broken {
    min-height: 4rem;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem auto;
    max-width: 100%;
    color: #9ca3af;
    font-size: 0.875rem;
    overflow: hidden;
    box-sizing: border-box;
    padding: 1rem;
}
.dark .img-broken {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.3);
}
.img-broken__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

