/* 工具页「下一步推荐」卡（partials/tool-recommend.blade.php + js/tool-recommend.js） */

.tool-rec {
    max-width: 960px;
    margin: 20px auto 0;
    padding: 16px 18px 12px;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(229, 231, 235);
    border-radius: 12px;
}

.tool-rec-head {
    font-size: 15px;
    font-weight: 700;
    color: rgb(31, 41, 55);
    margin-bottom: 12px;
}

.tool-rec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tool-rec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgb(249, 250, 251);
    border: 1px solid rgb(229, 231, 235);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-rec-item:hover {
    border-color: rgb(203, 213, 225);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tool-rec-icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgb(255, 255, 255);
    border: 1px solid rgb(229, 231, 235);
    border-radius: 8px;
}

.tool-rec-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tool-rec-body b {
    font-size: 14px;
    color: rgb(31, 41, 55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-rec-body small {
    font-size: 12px;
    color: rgb(107, 114, 128);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-rec-go {
    flex: none;
    font-size: 14px;
    color: rgb(156, 163, 175);
}

.tool-rec-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: rgb(107, 114, 128);
    text-decoration: none;
}

.tool-rec-more:hover {
    color: rgb(59, 130, 246);
}

/* JS 接管后先隐藏，用户首次操作工具时显现 */
.tool-rec.tr-hidden {
    display: none;
}

.tr-fadein {
    animation: trFadeIn 0.35s ease both;
}

@keyframes trFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 深色模式：统一由导航主题开关控制 data-theme，与 tool-detail.css 约定一致 */
:root[data-theme="dark"] .tool-rec {
    background: rgb(24, 26, 32);
    border-color: rgb(48, 52, 60);
}

:root[data-theme="dark"] .tool-rec-head {
    color: rgb(229, 231, 235);
}

:root[data-theme="dark"] .tool-rec-item {
    background: rgb(30, 33, 40);
    border-color: rgb(48, 52, 60);
}

:root[data-theme="dark"] .tool-rec-item:hover {
    border-color: rgb(70, 76, 88);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .tool-rec-icon {
    background: rgb(24, 26, 32);
    border-color: rgb(48, 52, 60);
}

:root[data-theme="dark"] .tool-rec-body b {
    color: rgb(229, 231, 235);
}

:root[data-theme="dark"] .tool-rec-body small,
:root[data-theme="dark"] .tool-rec-go,
:root[data-theme="dark"] .tool-rec-more {
    color: rgb(156, 163, 175);
}

@media (max-width: 640px) {
    .tool-rec-grid {
        grid-template-columns: 1fr;
    }

    .tool-rec {
        margin-left: 12px;
        margin-right: 12px;
    }
}
