/* fui_citysubsite | 城市切换器样式 — 居中弹窗 + 悬浮 FAB + 导航栏按钮 */

.fui-cs-switcher {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* ===== 悬浮 FAB ===== */
.fui-cs-fab {
    position: fixed;
    z-index: 999991;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: box-shadow 0.2s;
    font: inherit;
    color: #333;
}
.fui-cs-fab:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.fui-cs-fab-icon {
    font-size: 16px;
    line-height: 1;
}
.fui-cs-fab-label {
    font-weight: 500;
    color: #1d4c7d;
}
.fui-cs-fab.fui-cs-pos-bottom-right { right: 20px; bottom: 20px; }

/* ===== 弹窗遮罩 ===== */
.fui-cs-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fui-cs-modal[hidden] {
    display: none;
}
.fui-cs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
.fui-cs-modal-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.20);
    width: 720px;
    max-width: 94vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== 弹窗头部 ===== */
.fui-cs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0;
}
.fui-cs-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #222;
}
.fui-cs-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.fui-cs-modal-close:hover {
    color: #333;
}

/* ===== 搜索框 ===== */
.fui-cs-modal-search {
    padding: 12px 20px;
}
.fui-cs-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.fui-cs-search-input:focus {
    border-color: #1d4c7d;
    box-shadow: 0 0 0 2px rgba(29,76,125,0.12);
}

/* ===== 字母索引 ===== */
.fui-cs-modal-index {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 20px 8px;
    border-bottom: 1px solid #eef0f2;
}
.fui-cs-index-item {
    display: inline-block;
    padding: 2px 7px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
}
.fui-cs-index-item:hover {
    background: #f0f2f5;
    color: #333;
}
.fui-cs-index-item.is-active {
    background: #1d4c7d;
    color: #fff;
}

/* ===== 城市列表体 ===== */
.fui-cs-modal-body {
    padding: 12px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ===== 字母分组 ===== */
.fui-cs-group {
    margin-bottom: 12px;
}
.fui-cs-group:last-child {
    margin-bottom: 0;
}
.fui-cs-group-letter {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
}
.fui-cs-group-cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 4px;
}

/* ===== 城市条目 ===== */
.fui-cs-city {
    display: block;
    padding: 5px 8px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s;
}
.fui-cs-city:hover {
    background: #f0f5ff;
    color: #1d4c7d;
}
.fui-cs-city.is-current {
    background: #e8f0fe;
    color: #1d4c7d;
    font-weight: 600;
}

/* ===== 空结果 ===== */
.fui-cs-empty {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-size: 14px;
}

/* ===== IP 提示条 (右下角) ===== */
.fui-cs-hint {
    position: fixed;
    right: 20px;
    bottom: 68px;
    z-index: 999990;
    background: #fff8dc;
    border: 1px solid #f0d27a;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
    font-size: 13px;
}
.fui-cs-hint-yes {
    background: #1d4c7d;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    flex-shrink: 0;
}
.fui-cs-hint-yes:hover {
    background: #163a5f;
}
.fui-cs-hint-close {
    color: #999;
    text-decoration: none;
    padding: 0 4px;
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1;
}
.fui-cs-hint-close:hover {
    color: #333;
}

/* ===== 移动端自适应 ===== */
@media (max-width: 640px) {
    .fui-cs-modal-card {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    .fui-cs-modal-header {
        padding: 14px 16px 0;
    }
    .fui-cs-modal-search {
        padding: 10px 16px;
    }
    .fui-cs-modal-index {
        padding: 0 16px 8px;
    }
    .fui-cs-modal-body {
        padding: 10px 16px 16px;
    }
    .fui-cs-group-cities {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 3px;
    }
    .fui-cs-city {
        font-size: 12px;
        padding: 4px 6px;
    }
    .fui-cs-pos-bottom-right {
        right: 12px;
        bottom: 12px;
    }
}
