/* City Selector — модалка выбора города */

/* Кнопка в шапке */
.city-selector-btn {
    cursor: pointer;
    white-space: nowrap;
}
.city-selector-btn .city-selector-name {
    border-bottom: 1px dashed;
}
.city-selector-btn:hover .city-selector-name {
    border-bottom-color: transparent;
}
.city-auto-badge {
    display: none;
    font-size: 9px;
    padding: 1px 4px;
    background: #ffc107;
    color: #333;
    border-radius: 3px;
    margin-left: 3px;
    vertical-align: middle;
}

/* Оверлей */
.city-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10%;
}

/* Модалка */
.city-modal {
    background: #fff;
    border-radius: 8px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    animation: cityModalIn 0.2s ease;
}
@keyframes cityModalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.city-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #eee;
}
.city-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.city-modal-close {
    font-size: 24px;
    line-height: 1;
    color: #999;
    text-decoration: none;
}
.city-modal-close:hover { color: #333; }

.city-modal-body {
    padding: 16px 20px 20px;
}

/* Автоопределение */
.city-auto-info {
    background: #e8f4fd;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.city-auto-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}
.city-auto-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.city-auto-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

/* Кнопки */
.city-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    border: none;
}
.city-btn-primary {
    background: #2196F3;
    color: #fff;
    flex: 1;
}
.city-btn-primary:hover { background: #1976D2; color: #fff; }
.city-btn-secondary {
    background: #f0f0f0;
    color: #333;
}
.city-btn-secondary:hover { background: #e0e0e0; color: #333; }
.city-btn-geo {
    display: block;
    background: #f8f8f8;
    border: 1px solid #ddd;
    color: #555;
    padding: 10px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}
.city-btn-geo:hover { background: #f0f0f0; color: #333; }

/* Поиск */
.city-search-wrap {
    position: relative;
    margin-bottom: 16px;
}
.city-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.city-search-input:focus {
    border-color: #2196F3;
}

.city-search-results {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.city-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
}
.city-result:hover, .city-result.active {
    background: #f0f7ff;
}
.city-result-name {
    font-weight: 500;
}
.city-result-region {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}
.city-result-empty {
    padding: 8px 12px;
    color: #999;
    font-size: 13px;
}

/* Популярные */
.city-popular-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.city-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}
.city-quick {
    font-size: 13px;
    color: #2196F3;
    text-decoration: none;
    border-bottom: 1px dashed #2196F3;
    line-height: 1.6;
}
.city-quick:hover {
    border-bottom-color: transparent;
    color: #1565C0;
}
