/* AI 文章摘要 — 前端卡片样式 */

/* ── 外层卡片 ─────────────────────────────────── */
.aas-summary-card {
    position: relative;
    margin: 36px 0 40px 0;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ── Header ───────────────────────────────────── */
.aas-summary-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
}

.aas-summary-card.is-open .aas-summary-header {
    padding-bottom: 0;
}

.aas-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    border: none;
    background: transparent;
    color: #555;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 0;
    will-change: transform;
    transition: color 0.3s ease;
}

.aas-summary-toggle:hover {
    color: #c0392b;
}

.aas-toggle-icon {
    flex-shrink: 0;
}

.aas-summary-card.is-open .aas-summary-toggle {
    margin-left: 0;
    color: #b80000;
}

/* ── 内容区 ───────────────────────────────────── */
.aas-summary-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 20px;
    transition:
        max-height 0.95s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.45s ease,
        padding 0.45s ease;
}

.aas-summary-card.is-open .aas-summary-body {
    max-height: 2200px;
    opacity: 1;
    padding: 10px 28px 22px;
}

/* ── 内容排版 ─────────────────────────────────── */
.aas-summary-body strong {
    font-weight: 700 !important;
}

.aas-summary-body em {
    font-style: italic !important;
}

.aas-summary-body p,
.aas-summary-body li {
    font-size: 17px;
    line-height: 1.88;
    color: #1f1f1f;
    margin: 0 0 6px 0;
}

.aas-summary-body p:last-child { margin-bottom: 0; }

.aas-summary-body h2,
.aas-summary-body h3,
.aas-summary-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 12px 0 5px 0;
}

.aas-summary-body ul,
.aas-summary-body ol,
.aas-summary-body .aas-list {
    margin: 4px 0 8px 0;
    padding-left: 1.2em;
    list-style-position: inside;
}

/* 表格 */
.aas-summary-body .aas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 6px 0;
}

.aas-summary-body .aas-table th,
.aas-summary-body .aas-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 13px;
    text-align: left;
    vertical-align: top;
    line-height: 1.65;
    color: #222;
}

.aas-summary-body .aas-table thead th {
    background: #f9f9f9;
    font-weight: 600;
    color: #111;
}

.aas-summary-body .aas-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

/* 分割线 */
.aas-summary-body .aas-hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 14px 0;
}

/* 引用块 */
.aas-summary-body .aas-blockquote {
    margin: 8px 0;
    padding: 8px 14px;
    border-left: 3px solid #e0e0e0;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

/* 删除线 */
.aas-summary-body del {
    color: #999;
}

/* 行内代码 */
.aas-summary-body code {
    background: #f3f4f6;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 14px;
    color: #c0392b;
}

/* ── 打字光标 ─────────────────────────────────── */
.aas-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #cc1111;
    border-radius: 1px;
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: aas-blink 0.55s step-end infinite;
}

@keyframes aas-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@media (max-width: 768px) {
    .aas-summary-toggle {
        font-size: 14px;
    }
}
