#ymap-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ymap-loader,
.ymap-message,
.ymap-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 16px;
}

.ymap-loader {
    color: #333;
}

.ymap-error {
    color: #d32f2f;
    border: 2px solid #d32f2f;
}

.ymap-message {
    color: #666;
}

/* Стили для балуна */
.ymap-balloon {
    max-width: 450px;
    max-height: 500px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.balloon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d32f2f;
    color: #d32f2f;
}

.city-count {
    background: #d32f2f;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.balloon-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 2px solid #eee;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.ymap-cars-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.source-group {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 10px;
}

.source-name {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
}

.ymap-car-item {
    margin-bottom: 8px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #d32f2f;
    transition: all 0.2s;
}

.ymap-car-item:hover {
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.car-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.car-title {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.car-year {
    color: #666;
    font-weight: 400;
    font-size: 13px;
}

.car-price {
    color: #2e7d32;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.car-mileage {
    color: #666;
    font-size: 12px;
}

.more-cars {
    margin-top: 8px;
    padding: 8px;
    background: #e3f2fd;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    color: #1976d2;
    font-style: italic;
}

/* Скроллбар для балуна */
.ymap-balloon::-webkit-scrollbar {
    width: 8px;
}

.ymap-balloon::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ymap-balloon::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ymap-balloon::-webkit-scrollbar-thumb:hover {
    background: #555;
}