/* ======================================================================
 *  诉讼费计算器 /tools/litigation-fee
 *  依赖 home.css 全局变量 + tool-detail.css 公共类，支持黑夜模式
 * ====================================================================== */

[hidden] { display: none !important; }

.lf-layout {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}
.lf-card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.lf-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

/* ---------- 表单 ---------- */
.lf-field { margin-bottom: 14px; min-width: 0; }
.lf-field > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-sub);
    margin-bottom: 7px;
}
.lf-input-wrap { position: relative; display: flex; align-items: center; }
.lf-input {
    width: 100%;
    height: 43px;
    padding: 0 64px 0 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    -moz-appearance: textfield;
}
.lf-input::-webkit-outer-spin-button,
.lf-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lf-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.lf-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 36px;
    font-size: 13.5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}
.lf-suffix {
    position: absolute;
    right: 14px;
    font-size: 12px;
    color: var(--c-text-muted);
    pointer-events: none;
}
.lf-help {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--c-text-muted);
    margin-top: 6px;
}
.lf-help b { color: var(--c-text-sub); }

/* 费用类型切换 */
.lf-seg {
    display: flex;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}
.lf-seg button {
    flex: 1;
    height: 34px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--c-text-sub);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}
.lf-seg button.active {
    background: var(--c-bg-card);
    color: var(--c-text);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-block { width: 100%; margin-top: 8px; }

/* ---------- 结果区 ---------- */
.lf-result-card { min-height: 340px; }
.lf-result-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 320px;
    text-align: center;
    color: var(--c-text-muted);
    font-size: 13.5px;
    line-height: 1.8;
}
.lf-result-empty .emoji { font-size: 46px; opacity: 0.75; }

.lf-result-body { animation: lfFade 0.28s ease; }
@keyframes lfFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.lf-hero {
    text-align: center;
    padding: 20px 24px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--c-surface-soft), transparent);
    margin-bottom: 18px;
}
.lf-hero-label { font-size: 13px; color: var(--c-text-sub); font-weight: 700; }
.lf-hero-num {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 4px;
}
.lf-hero-num .cur { font-size: 22px; font-weight: 700; color: var(--c-text-sub); }
.lf-hero-num b { font-size: 52px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.lf-hero-sub { font-size: 12.5px; color: var(--c-text-muted); line-height: 1.7; }

/* 计算过程明细 */
.lf-detail-head {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}
.lf-detail {
    list-style: none;
    margin: 0 0 16px;
    padding: 6px 16px;
    border: 1px solid var(--c-border);
    border-radius: 14px;
    background: var(--c-surface-soft);
}
.lf-detail li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.lf-detail li + li { border-top: 1px dashed var(--c-border); }
.lf-detail .k { color: var(--c-text-muted); flex-shrink: 0; }
.lf-detail .v { font-weight: 700; text-align: right; }
.lf-detail li.total { border-top: 1px solid var(--c-border); }
.lf-detail li.total .v { color: var(--c-primary); font-size: 15px; }

/* 法规依据 */
.lf-basis {
    font-size: 12px;
    line-height: 1.8;
    color: var(--c-text-muted);
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--c-surface-soft);
    border: 1px dashed var(--c-border);
}

/* 免责与简介 */
.lf-disclaim {
    font-size: 12px;
    line-height: 1.8;
    color: var(--c-text-muted);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 40px;
}
.lf-info { margin-bottom: 24px; }
.lf-info .detail-desc { margin-top: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .lf-layout { grid-template-columns: 1fr; }
    .lf-input-card { order: 1; }
    .lf-result-card { order: 2; }
    .lf-hero-num b { font-size: 42px; }
}
