/**
 * City Switcher Styles
 * @version 1.0.0
 * @description 城市切换器样式 - 适配橙色导航栏
 * @updated 2026-01-05
 */

/* ============================================
   城市切换器容器
   ============================================ */
.city-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: var(--z-city-selector, 900);
    margin-left: auto;
    margin-right: var(--spacing-md);
}

/* ============================================
   切换按钮 - 适配橙色背景
   ============================================ */
.city-switcher__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    height: 34px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.city-switcher__btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.city-switcher__btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* 当前城市文本 */
.city-switcher__text {
    font-weight: 500;
    white-space: nowrap;
}

/* 下拉箭头 */
.city-switcher__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform var(--transition-fast);
    opacity: 0.8;
}

.city-switcher.is-active .city-switcher__arrow {
    transform: rotate(180deg);
}

/* ============================================
   下拉菜单
   ============================================ */
.city-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 120px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: var(--z-city-dropdown, 901);
    overflow: hidden;
}

.city-switcher.is-active .city-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 城市列表 */
.city-switcher__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.city-switcher__list li {
    margin: 0;
}

/* 城市链接 */
.city-switcher__link {
    display: block;
    padding: 10px 20px;
    color: var(--color-text, #333);
    text-decoration: none;
    font-size: 14px;
    font-weight: 450;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.city-switcher__link:hover {
    background: var(--color-bg-light, #f6f6f6);
    color: var(--color-primary);
}

/* 当前城市高亮 */
.city-switcher__link.is-current {
    color: var(--color-primary);
    background: rgba(232, 149, 19, 0.08);
    font-weight: 600;
}

.city-switcher__link.is-current::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* ============================================
   响应式 - 平板端
   ============================================ */
@media (max-width: 1024px) {
    .city-switcher {
        margin-right: var(--spacing-sm);
    }

    .city-switcher__btn {
        padding: 5px 12px;
        height: 32px;
        font-size: 13px;
        gap: 6px;
    }

    .city-switcher__dropdown {
        min-width: 110px;
    }

    .city-switcher__link {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* ============================================
   响应式 - 移动端
   ============================================ */
@media (max-width: 768px) {
    .city-switcher {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
    }

    .city-switcher__btn {
        padding: 4px 10px;
        height: 28px;
        font-size: 12px;
        gap: 4px;
        border-radius: 4px;
    }

    .city-switcher__arrow {
        border-left-width: 3px;
        border-right-width: 3px;
        border-top-width: 4px;
    }

    .city-switcher__dropdown {
        min-width: 100px;
        right: 0;
    }

    .city-switcher__list {
        padding: 4px 0;
    }

    .city-switcher__link {
        padding: 8px 14px;
        font-size: 12px;
    }

    .city-switcher__link.is-current::before {
        width: 5px;
        height: 5px;
        margin-right: 6px;
    }
}
