/* ================================================================
   菜刀客在线工具页 · world-capitals.html 私有样式
   需在 /css/common.css 之后加载。
   ================================================================ */

/* ---- 覆盖公共值：左栏更窄，右栏表格更宽 ---- */
.main {
    grid-template-columns: 340px 1fr;
}

@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
}

/* ---- 大洲筛选芯片 ---- */
.continent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc {
    padding: 4px 12px;
    font-size: 12px;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.cc:hover {
    border-color: #667eea;
    color: #4338ca;
    background: #eef2ff;
}

.cc.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.cc .n {
    opacity: 0.75;
    font-size: 11px;
    margin-left: 2px;
}

/* ---- 搜索框 ---- */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 32px;
    font-size: 14px;
}

.search-box .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #9ca3af;
    pointer-events: none;
}

.search-box .clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    display: none;
}

.search-box .clear-btn.show {
    display: block;
}

.search-box .clear-btn:hover {
    color: #dc2626;
}

/* ---- 行内复选项 ---- */
.opt-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.opt-check input {
    accent-color: #667eea;
    width: 15px;
    height: 15px;
}

/* ---- 结果工具行 ---- */
.result-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* ---- 命中高亮 ---- */
table.cap-table td.hl {
    background: #fef9c3;
    color: #92400e;
    font-weight: 600;
    border-radius: 3px;
    padding: 0 2px;
}

table.cap-table td.col-cont {
    text-align: left;
    color: #9ca3af;
    font-size: 12px;
    white-space: nowrap;
}

table.cap-table td.col-cn {
    text-align: left;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

table.cap-table td.col-cap {
    text-align: left;
    color: #4338ca;
    font-weight: 600;
    white-space: nowrap;
}

table.cap-table td.col-en {
    text-align: left;
    color: #6b7280;
    font-size: 12px;
}

table.cap-table td.col-py {
    text-align: left;
    color: #9ca3af;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    white-space: nowrap;
}

table.cap-table td.col-same {
    text-align: center;
}

.badge-same {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #fef3c7;
    color: #b45309;
    white-space: nowrap;
}

.badge-gone {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #f3f4f6;
    color: #6b7280;
    white-space: nowrap;
}

/* ---- 大洲分布条 ---- */
.dist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    font-size: 13px;
}

.dist-row .name {
    width: 62px;
    flex-shrink: 0;
    color: #6b7280;
}

.dist-row .bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.dist-row .bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.25s;
}

.dist-row .val {
    width: 62px;
    text-align: right;
    color: #4338ca;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ---- 同名国家清单 ---- */
.same-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
}

.same-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    border-radius: 999px;
    font-size: 13px;
    color: #4338ca;
    cursor: pointer;
    transition: all 0.2s;
}

.same-item:hover {
    border-color: #667eea;
    background: #e0e7ff;
}

.same-item .cap {
    font-weight: 600;
}

.same-item .cont {
    font-size: 11px;
    color: #6b7280;
}

/* ---- 说明文章里的对比表 ---- */
.myth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0 4px;
}

.myth-table th,
.myth-table td {
    border: 1px solid #e5e7eb;
    padding: 7px 10px;
    text-align: left;
    color: #4b5563;
}

.myth-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.myth-table td:first-child {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.myth-table td:nth-child(2) {
    color: #dc2626;
    text-decoration: line-through;
    white-space: nowrap;
}

.myth-table td:last-child {
    color: #16a34a;
    font-weight: 600;
    white-space: nowrap;
}

.seo-article code {
    background: #f3f4f6;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #4338ca;
}

/* ---- 小屏适配 ---- */
@media (max-width: 600px) {
    .continent-chips .cc {
        padding: 3px 10px;
        font-size: 11px;
    }

    .dist-row {
        padding: 7px 12px;
        gap: 8px;
    }

    .dist-row .name,
    .dist-row .val {
        width: 48px;
        font-size: 12px;
    }
}