/* ============================================================
   css/chat/chat-life-care.css — 治愈信卡片（自杀/轻生信号 → AI 亲笔劝慰信）
   韩系 + 法式花艺 + 唯美：暖米信封、干燥玫瑰、金色细线、衬线体、零 emoji。
   花+信封 · 轻触拆开信纸 · 底部 24h 心理援助热线。
   ============================================================ */

/* 外层气泡：去掉默认聊天泡底色，让信封卡成为视觉主体 */
.life-care-bubble {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin-left: 0 !important;
    max-width: 100% !important;
}

/* ---- 信封卡主体 ---- */
.lifecare-card {
    position: relative;
    max-width: 300px;
    margin: 4px 0;
    padding: 16px 18px 12px;
    border-radius: 18px;
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(200,160,160,0.10), transparent 55%),
        radial-gradient(90% 80% at 100% 100%, rgba(196,168,106,0.10), transparent 55%),
        linear-gradient(160deg, rgba(255,252,249,0.98), rgba(249,244,238,0.98));
    border: 1px solid rgba(196,168,106,0.26);
    box-shadow: var(--shadow-xs), var(--shadow-sm), var(--shadow-glow);
    overflow: hidden;
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
    animation: lifecare-in 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
/* 角落花饰：右下角一根细藤/叶，纯装饰 */
.lifecare-card::after {
    content: '';
    position: absolute;
    right: -14px; bottom: -14px;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(196,168,106,0.22);
    box-shadow: inset 0 0 0 4px rgba(255,252,249,0.5);
    pointer-events: none;
}
@keyframes lifecare-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* ---- 顶部：花 + 信封 ---- */
.lifecare-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.lifecare-flower { color: var(--rose); width: 30px; height: 30px; display: flex; }
.lifecare-flower svg { width: 100%; height: 100%; }
.lifecare-envelope { color: var(--gold-dark); width: 26px; height: 26px; display: flex; opacity: 0.9; }
.lifecare-envelope svg { width: 100%; height: 100%; }

/* ---- 文案 ---- */
.lifecare-eyebrow {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--rose);
    opacity: 0.85;
    margin-bottom: 2px;
}
.lifecare-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.lifecare-brief {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* ---- 拆开按钮（蜡封 + 文字） ---- */
.lifecare-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: var(--rose);
    color: #fff;
    border-radius: 999px;
    padding: 9px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.24s ease;
}
.lifecare-open:hover { background: var(--rose-hover); transform: translateY(-1px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.lifecare-open:active { transform: scale(0.97); }
.lifecare-open-seal { width: 16px; height: 16px; display: flex; color: #fff; }
.lifecare-open-seal svg { width: 100%; height: 100%; }
.lifecare-open-text { letter-spacing: 0.02em; }
.lifecare-open-arrow {
    width: 6px; height: 6px;
    border-right: 1.6px solid rgba(255,255,255,0.9);
    border-bottom: 1.6px solid rgba(255,255,255,0.9);
    transform: rotate(45deg);
    transition: transform 0.24s ease;
}
.lifecare-open.opened .lifecare-open-arrow { transform: rotate(-135deg); }
.lifecare-open.opened { opacity: 0.75; }

/* ---- 展开的信纸 ---- */
.lifecare-letter {
    display: none;
    margin-top: 12px;
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.lifecare-letter.show { max-height: 640px; opacity: 1; transform: none; }
.lifecare-letter-paper {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.0)),
        linear-gradient(160deg, #FFFDFA, #FCF7F1);
    border: 1px solid rgba(196,168,106,0.18);
    border-radius: 12px;
    padding: 14px 16px 14px;
    box-shadow: var(--shadow-xs), inset 0 0 0 1px rgba(255,255,255,0.6);
    position: relative;
}
.lifecare-letter-paper::before {
    content: '';
    position: absolute;
    left: 12px; top: 10px; bottom: 10px;
    width: 1px;
    background: rgba(196,168,106,0.18);
}
.lifecare-letter-body {
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 2;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
}
.lifecare-letter-body p { margin: 0 0 0.5em; padding-left: 10px; }
.lifecare-letter-body p.lifecare-break { height: 0.4em; margin: 0; }
.lifecare-letter-sig {
    font-family: var(--font-script);
    font-size: 26px;
    color: var(--rose);
    text-align: right;
    margin-top: 6px;
    padding-right: 4px;
    opacity: 0.9;
    transform: rotate(-2deg);
}

/* ---- 底部：心理援助热线 ---- */
.lifecare-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(196,168,106,0.16);
}
.lifecare-hotline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-muted);
}
.lifecare-hotline svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--rose); }

/* ---- 暗色模式（变量自动跟随主题，这里补一下暗色下的纸感） ---- */
@media (prefers-color-scheme: dark) {
    .lifecare-card {
        background:
            radial-gradient(120% 90% at 12% 0%, rgba(200,160,160,0.14), transparent 55%),
            linear-gradient(160deg, rgba(40,35,32,0.98), rgba(32,28,26,0.98));
        border-color: rgba(196,168,106,0.24);
    }
    .lifecare-letter-paper {
        background: linear-gradient(160deg, #2C2825, #262218);
        border-color: rgba(196,168,106,0.2);
    }
    .lifecare-brief { color: #B6AEA6; }
}

/* ---- 无障碍：减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
    .lifecare-card { animation: none; }
    .lifecare-letter { transition: none; }
    .lifecare-open, .lifecare-open:hover { transition: none; }
}
