/* public/assets/css/network/ip-calculator.css */

.ipc-icon { width: 1.2em; height: 1.2em; vertical-align: -0.2em; display: inline-block; }

/* 顶级容器已配置 minmax(0, 1fr) 防溢出 */
.ipc-workspace { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; width: 100%; box-sizing: border-box;}
.ipc-control-panel, .ipc-preview-panel { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); box-sizing: border-box; min-width: 0;}
.ipc-preview-panel { position: sticky; top: 24px; z-index: 10; min-height: 400px;}

/* Tabs */
.ipc-tabs-nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; background: transparent;}
.ipc-tab-btn { flex: 1; padding: 14px; cursor: pointer; border-radius: 10px; font-weight: 700; font-size: 0.95rem; color: var(--text-muted); transition: 0.3s; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-color); background: var(--bg-body);}
.ipc-tab-btn.active { background: rgba(var(--primary-rgb, 0, 102, 204), 0.08); border-color: var(--primary-color); color: var(--primary-color); }
.ipc-tab-content { display: none; }
.ipc-tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0; transform:translateY(5px);} to{opacity:1; transform:translateY(0);} }

/* Forms */
.ipc-input-group { display: flex; flex-direction: column; gap: 8px; }
.ipc-input-row { display: flex; gap: 12px; }
.ipc-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ipc-input-group label, .ipc-input-wrap label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }

.ipc-input-text, .ipc-select { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-body); color: var(--text-main); font-size: 1rem; font-family: monospace; transition: 0.2s; outline: none; box-sizing: border-box;}
.ipc-input-text:focus, .ipc-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(var(--primary-rgb, 0, 102, 204), 0.1); }
.ipc-select { font-family: inherit; font-weight: 600; cursor: pointer; }

.ipc-btn-primary { background: var(--primary-color); color: white; padding: 14px; border: none; border-radius: 10px; font-size: 1.05rem; font-weight: 800; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 6px rgba(0, 102, 204, 0.2); width: 100%; box-sizing: border-box;}
.ipc-btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 102, 204, 0.3);}

.ipc-info-box { padding: 12px; background: rgba(0,0,0,0.02); border-radius: 8px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;}


/* =========================================================
   Result Panel (终极防爆修复版)
   ========================================================= */

/* 防爆锁 1：Grid 容器强制 minmax(0, 1fr) */
.ipc-result-container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; }

.ipc-empty-state { text-align: center; color: var(--text-muted); font-size: 0.9rem; padding: 40px 20px; font-style: italic; background: var(--bg-body); border-radius: 12px; border: 1px dashed var(--border-color);}

/* 防爆锁 2：Card 容器强制 min-width: 0 配合 width: 100% */
.ipc-result-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; background: var(--bg-body); padding: 16px; padding-right: 50px; border-radius: 10px; border: 1px solid var(--border-color); transition: 0.2s; min-width: 0; width: 100%; box-sizing: border-box;}
.ipc-result-card:hover { border-color: var(--primary-color); transform: translateX(4px);}

/* 上方：名称 */
.ipc-rc-label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); width: 100%; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}

/* 防爆锁 3：数据文本层强制 display: block 配合 max-width: 100% 和 min-width: 0 */
.ipc-rc-value { display: block; font-family: monospace; font-size: 1.15rem; font-weight: 700; color: var(--text-main); text-align: left; width: 100%; max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;}

/* 复制按钮 */
.ipc-rc-copy { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: 0.2s;}
.ipc-rc-copy svg { width: 18px; height: 18px; }
.ipc-rc-copy:hover { color: var(--primary-color); background: rgba(var(--primary-rgb, 0, 102, 204), 0.1); }


/* Theme Dark */
[data-theme="dark"] .ipc-tab-btn { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .ipc-tab-btn.active { background: rgba(59, 130, 246, 0.1); }
[data-theme="dark"] .ipc-input-text, [data-theme="dark"] .ipc-select { background: #0f172a; border-color: #334155; color: #f8fafc;}
[data-theme="dark"] .ipc-result-card, [data-theme="dark"] .ipc-empty-state, [data-theme="dark"] .ipc-info-box { background: #0f172a; border-color: #334155; }

/* SEO Cards */
.tool-seo-content { margin-top: 50px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; }
.tool-seo-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 30px; color: var(--text-main); text-align: center; }
.seo-feature-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.seo-feature-card { background: var(--bg-body); border: 1px solid var(--border-color); padding: 30px 24px; border-radius: 12px; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; text-align: center;}
.seo-feature-card:hover { border-color: var(--primary-color); transform: translateY(-6px); box-shadow: 0 12px 24px rgba(0, 102, 204, 0.08); }
.seo-icon { width: 50px; height: 50px; color: var(--primary-color); margin-bottom: 16px; background: rgba(var(--primary-rgb, 0, 102, 204), 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.seo-icon svg { width: 24px; height: 24px; }
.seo-feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; color: var(--text-main); }
.seo-feature-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
@media (max-width: 900px) { .seo-feature-grid-3 { grid-template-columns: 1fr; } }
[data-theme="dark"] .tool-seo-content { background: var(--bg-surface); }
[data-theme="dark"] .seo-feature-card { background: #0f172a; border-color: #334155; }

/* 移动端完美适配补丁 */
@media (max-width: 768px) {
    .ipc-workspace { display: flex !important; flex-direction: column !important; width: 100% !important; max-width: 100vw !important; box-sizing: border-box !important; padding: 0 10px !important; gap: 16px !important; }
    .ipc-preview-panel, .ipc-control-panel { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; padding: 16px !important; margin: 0 !important; overflow: hidden !important; }
    
    .ipc-rc-value { font-size: 1rem; } 
    .tool-surface > div:first-child { flex-direction: column !important; align-items: flex-start !important; padding: 16px !important; }
}