/**
 * AI 出图 / 出视频 · 统一合规说明（h5/_tool_ai_media_legal.php）
 * 与 h5-tool-layout-unify 同用 html body 前缀，避免被各页工具样式盖掉。
 */

html body .lh-tool-ai-legal {
    margin: 14px 0 22px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

html body .lh-tool-ai-legal__before {
    margin: 0 0 12px !important;
}

html body .lh-tool-ai-legal__before .ps-foot-note,
html body .lh-tool-ai-legal__before .i2v-foot-note,
html body .lh-tool-ai-legal__before .dwp-foot-note {
    margin-bottom: 0 !important;
}

html body .lh-tool-ai-legal__box {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    padding: 14px 16px 16px !important;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 42%, #f1f5f9 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.14) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 8px 28px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(99, 102, 241, 0.05) !important;
}

html body .lh-tool-ai-legal__box::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 52%, #a855f7 100%) !important;
    opacity: 0.95 !important;
}

html body .lh-tool-ai-legal__box--compact {
    padding: 12px 14px 14px !important;
    border-radius: 14px !important;
}

html body .lh-tool-ai-legal__head {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 0 12px !important;
    padding-bottom: 2px !important;
}

html body .lh-tool-ai-legal__ico-wrap {
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 55%, #c7d2fe 100%) !important;
    color: #4338ca !important;
    font-size: 17px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 4px 12px rgba(67, 56, 202, 0.15) !important;
}

html body .lh-tool-ai-legal__head-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding-top: 1px !important;
}

html body .lh-tool-ai-legal__head-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    color: #0f172a !important;
    line-height: 1.35 !important;
}

html body .lh-tool-ai-legal__head-hint {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.45 !important;
}

html body .lh-tool-ai-legal__compact-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 0 10px !important;
    padding: 4px 10px 4px 8px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    color: #4338ca !important;
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.18) !important;
}

html body .lh-tool-ai-legal__compact-badge::before {
    content: "" !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    flex-shrink: 0 !important;
}

html body .lh-tool-ai-legal__body {
    margin: 0 !important;
    padding: 0 !important;
}

html body .lh-tool-ai-legal__p {
    margin: 0 0 10px !important;
    font-size: 12.5px !important;
    line-height: 1.68 !important;
    color: #334155 !important;
    text-align: justify !important;
    text-justify: inter-ideograph !important;
}

html body .lh-tool-ai-legal__body .lh-tool-ai-legal__p:last-child {
    margin-bottom: 0 !important;
}

html body .lh-tool-ai-legal__p strong {
    color: #1e293b !important;
    font-weight: 700 !important;
}

html body .lh-tool-ai-legal__a {
    color: #2563eb !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(37, 99, 235, 0.28) !important;
    padding-bottom: 1px !important;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease !important;
}

html body .lh-tool-ai-legal__a:hover {
    color: #1d4ed8 !important;
    border-bottom-color: rgba(29, 78, 216, 0.55) !important;
}

html body .lh-tool-ai-legal__a:active {
    opacity: 0.82 !important;
}

html body .lh-tool-ai-legal__foot {
    margin: 12px 0 0 !important;
    padding: 11px 0 0 !important;
    border-top: 1px dashed rgba(148, 163, 184, 0.55) !important;
}

html body .lh-tool-ai-legal__box--compact .lh-tool-ai-legal__foot {
    margin-top: 10px !important;
    padding-top: 10px !important;
}

html body .lh-tool-ai-legal__muted {
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.58 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    text-align: justify !important;
    text-justify: inter-ideograph !important;
}

html body .lh-tool-ai-legal__warn-dot {
    flex-shrink: 0 !important;
    width: 7px !important;
    height: 7px !important;
    margin-top: 5px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important;
}

html body .lh-tool-ai-legal__muted-txt {
    flex: 1 !important;
    min-width: 0 !important;
}

/* 深色外观（与 index data-h5-appearance 一致） */
html[data-h5-appearance="dark"] body .lh-tool-ai-legal__box {
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #0b1220 100%) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 10px 36px rgba(0, 0, 0, 0.35) !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__head-title {
    color: #f1f5f9 !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__head-hint {
    color: #94a3b8 !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__ico-wrap {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.35) 0%, rgba(79, 70, 229, 0.45) 100%) !important;
    color: #e0e7ff !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__p {
    color: #cbd5e1 !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__p strong {
    color: #f8fafc !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__a {
    color: #93c5fd !important;
    border-bottom-color: rgba(147, 197, 253, 0.35) !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__muted {
    color: #94a3b8 !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__compact-badge {
    color: #c7d2fe !important;
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: rgba(129, 140, 248, 0.28) !important;
}

html[data-h5-appearance="dark"] body .lh-tool-ai-legal__foot {
    border-top-color: rgba(148, 163, 184, 0.28) !important;
}

/* 底部固定操作条内：占满宽度避免挤压变形 */
html body .piv-dock .lh-tool-ai-legal {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
}

html body .piv-dock .lh-tool-ai-legal__box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
