/* PEST 分析工具面板 */

.pest-tool-panel {

    display: flex;

    flex-direction: column;

    background: var(--bg-card);

    border: 1px solid var(--border-color);

    border-radius: var(--radius-xl);

    overflow: hidden;

    min-height: 0;

}



.pest-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 10px 16px;

    border-bottom: 1px solid var(--border-color);

    background: var(--bg-muted, #f9fafb);

    flex-shrink: 0;

}



.pest-toolbar-left {

    display: flex;

    align-items: center;

    gap: 8px;

}



.pest-title {

    font-size: 0.9rem;

    font-weight: 600;

    color: var(--text-primary);

    display: flex;

    align-items: center;

    gap: 6px;

}



.pest-title i { color: #6366f1; }



.pest-badge {

    font-size: 0.68rem;

    font-weight: 600;

    padding: 2px 7px;

    border-radius: 10px;

    background: rgba(99, 102, 241, 0.1);

    color: #6366f1;

}



.pest-toolbar-right {

    display: flex;

    align-items: center;

    gap: 6px;

}



.pest-btn {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    padding: 5px 10px;

    font-size: 0.78rem;

    font-weight: 500;

    border: 1px solid var(--border-color);

    border-radius: var(--radius-md);

    background: var(--bg-card);

    color: var(--text-secondary);

    cursor: pointer;

    transition: all 0.15s;

}



.pest-btn:hover {

    border-color: #6366f1;

    color: #6366f1;

}



.pest-btn-primary {

    background: linear-gradient(135deg, #6366f1, #8b5cf6);

    border-color: transparent;

    color: #fff !important;

}



.pest-btn-primary:hover {

    opacity: 0.88;

    border-color: transparent !important;

}



.pest-canvas-wrap {

    flex: 1;

    overflow: auto;

    padding: 20px 16px;

    background-color: #f8fafc;

    background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);

    background-size: 24px 24px;

    min-height: 520px;

}



.pest-board {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 16px;

    max-width: 1100px;

    min-width: 760px;

    margin: 0 auto;

    align-items: stretch;

}



/* 单列：图标 → 标题 → 内容 */

.pest-column {

    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 0;

    min-width: 0;

}



.pest-icon-wrap {

    width: 52px;

    height: 52px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0 auto 12px;

    font-size: 1.35rem;

    color: #fff;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);

    flex-shrink: 0;

}



.pest-icon-political      { background: linear-gradient(135deg, #4338ca, #6366f1); }

.pest-icon-economic       { background: linear-gradient(135deg, #9333ea, #c026d3); }

.pest-icon-social         { background: linear-gradient(135deg, #2563eb, #60a5fa); }

.pest-icon-technological  { background: linear-gradient(135deg, #0891b2, #22d3ee); }



.pest-header {

    padding: 10px 14px;

    font-size: 0.82rem;

    font-weight: 700;

    color: #fff;

    text-align: center;

    outline: none;

    cursor: text;

    word-break: break-word;

    flex-shrink: 0;

}



.pest-header-political      { background: #4338ca; }

.pest-header-economic       { background: #9333ea; }

.pest-header-social         { background: #2563eb; }

.pest-header-technological  { background: #0891b2; }



.pest-header:empty::before {

    content: '点击输入标题…';

    color: rgba(255, 255, 255, 0.65);

}



.pest-header:focus {

    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);

}



.pest-content {

    flex: 1;

    min-height: 280px;

    padding: 14px 16px;

    font-size: 0.78rem;

    line-height: 1.65;

    color: #334155;

    background: #fff;

    outline: none;

    cursor: text;

    word-break: break-word;

    white-space: pre-wrap;

    border: 2px solid transparent;

    border-top: none;

}



.pest-content-political      { border-color: #4338ca; }

.pest-content-economic       { border-color: #9333ea; }

.pest-content-social         { border-color: #2563eb; }

.pest-content-technological  { border-color: #0891b2; }



.pest-content:empty::before {

    content: '点击输入分析内容…';

    color: #94a3b8;

}



.pest-content-political:focus      { box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.2); }

.pest-content-economic:focus       { box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2); }

.pest-content-social:focus         { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }

.pest-content-technological:focus  { box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2); }


@media (max-width: 900px) {

    .pest-board {

        min-width: 720px;

        gap: 12px;

    }



    .pest-icon-wrap {

        width: 44px;

        height: 44px;

        font-size: 1.15rem;

    }



    .pest-content {

        min-height: 240px;

        padding: 12px;

        font-size: 0.75rem;

    }

}


